Skip to content

Commit

Permalink
Replace checkstyle with PMD
Browse files Browse the repository at this point in the history
Also update Java language version to 11, which has been the target
runtime and documented as the required version since v2.1.

Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
  • Loading branch information
bestbeforetoday committed Nov 21, 2024
1 parent d5aa6c5 commit d24577d
Show file tree
Hide file tree
Showing 129 changed files with 1,940 additions and 2,019 deletions.
5 changes: 3 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,13 @@ subprojects {
version = rootProject.version

java {
sourceCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}

compileJava {
if (javaCompiler.get().metadata.languageVersion.canCompileOrRun(10)) {
options.release = 8
options.release = 11
}
}

Expand Down
108 changes: 0 additions & 108 deletions ci/checkstyle/checkstyle.xml

This file was deleted.

5 changes: 0 additions & 5 deletions ci/checkstyle/java-copyright-header.txt

This file was deleted.

4 changes: 2 additions & 2 deletions fabric-chaincode-docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ RUN gradle \
fabric-chaincode-shim:publishToMavenLocal \
-x javadoc \
-x test \
-x checkstyleMain \
-x checkstyleTest
-x pmdMain \
-x pmdTest

WORKDIR /root/chaincode-java
# Run the Gradle and Maven commands to generate the wrapper variants
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ group 'org.hyperledger.fabric-chaincode-java'
version '1.0-SNAPSHOT'

java {
sourceCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}

compileJava {
options.compilerArgs.addAll(['--release', '11'])
}

repositories {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<properties>

<!-- Generic properties -->
<java.version>8</java.version>
<java.version>11</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@ group 'org.hyperledger.fabric-chaincode-java'
version '1.0-SNAPSHOT'

java {
sourceCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}

compileJava {
if (javaCompiler.get().metadata.languageVersion.canCompileOrRun(10)) {
options.release = 8
}
options.compilerArgs.addAll(['--release', '11'])
}

repositories {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@ group 'org.hyperledger.fabric-chaincode-java'
version '1.0-SNAPSHOT'

java {
sourceCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}

compileJava {
if (javaCompiler.get().metadata.languageVersion.canCompileOrRun(10)) {
options.release = 8
}
options.compilerArgs.addAll(['--release', '11'])
}

repositories {
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.6/apache-maven-3.8.6-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar
wrapperVersion=3.3.2
distributionType=bin
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.3.2/maven-wrapper-3.3.2.jar
Loading

0 comments on commit d24577d

Please sign in to comment.