Skip to content

Commit 4939a15

Browse files
bestbeforetodaydenyeart
authored andcommitted
Replace checkstyle with PMD
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>
1 parent 85188b7 commit 4939a15

File tree

129 files changed

+1941
-2024
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+1941
-2024
lines changed

build.gradle

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,13 @@ subprojects {
5050
version = rootProject.version
5151

5252
java {
53-
sourceCompatibility = JavaVersion.VERSION_1_8
53+
sourceCompatibility = JavaVersion.VERSION_11
54+
targetCompatibility = JavaVersion.VERSION_11
5455
}
5556

5657
compileJava {
5758
if (javaCompiler.get().metadata.languageVersion.canCompileOrRun(10)) {
58-
options.release = 8
59+
options.release = 11
5960
}
6061
}
6162

ci/checkstyle/checkstyle.xml

Lines changed: 0 additions & 108 deletions
This file was deleted.

ci/checkstyle/java-copyright-header.txt

Lines changed: 0 additions & 5 deletions
This file was deleted.

fabric-chaincode-docker/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ RUN gradle \
4040
fabric-chaincode-shim:publishToMavenLocal \
4141
-x javadoc \
4242
-x test \
43-
-x checkstyleMain \
44-
-x checkstyleTest
43+
-x pmdMain \
44+
-x pmdTest
4545

4646
WORKDIR /root/chaincode-java
4747
# Run the Gradle and Maven commands to generate the wrapper variants

fabric-chaincode-integration-test/src/contracts/bare-gradle/build.gradle

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@ group 'org.hyperledger.fabric-chaincode-java'
77
version '1.0-SNAPSHOT'
88

99
java {
10-
sourceCompatibility = JavaVersion.VERSION_1_8
10+
sourceCompatibility = JavaVersion.VERSION_11
11+
targetCompatibility = JavaVersion.VERSION_11
12+
}
13+
14+
compileJava {
15+
options.compilerArgs.addAll(['--release', '11'])
1116
}
1217

1318
repositories {

fabric-chaincode-integration-test/src/contracts/bare-maven/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<properties>
88

99
<!-- Generic properties -->
10-
<java.version>8</java.version>
10+
<java.version>11</java.version>
1111
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1212
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
1313

fabric-chaincode-integration-test/src/contracts/fabric-ledger-api/build.gradle

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,12 @@ group 'org.hyperledger.fabric-chaincode-java'
77
version '1.0-SNAPSHOT'
88

99
java {
10-
sourceCompatibility = JavaVersion.VERSION_1_8
10+
sourceCompatibility = JavaVersion.VERSION_11
11+
targetCompatibility = JavaVersion.VERSION_11
1112
}
1213

1314
compileJava {
14-
if (javaCompiler.get().metadata.languageVersion.canCompileOrRun(10)) {
15-
options.release = 8
16-
}
15+
options.compilerArgs.addAll(['--release', '11'])
1716
}
1817

1918
repositories {

fabric-chaincode-integration-test/src/contracts/fabric-shim-api/build.gradle

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,12 @@ group 'org.hyperledger.fabric-chaincode-java'
77
version '1.0-SNAPSHOT'
88

99
java {
10-
sourceCompatibility = JavaVersion.VERSION_1_8
10+
sourceCompatibility = JavaVersion.VERSION_11
11+
targetCompatibility = JavaVersion.VERSION_11
1112
}
1213

1314
compileJava {
14-
if (javaCompiler.get().metadata.languageVersion.canCompileOrRun(10)) {
15-
options.release = 8
16-
}
15+
options.compilerArgs.addAll(['--release', '11'])
1716
}
1817

1918
repositories {
Binary file not shown.

fabric-chaincode-integration-test/src/contracts/wrapper-maven/.mvn/wrapper/maven-wrapper.properties

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@
66
# "License"); you may not use this file except in compliance
77
# with the License. You may obtain a copy of the License at
88
#
9-
# https://www.apache.org/licenses/LICENSE-2.0
9+
# http://www.apache.org/licenses/LICENSE-2.0
1010
#
1111
# Unless required by applicable law or agreed to in writing,
1212
# software distributed under the License is distributed on an
1313
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
1414
# KIND, either express or implied. See the License for the
1515
# specific language governing permissions and limitations
1616
# under the License.
17-
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.6/apache-maven-3.8.6-bin.zip
18-
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar
17+
wrapperVersion=3.3.2
18+
distributionType=bin
19+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip
20+
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.3.2/maven-wrapper-3.3.2.jar

0 commit comments

Comments
 (0)