diff --git a/actuator/build.gradle b/actuator/build.gradle index 1143dc83618..95ec75f6047 100644 --- a/actuator/build.gradle +++ b/actuator/build.gradle @@ -1,3 +1,7 @@ +plugins { + id("org.kordamp.gradle.jdeps") + id("org.kordamp.gradle.jdeprscan") +} description = "actuator – a series of transactions for blockchain." dependencies { diff --git a/build.gradle b/build.gradle index a5d93db9c38..c77d15aeba6 100644 --- a/build.gradle +++ b/build.gradle @@ -1,3 +1,8 @@ +plugins { + id("org.kordamp.gradle.jdeps") version "0.20.0" apply false + id("org.kordamp.gradle.jdeprscan") version "0.11.0" apply false +} + allprojects { version = "1.0.0" apply plugin: "java-library" @@ -81,27 +86,28 @@ subprojects { testImplementation "org.mockito:mockito-core:5.8.0" } - task sourcesJar(type: Jar, dependsOn: classes) { + tasks.register('sourcesJar', Jar) { + dependsOn classes classifier = "sources" from sourceSets.main.allSource duplicatesStrategy = DuplicatesStrategy.INCLUDE // allow duplicates } - tasks.withType(AbstractArchiveTask) { + tasks.withType(AbstractArchiveTask).configureEach { preserveFileTimestamps = false reproducibleFileOrder = true duplicatesStrategy = DuplicatesStrategy.INCLUDE // allow duplicates } - configurations.all { + configurations.configureEach { resolutionStrategy { force group: 'com.google.guava', name: 'guava', version: '33.2.1-jre' } } } -task copyToParent(type: Copy) { +tasks.register('copyToParent', Copy) { into "$buildDir/libs" subprojects { from tasks.withType(Jar) diff --git a/chainbase/build.gradle b/chainbase/build.gradle index 0fb98629856..0eed886f005 100644 --- a/chainbase/build.gradle +++ b/chainbase/build.gradle @@ -1,3 +1,7 @@ +plugins { + id("org.kordamp.gradle.jdeps") + id("org.kordamp.gradle.jdeprscan") +} description = "chainbase – a decentralized database for blockchain." // Dependency versions diff --git a/common/build.gradle b/common/build.gradle index ee8c1e8d7e5..ddde4e143a4 100644 --- a/common/build.gradle +++ b/common/build.gradle @@ -1,5 +1,7 @@ plugins { id 'java' + id("org.kordamp.gradle.jdeps") + id("org.kordamp.gradle.jdeprscan") } version '1.0.0' diff --git a/consensus/build.gradle b/consensus/build.gradle index 04cc24be5fd..0f80b81a87c 100644 --- a/consensus/build.gradle +++ b/consensus/build.gradle @@ -1,3 +1,7 @@ +plugins { + id("org.kordamp.gradle.jdeps") + id("org.kordamp.gradle.jdeprscan") +} description = "consensus – a distributed consensus arithmetic for blockchain." dependencies { diff --git a/crypto/build.gradle b/crypto/build.gradle index 82814af49e6..18b9d01d4b6 100644 --- a/crypto/build.gradle +++ b/crypto/build.gradle @@ -1,5 +1,7 @@ plugins { id 'java' + id("org.kordamp.gradle.jdeps") + id("org.kordamp.gradle.jdeprscan") } version '1.0.0' diff --git a/example/actuator-example/build.gradle b/example/actuator-example/build.gradle index e17c75895a1..217f384b524 100644 --- a/example/actuator-example/build.gradle +++ b/example/actuator-example/build.gradle @@ -1,3 +1,7 @@ +plugins { + id("org.kordamp.gradle.jdeps") + id("org.kordamp.gradle.jdeprscan") +} description = "actuator-example – a example of actuator." dependencies { diff --git a/framework/build.gradle b/framework/build.gradle index 0a3ea84fa35..eaecf9cfa7e 100644 --- a/framework/build.gradle +++ b/framework/build.gradle @@ -2,8 +2,8 @@ plugins { id "org.gradle.test-retry" version "1.5.9" id "org.sonarqube" version "2.6" id "com.gorylenko.gradle-git-properties" version "2.4.1" - id("org.kordamp.gradle.jdeps") version "0.20.0" - id("org.kordamp.gradle.jdeprscan") version "0.11.0" + id("org.kordamp.gradle.jdeps") + id("org.kordamp.gradle.jdeprscan") } gitProperties.failOnNoGitDirectory = false; @@ -27,7 +27,7 @@ configurations { } -configurations.getByName('checkstyleConfig') { +configurations.named('checkstyleConfig') { transitive = false } @@ -35,7 +35,7 @@ static def isWindows() { return org.gradle.internal.os.OperatingSystem.current().isWindows() } -task version(type: Exec) { +tasks.register('version', Exec) { commandLine 'bash', '-c', '../ver.sh' } @@ -86,7 +86,7 @@ checkstyleMain { source = 'src/main/java' } -task lint(type: Checkstyle) { +tasks.register('lint', Checkstyle) { // Cleaning the old log because of the creation of the new ones (not sure if totaly needed) delete fileTree(dir: "${project.rootDir}/app/build/reports") source 'src' @@ -99,7 +99,7 @@ task lint(type: Checkstyle) { ignoreFailures = false } -tasks.matching { it instanceof Test }.all { +tasks.matching { it instanceof Test }.configureEach { testLogging.events = ["failed", "passed", "skipped"] } @@ -152,7 +152,7 @@ jacocoTestReport { } def binaryRelease(taskName, jarName, mainClass) { - return tasks.create("${taskName}", Jar) { + return tasks.register("${taskName}", Jar) { baseName = jarName version = null from(sourceSets.main.output) { @@ -249,7 +249,7 @@ if (releaseBinary == 'true') { } -task copyToParent(type: Copy) { +tasks.register('copyToParent', Copy) { into "../build/distributions" from "$buildDir/distributions" include "*.zip" diff --git a/plugins/build.gradle b/plugins/build.gradle index 5a5acb8f201..f94bec7e18a 100644 --- a/plugins/build.gradle +++ b/plugins/build.gradle @@ -1,4 +1,6 @@ plugins { + id("org.kordamp.gradle.jdeps") + id("org.kordamp.gradle.jdeprscan") id "org.sonarqube" version "2.6" } diff --git a/protocol/build.gradle b/protocol/build.gradle index 0644004d247..0448f32366d 100644 --- a/protocol/build.gradle +++ b/protocol/build.gradle @@ -1,3 +1,7 @@ +plugins { + id("org.kordamp.gradle.jdeps") + id("org.kordamp.gradle.jdeprscan") +} apply plugin: 'com.google.protobuf' def protobufVersion = '3.21.12'