Skip to content

Commit 8031cb3

Browse files
authored
Merge pull request #85 from hyperledger/upgradeGradle8.7
Upgrade gradle to 8.7
2 parents 8e39807 + 8387bdf commit 8031cb3

File tree

14 files changed

+337
-240
lines changed

14 files changed

+337
-240
lines changed

CHANGELOG.md

+14
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,20 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
# [4.12.0]() (Upcoming)
7+
8+
### Bug Fixes
9+
10+
*
11+
12+
### Features
13+
14+
*
15+
16+
### BREAKING CHANGES
17+
18+
* Upgrade to Gradle 8.7 []()
19+
620
# [4.11.3](https://github.com/web3j/web3j-gradle-plugin/releases/tag/v4.11.3) (2024-05-02)
721

822
### Bug Fixes

README.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,7 @@ To specify and add different source sets, use the `sourceSets` DSL:
6969
sourceSets {
7070
main {
7171
solidity {
72-
srcDir {
73-
"my/custom/path/to/solidity"
74-
}
72+
srcDir 'my/custom/path/to/solidity'
7573
}
7674
}
7775
}

build.gradle

+27-7
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ plugins {
44
id 'idea'
55
id 'maven-publish'
66
id 'jacoco'
7-
id 'com.diffplug.gradle.spotless' version '4.5.1'
8-
id 'com.gradle.plugin-publish' version '1.2.0'
9-
id 'de.undercouch.download' version '4.1.1'
7+
id 'com.diffplug.spotless' version '6.25.0'
8+
id 'com.gradle.plugin-publish' version '1.2.1'
9+
id 'de.undercouch.download' version '4.1.2'
1010
}
1111

1212
description = 'Gradle plugin providing tasks to generate Web3j contracts from Solidity.'
@@ -23,6 +23,7 @@ apply {
2323
'javadoc',
2424
'repositories',
2525
'spotless',
26+
'junit'
2627
].each { buildScript ->
2728
download {
2829
src "https://raw.githubusercontent.com/hyperledger/web3j-build-tools/main/gradle/$buildScript/build.gradle"
@@ -39,9 +40,6 @@ repositories {
3940
maven {
4041
url 'https://plugins.gradle.org/m2/'
4142
}
42-
maven {
43-
url 'https://artifacts.consensys.net/public/maven/maven/'
44-
}
4543
}
4644

4745
dependencies {
@@ -52,7 +50,6 @@ dependencies {
5250
implementation("org.web3j:codegen:$web3jVersion") {
5351
exclude group: 'org.slf4j', module: 'slf4j-nop'
5452
}
55-
testImplementation "junit:junit:$junitVersion"
5653

5754
configurations.all {
5855
resolutionStrategy {
@@ -103,3 +100,26 @@ task generateVersionProperties {
103100
tasks.withType(Test) {
104101
reports.html.destination file("${reporting.baseDir}/${name}")
105102
}
103+
104+
tasks.named('spotlessJava') {
105+
dependsOn downloadJavaLicense, downloadFormatterProperties
106+
mustRunAfter tasks.named('compileJava')
107+
mustRunAfter tasks.named('spotlessGroovyGradle')
108+
dependsOn tasks.named('javadoc')
109+
dependsOn tasks.named('pluginDescriptors')
110+
dependsOn tasks.named('processResources')
111+
}
112+
113+
tasks.named('spotlessKotlin') {
114+
dependsOn downloadJavaLicense, downloadFormatterProperties
115+
mustRunAfter tasks.named('compileJava')
116+
mustRunAfter tasks.named('spotlessGroovyGradle')
117+
dependsOn tasks.named('spotlessJava')
118+
}
119+
120+
tasks.named('spotlessCheck') {
121+
dependsOn downloadJavaLicense, downloadFormatterProperties
122+
dependsOn tasks.named('spotlessJava')
123+
dependsOn tasks.named('spotlessKotlin')
124+
dependsOn tasks.named('spotlessGroovyGradle')
125+
}

gradle.properties

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
group=org.web3j
2-
version=4.11.3
2+
version=4.12.0-SNAPSHOT
33
org.gradle.caching=true
44
org.gradle.parallel=true
5-
solidityPluginVersion=0.4.0
6-
kotlinVersion=1.8.10
7-
junitVersion=4.12
5+
solidityPluginVersion=0.5.0
6+
kotlinVersion=1.9.24

gradle/jacoco/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ task jacocoRootTestReport(type: org.gradle.testing.jacoco.tasks.JacocoReport) {
77
getClassDirectories().from(subprojects.sourceSets.main.output)
88
getExecutionData().from(subprojects.jacocoTestReport.executionData)
99
reports {
10-
xml.enabled true
10+
xml.required.set(true)
1111
}
1212

1313
doFirst {

gradle/junit/build.gradle

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
ext {
2+
junitVersion = '5.9.3'
3+
}
4+
5+
dependencies {
6+
testImplementation "org.junit.jupiter:junit-jupiter-engine:$junitVersion",
7+
"org.junit.jupiter:junit-jupiter-api:$junitVersion",
8+
"org.junit.jupiter:junit-jupiter-params:$junitVersion"
9+
}
10+
11+
test {
12+
useJUnitPlatform()
13+
14+
testLogging {
15+
events "passed", "skipped", "failed"
16+
}
17+
}

gradle/repositories/build.gradle

-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@ repositories {
33
jcenter()
44
maven { url 'https://oss.sonatype.org/content/repositories/releases/' }
55
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
6-
maven { url "https://artifacts.consensys.net/public/maven/maven/" }
76
}

gradle/spotless/build.gradle

+22-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
apply plugin: 'com.diffplug.gradle.spotless'
2+
apply plugin: 'com.diffplug.spotless'
33
apply plugin: "de.undercouch.download"
44

55
task downloadJavaLicense(type: Download) {
@@ -26,7 +26,7 @@ spotless {
2626
exclude '**/build/install/**'
2727
}
2828
removeUnusedImports()
29-
googleJavaFormat("1.7").aosp()
29+
googleJavaFormat('1.17.0').aosp()
3030
importOrder 'java', '', 'org.web3j', '\\#'
3131
trimTrailingWhitespace()
3232
endWithNewline()
@@ -39,7 +39,7 @@ spotless {
3939
exclude '**/.gradle/**'
4040
exclude '**/build/install/**'
4141
}
42-
ktlint('0.31.0')
42+
ktlint('0.49.1')
4343
trimTrailingWhitespace()
4444
endWithNewline()
4545
licenseHeaderFile "$rootDir/gradle/spotless/java.license"
@@ -52,4 +52,22 @@ spotless {
5252
}
5353
}
5454

55-
spotlessCheck.dependsOn('downloadJavaLicense', 'downloadFormatterProperties')
55+
tasks.named('spotlessJava') {
56+
dependsOn downloadJavaLicense, downloadFormatterProperties
57+
mustRunAfter tasks.named('compileJava')
58+
mustRunAfter tasks.named('spotlessGroovyGradle')
59+
}
60+
61+
tasks.named('spotlessKotlin') {
62+
dependsOn downloadJavaLicense, downloadFormatterProperties
63+
mustRunAfter tasks.named('compileJava')
64+
mustRunAfter tasks.named('spotlessGroovyGradle')
65+
dependsOn tasks.named('spotlessJava')
66+
}
67+
68+
tasks.named('spotlessCheck') {
69+
dependsOn downloadJavaLicense, downloadFormatterProperties
70+
dependsOn tasks.named('spotlessJava')
71+
dependsOn tasks.named('spotlessKotlin')
72+
dependsOn tasks.named('spotlessGroovyGradle')
73+
}

gradle/wrapper/gradle-wrapper.jar

-11.9 KB
Binary file not shown.
+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
46
zipStoreBase=GRADLE_USER_HOME
57
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)