Skip to content

Commit

Permalink
Upgrade gradle to 8.7
Browse files Browse the repository at this point in the history
Signed-off-by: Nischal Sharma <[email protected]>
  • Loading branch information
NickSneo committed May 17, 2024
1 parent 1414ac8 commit ea6f3b0
Show file tree
Hide file tree
Showing 15 changed files with 275 additions and 167 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ plugins {
id 'idea'
id 'jacoco'
id "com.jfrog.bintray" version "1.8.4"
id "com.diffplug.gradle.spotless" version "4.5.1"
id "com.diffplug.spotless" version "6.25.0"
id 'io.codearte.nexus-staging' version '0.21.1'
id "de.marcphilipp.nexus-publish" version "0.4.0"
id 'org.jetbrains.kotlin.jvm' version '1.8.10'
Expand Down
4 changes: 3 additions & 1 deletion gradle/jacoco/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ task jacocoRootTestReport(type: org.gradle.testing.jacoco.tasks.JacocoReport) {
getAdditionalSourceDirs().from(subprojects.sourceSets.main.allSource.srcDirs)
getClassDirectories().from(subprojects.sourceSets.main.output)
getExecutionData().from(subprojects.jacocoTestReport.executionData)
reports { xml.enabled = true }
reports {
xml.required.set(true)
}

doFirst {
getExecutionData().from(executionData.findAll { it.exists() })
Expand Down
29 changes: 25 additions & 4 deletions gradle/spotless/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

apply plugin: 'com.diffplug.gradle.spotless'
apply plugin: 'com.diffplug.spotless'
apply plugin: "de.undercouch.download"

task downloadJavaLicense(type: Download) {
Expand All @@ -26,7 +26,7 @@ spotless {
exclude '**/build/install/**'
}
removeUnusedImports()
googleJavaFormat("1.7").aosp()
googleJavaFormat("1.17.0").aosp()
importOrder 'java', '', 'org.web3j', '\\#'
trimTrailingWhitespace()
endWithNewline()
Expand All @@ -39,7 +39,7 @@ spotless {
exclude '**/.gradle/**'
exclude '**/build/install/**'
}
ktlint('0.31.0')
ktlint('0.49.1')
trimTrailingWhitespace()
endWithNewline()
licenseHeaderFile "$rootDir/gradle/spotless/java.license"
Expand All @@ -52,4 +52,25 @@ spotless {
}
}

spotlessCheck.dependsOn('downloadJavaLicense', 'downloadFormatterProperties')
tasks.named('spotlessJava') {
dependsOn downloadJavaLicense, downloadFormatterProperties
mustRunAfter tasks.named('compileJava')
mustRunAfter tasks.named('spotlessGroovyGradle')
dependsOn tasks.named('compileTestKotlin')
dependsOn tasks.named('processResources')
dependsOn tasks.named('processTestResources')
}

tasks.named('spotlessKotlin') {
dependsOn downloadJavaLicense, downloadFormatterProperties
mustRunAfter tasks.named('compileJava')
mustRunAfter tasks.named('spotlessGroovyGradle')
dependsOn tasks.named('spotlessJava')
}

tasks.named('spotlessCheck') {
dependsOn downloadJavaLicense, downloadFormatterProperties
dependsOn tasks.named('spotlessJava')
dependsOn tasks.named('spotlessKotlin')
dependsOn tasks.named('spotlessGroovyGradle')
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
7 changes: 4 additions & 3 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#Thu Mar 05 14:16:43 GMT 2020
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit ea6f3b0

Please sign in to comment.