@@ -4,9 +4,9 @@ plugins {
4
4
id ' idea'
5
5
id ' maven-publish'
6
6
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 '
10
10
}
11
11
12
12
description = ' Gradle plugin providing tasks to generate Web3j contracts from Solidity.'
@@ -23,6 +23,7 @@ apply {
23
23
' javadoc' ,
24
24
' repositories' ,
25
25
' spotless' ,
26
+ ' junit'
26
27
]. each { buildScript ->
27
28
download {
28
29
src " https://raw.githubusercontent.com/hyperledger/web3j-build-tools/main/gradle/$buildScript /build.gradle"
@@ -39,9 +40,6 @@ repositories {
39
40
maven {
40
41
url ' https://plugins.gradle.org/m2/'
41
42
}
42
- maven {
43
- url ' https://artifacts.consensys.net/public/maven/maven/'
44
- }
45
43
}
46
44
47
45
dependencies {
@@ -52,7 +50,6 @@ dependencies {
52
50
implementation(" org.web3j:codegen:$web3jVersion " ) {
53
51
exclude group : ' org.slf4j' , module : ' slf4j-nop'
54
52
}
55
- testImplementation " junit:junit:$junitVersion "
56
53
57
54
configurations. all {
58
55
resolutionStrategy {
@@ -103,3 +100,26 @@ task generateVersionProperties {
103
100
tasks. withType(Test ) {
104
101
reports. html. destination file(" ${ reporting.baseDir} /${ name} " )
105
102
}
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
+ }
0 commit comments