From 838f7aa5e0f3e48e11f258848943cf77df78dda9 Mon Sep 17 00:00:00 2001 From: Danno Ferrin Date: Mon, 13 Jan 2020 08:28:50 -0700 Subject: [PATCH] Fix Gradle 7.0 compatibility issues and build warnings (#288) Removes as many Gradle 7.0 compatibility issues as possible * `baseName` -> `archiveBaseName` * `extension` -> `archiveExtension` * `destinationDir` -> `destinationDirectory` * `runtime` -> `runtimeOnly` * Change some log4j-api and log4j-core dependencies * Remove an unneeded and outdated plugin (`net.ltgt.apt`) * tweak the plugin-api change detector's property annotations. Warnings still exist with one external plugin used for license file checking that we do not control the source code for. Signed-off-by: Danno Ferrin --- besu/build.gradle | 16 ++++++++-------- build.gradle | 14 ++++++++++---- config/build.gradle | 8 ++++---- consensus/clique/build.gradle | 6 +++--- consensus/common/build.gradle | 8 ++++---- consensus/ibft/build.gradle | 6 +++--- consensus/ibftlegacy/build.gradle | 6 +++--- crypto/build.gradle | 8 ++++---- errorprone-checks/build.gradle | 5 ----- ethereum/api/build.gradle | 7 ++++--- ethereum/blockcreation/build.gradle | 6 +++--- ethereum/core/build.gradle | 11 ++++++----- ethereum/eth/build.gradle | 6 +++--- ethereum/mock-p2p/build.gradle | 6 +++--- ethereum/p2p/build.gradle | 8 ++++---- ethereum/permissioning/build.gradle | 6 +++--- ethereum/retesteth/build.gradle | 8 ++++---- ethereum/rlp/build.gradle | 6 +++--- ethereum/stratum/build.gradle | 6 +++--- ethereum/trie/build.gradle | 6 +++--- metrics/core/build.gradle | 8 ++++---- metrics/rocksdb/build.gradle | 6 +++--- nat/build.gradle | 8 ++++---- plugin-api/build.gradle | 10 +++++++--- plugins/rocksdb/build.gradle | 8 ++++---- services/kvstore/build.gradle | 8 ++++---- services/pipeline/build.gradle | 8 ++++---- services/tasks/build.gradle | 8 ++++---- testutil/build.gradle | 6 +++--- util/build.gradle | 11 ++++++----- 30 files changed, 121 insertions(+), 113 deletions(-) diff --git a/besu/build.gradle b/besu/build.gradle index f03f4727f5..baf8dd3a22 100644 --- a/besu/build.gradle +++ b/besu/build.gradle @@ -16,12 +16,12 @@ apply plugin: 'java-library' jar { - baseName 'besu' + archiveBaseName = 'besu' manifest { attributes( - 'Specification-Title': baseName, + 'Specification-Title': archiveBaseName, 'Specification-Version': project.version, - 'Implementation-Title': baseName, + 'Implementation-Title': archiveBaseName, 'Implementation-Version': calculateVersion() ) } @@ -58,13 +58,13 @@ dependencies { implementation 'io.vertx:vertx-core' implementation 'io.vertx:vertx-web' implementation 'org.apache.logging.log4j:log4j-api' + implementation 'org.apache.logging.log4j:log4j-core' implementation 'org.apache.tuweni:tuweni-bytes' implementation 'org.apache.tuweni:tuweni-config' implementation 'org.apache.tuweni:tuweni-units' implementation 'org.springframework.security:spring-security-crypto' - runtime 'org.apache.logging.log4j:log4j-core' - runtime 'org.apache.logging.log4j:log4j-slf4j-impl' + runtimeOnly 'org.apache.logging.log4j:log4j-slf4j-impl' testImplementation project(path: ':ethereum:core', configuration: 'testSupportArtifacts') testImplementation project(':testutil') @@ -81,12 +81,12 @@ dependencies { } task testJar(type: Jar) { - archiveName 'testPlugins.jar' + archiveFileName = 'testPlugins.jar' manifest { attributes( - 'Specification-Title': baseName, + 'Specification-Title': archiveBaseName, 'Specification-Version': project.version, - 'Implementation-Title': baseName, + 'Implementation-Title': archiveBaseName, 'Implementation-Version': calculateVersion() ) } diff --git a/build.gradle b/build.gradle index 3ed5678c6e..ffe8cd1fee 100644 --- a/build.gradle +++ b/build.gradle @@ -309,7 +309,7 @@ subprojects { } task testSupportJar(type: Jar) { - baseName = "${project.name}-support-test" + archiveBaseName = "${project.name}-support-test" classifier = 'test-support' from sourceSets.testSupport.output } @@ -401,6 +401,12 @@ subprojects { group = "verification" description = "Runs the Besu integration tests" + jvmArgs = [ + '--add-opens', + 'java.base/java.util=ALL-UNNAMED', + '--add-opens', + 'java.base/java.util.concurrent=ALL-UNNAMED' + ] testClassesDirs = sourceSets.integrationTest.output.classesDirs classpath = sourceSets.integrationTest.runtimeClasspath outputs.upToDateWhen { false } @@ -499,7 +505,7 @@ distTar { delete fileTree(dir: 'build/distributions', include: '*.tar.gz') } compression = Compression.GZIP - extension = 'tar.gz' + archiveExtension = 'tar.gz' } distZip { @@ -684,8 +690,8 @@ bintray { key = bintrayKey filesSpec { - from distTar.destinationDir.path - from distZip.destinationDir.path + from distTar.destinationDirectory + from distZip.destinationDirectory into '.' } diff --git a/config/build.gradle b/config/build.gradle index 3b58c7b6d4..8d1d4fd490 100644 --- a/config/build.gradle +++ b/config/build.gradle @@ -16,12 +16,12 @@ apply plugin: 'java-library' jar { - baseName 'besu-config' + archiveBaseName = 'besu-config' manifest { attributes( - 'Specification-Title': baseName, + 'Specification-Title': archiveBaseName, 'Specification-Version': project.version, - 'Implementation-Title': baseName, + 'Implementation-Title': archiveBaseName, 'Implementation-Version': calculateVersion() ) } @@ -32,7 +32,7 @@ dependencies { implementation 'com.google.guava:guava' implementation 'org.apache.logging.log4j:log4j-api' - runtime 'org.apache.logging.log4j:log4j-core' + runtimeOnly 'org.apache.logging.log4j:log4j-core' testImplementation project(':testutil') diff --git a/consensus/clique/build.gradle b/consensus/clique/build.gradle index 407591267a..67a795f981 100644 --- a/consensus/clique/build.gradle +++ b/consensus/clique/build.gradle @@ -16,12 +16,12 @@ plugins { id 'java' } jar { - baseName 'besu-clique' + archiveBaseName = 'besu-clique' manifest { attributes( - 'Specification-Title': baseName, + 'Specification-Title': archiveBaseName, 'Specification-Version': project.version, - 'Implementation-Title': baseName, + 'Implementation-Title': archiveBaseName, 'Implementation-Version': calculateVersion() ) } diff --git a/consensus/common/build.gradle b/consensus/common/build.gradle index 007679f05e..6a130ad3c3 100644 --- a/consensus/common/build.gradle +++ b/consensus/common/build.gradle @@ -16,12 +16,12 @@ apply plugin: 'java-library' jar { - baseName 'besu-consensus-common' + archiveBaseName = 'besu-consensus-common' manifest { attributes( - 'Specification-Title': baseName, + 'Specification-Title': archiveBaseName, 'Specification-Version': project.version, - 'Implementation-Title': baseName, + 'Implementation-Title': archiveBaseName, 'Implementation-Version': calculateVersion() ) } @@ -48,7 +48,7 @@ dependencies { } configurations { testArtifacts } task testJar (type: Jar) { - baseName = "${project.name}-test" + archiveBaseName = "${project.name}-test" from sourceSets.test.output } diff --git a/consensus/ibft/build.gradle b/consensus/ibft/build.gradle index e482a3b5a7..08af1ae693 100644 --- a/consensus/ibft/build.gradle +++ b/consensus/ibft/build.gradle @@ -16,12 +16,12 @@ apply plugin: 'java-library' jar { - baseName 'besu-ibft' + archiveBaseName = 'besu-ibft' manifest { attributes( - 'Specification-Title': baseName, + 'Specification-Title': archiveBaseName, 'Specification-Version': project.version, - 'Implementation-Title': baseName, + 'Implementation-Title': archiveBaseName, 'Implementation-Version': calculateVersion() ) } diff --git a/consensus/ibftlegacy/build.gradle b/consensus/ibftlegacy/build.gradle index 4b6899ffea..5f9247fa31 100644 --- a/consensus/ibftlegacy/build.gradle +++ b/consensus/ibftlegacy/build.gradle @@ -1,12 +1,12 @@ apply plugin: 'java-library' jar { - baseName 'besu-ibftlegacy' + archiveBaseName = 'besu-ibftlegacy' manifest { attributes( - 'Specification-Title': baseName, + 'Specification-Title': archiveBaseName, 'Specification-Version': project.version, - 'Implementation-Title': baseName, + 'Implementation-Title': archiveBaseName, 'Implementation-Version': calculateVersion() ) } diff --git a/crypto/build.gradle b/crypto/build.gradle index 50ff7dee93..01de05be7d 100644 --- a/crypto/build.gradle +++ b/crypto/build.gradle @@ -16,12 +16,12 @@ apply plugin: 'java-library' jar { - baseName 'besu-crypto' + archiveBaseName = 'besu-crypto' manifest { attributes( - 'Specification-Title': baseName, + 'Specification-Title': archiveBaseName, 'Specification-Version': project.version, - 'Implementation-Title': baseName, + 'Implementation-Title': archiveBaseName, 'Implementation-Version': calculateVersion() ) } @@ -38,7 +38,7 @@ dependencies { implementation 'org.apache.tuweni:tuweni-bytes' implementation 'org.apache.tuweni:tuweni-units' - runtime 'org.apache.logging.log4j:log4j-core' + runtimeOnly 'org.apache.logging.log4j:log4j-core' testImplementation 'junit:junit' testImplementation 'org.assertj:assertj-core' diff --git a/errorprone-checks/build.gradle b/errorprone-checks/build.gradle index c7b36c7351..3d0090d7d4 100644 --- a/errorprone-checks/build.gradle +++ b/errorprone-checks/build.gradle @@ -13,10 +13,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -// See https://github.com/tbroyer/gradle-errorprone-plugin -// See https://github.com/tbroyer/gradle-apt-plugin -plugins { id 'net.ltgt.apt' version '0.21' apply false } - // we use this config to get the path of the JDK 9 javac jar, to // stick it in the bootclasspath when running tests configurations.maybeCreate("epJavac") @@ -24,7 +20,6 @@ configurations.maybeCreate("epJavac") apply plugin: 'java' apply plugin: 'net.ltgt.errorprone' -apply plugin: 'net.ltgt.apt' sourceCompatibility = 11 targetCompatibility = 11 diff --git a/ethereum/api/build.gradle b/ethereum/api/build.gradle index 2681538bd2..e67870c08a 100644 --- a/ethereum/api/build.gradle +++ b/ethereum/api/build.gradle @@ -16,12 +16,12 @@ apply plugin: 'java-library' jar { - baseName 'besu-api' + archiveBaseName = 'besu-api' manifest { attributes( - 'Specification-Title': baseName, + 'Specification-Title': archiveBaseName, 'Specification-Version': project.version, - 'Implementation-Title': baseName, + 'Implementation-Title': archiveBaseName, 'Implementation-Version': calculateVersion() ) } @@ -48,6 +48,7 @@ dependencies { implementation 'io.vertx:vertx-core' implementation 'io.vertx:vertx-unit' implementation 'io.vertx:vertx-web' + implementation 'org.apache.logging.log4j:log4j-core' implementation 'org.apache.tuweni:tuweni-bytes' implementation 'org.apache.tuweni:tuweni-net' implementation 'org.apache.tuweni:tuweni-toml' diff --git a/ethereum/blockcreation/build.gradle b/ethereum/blockcreation/build.gradle index 1ed4c24350..d8ed3fd68a 100644 --- a/ethereum/blockcreation/build.gradle +++ b/ethereum/blockcreation/build.gradle @@ -1,12 +1,12 @@ apply plugin: 'java-library' jar { - baseName 'besu-blockcreation' + archiveBaseName = 'besu-blockcreation' manifest { attributes( - 'Specification-Title': baseName, + 'Specification-Title': archiveBaseName, 'Specification-Version': project.version, - 'Implementation-Title': baseName, + 'Implementation-Title': archiveBaseName, 'Implementation-Version': calculateVersion() ) } diff --git a/ethereum/core/build.gradle b/ethereum/core/build.gradle index ce5374065e..888be6074b 100644 --- a/ethereum/core/build.gradle +++ b/ethereum/core/build.gradle @@ -16,12 +16,12 @@ apply plugin: 'java-library' jar { - baseName 'besu-core' + archiveBaseName = 'besu-core' manifest { attributes( - 'Specification-Title': baseName, + 'Specification-Title': archiveBaseName, 'Specification-Version': project.version, - 'Implementation-Title': baseName, + 'Implementation-Title': archiveBaseName, 'Implementation-Version': calculateVersion() ) } @@ -46,13 +46,14 @@ dependencies { implementation 'org.apache.tuweni:tuweni-bytes' implementation 'org.apache.tuweni:tuweni-units' - runtime 'org.apache.logging.log4j:log4j-core' + runtimeOnly 'org.apache.logging.log4j:log4j-core' testImplementation project(path: ':config', configuration: 'testSupportArtifacts') testImplementation project(path:':ethereum:referencetests', configuration: 'testOutput') testImplementation project(':testutil') testImplementation 'junit:junit' + testImplementation 'org.apache.logging.log4j:log4j-core' testImplementation 'org.apache.tuweni:tuweni-bytes' testImplementation 'org.apache.tuweni:tuweni-io' testImplementation 'org.apache.tuweni:tuweni-units' @@ -91,7 +92,7 @@ dependencies { configurations { testArtifacts } task testJar (type: Jar) { - baseName = "${project.name}-test" + archiveBaseName = "${project.name}-test" from sourceSets.test.output } diff --git a/ethereum/eth/build.gradle b/ethereum/eth/build.gradle index fef0e0512c..3629fdf594 100644 --- a/ethereum/eth/build.gradle +++ b/ethereum/eth/build.gradle @@ -16,12 +16,12 @@ apply plugin: 'java-library' jar { - baseName 'besu-eth' + archiveBaseName = 'besu-eth' manifest { attributes( - 'Specification-Title': baseName, + 'Specification-Title': archiveBaseName, 'Specification-Version': project.version, - 'Implementation-Title': baseName, + 'Implementation-Title': archiveBaseName, 'Implementation-Version': calculateVersion() ) } diff --git a/ethereum/mock-p2p/build.gradle b/ethereum/mock-p2p/build.gradle index 69a71694c8..b1e605b68f 100644 --- a/ethereum/mock-p2p/build.gradle +++ b/ethereum/mock-p2p/build.gradle @@ -16,12 +16,12 @@ apply plugin: 'java-library' jar { - baseName 'besu-mock-p2p' + archiveBaseName = 'besu-mock-p2p' manifest { attributes( - 'Specification-Title': baseName, + 'Specification-Title': archiveBaseName, 'Specification-Version': project.version, - 'Implementation-Title': baseName, + 'Implementation-Title': archiveBaseName, 'Implementation-Version': calculateVersion() ) } diff --git a/ethereum/p2p/build.gradle b/ethereum/p2p/build.gradle index c0cf524473..89b38618ce 100644 --- a/ethereum/p2p/build.gradle +++ b/ethereum/p2p/build.gradle @@ -16,12 +16,12 @@ apply plugin: 'java-library' jar { - baseName 'besu-p2p' + archiveBaseName = 'besu-p2p' manifest { attributes( - 'Specification-Title': baseName, + 'Specification-Title': archiveBaseName, 'Specification-Version': project.version, - 'Implementation-Title': baseName, + 'Implementation-Title': archiveBaseName, 'Implementation-Version': calculateVersion() ) } @@ -42,7 +42,7 @@ dependencies { implementation 'org.apache.tuweni:tuweni-units' implementation 'org.xerial.snappy:snappy-java' - runtime 'org.apache.logging.log4j:log4j-core' + runtimeOnly 'org.apache.logging.log4j:log4j-core' // test dependencies. testImplementation project(path: ':ethereum:core', configuration: 'testArtifacts') diff --git a/ethereum/permissioning/build.gradle b/ethereum/permissioning/build.gradle index 5024631a28..f39e6c4c2c 100644 --- a/ethereum/permissioning/build.gradle +++ b/ethereum/permissioning/build.gradle @@ -16,12 +16,12 @@ apply plugin: 'java-library' jar { - baseName 'besu-permissioning' + archiveBaseName = 'besu-permissioning' manifest { attributes( - 'Specification-Title': baseName, + 'Specification-Title': archiveBaseName, 'Specification-Version': project.version, - 'Implementation-Title': baseName, + 'Implementation-Title': archiveBaseName, 'Implementation-Version': calculateVersion() ) } diff --git a/ethereum/retesteth/build.gradle b/ethereum/retesteth/build.gradle index ff0ec94ee1..2bcb6a91e6 100644 --- a/ethereum/retesteth/build.gradle +++ b/ethereum/retesteth/build.gradle @@ -14,12 +14,12 @@ apply plugin: 'java-library' jar { - baseName 'besu-retesteth' + archiveBaseName = 'besu-retesteth' manifest { attributes( - 'Specification-Title': baseName, + 'Specification-Title': archiveBaseName, 'Specification-Version': project.version, - 'Implementation-Title': baseName, + 'Implementation-Title': archiveBaseName, 'Implementation-Version': calculateVersion() ) } @@ -50,5 +50,5 @@ dependencies { testImplementation 'org.assertj:assertj-core' testImplementation 'org.mockito:mockito-core' - runtime 'org.apache.logging.log4j:log4j-core' + runtimeOnly 'org.apache.logging.log4j:log4j-core' } diff --git a/ethereum/rlp/build.gradle b/ethereum/rlp/build.gradle index 9964152526..cc263f25e8 100644 --- a/ethereum/rlp/build.gradle +++ b/ethereum/rlp/build.gradle @@ -16,12 +16,12 @@ apply plugin: 'java-library' jar { - baseName 'besu-ethereum-rlp' + archiveBaseName = 'besu-ethereum-rlp' manifest { attributes( - 'Specification-Title': baseName, + 'Specification-Title': archiveBaseName, 'Specification-Version': project.version, - 'Implementation-Title': baseName, + 'Implementation-Title': archiveBaseName, 'Implementation-Version': calculateVersion() ) } diff --git a/ethereum/stratum/build.gradle b/ethereum/stratum/build.gradle index 5a31041406..be695e5615 100644 --- a/ethereum/stratum/build.gradle +++ b/ethereum/stratum/build.gradle @@ -16,12 +16,12 @@ apply plugin: 'java-library' jar { - baseName 'besu-ethereum-stratum' + archiveBaseName = 'besu-ethereum-stratum' manifest { attributes( - 'Specification-Title': baseName, + 'Specification-Title': archiveBaseName, 'Specification-Version': project.version, - 'Implementation-Title': baseName, + 'Implementation-Title': archiveBaseName, 'Implementation-Version': calculateVersion() ) } diff --git a/ethereum/trie/build.gradle b/ethereum/trie/build.gradle index d836732475..c5c2b10dc6 100644 --- a/ethereum/trie/build.gradle +++ b/ethereum/trie/build.gradle @@ -16,12 +16,12 @@ apply plugin: 'java-library' jar { - baseName 'besu-trie' + archiveBaseName = 'besu-trie' manifest { attributes( - 'Specification-Title': baseName, + 'Specification-Title': archiveBaseName, 'Specification-Version': project.version, - 'Implementation-Title': baseName, + 'Implementation-Title': archiveBaseName, 'Implementation-Version': calculateVersion() ) } diff --git a/metrics/core/build.gradle b/metrics/core/build.gradle index 846e98d0a8..019441fa2e 100644 --- a/metrics/core/build.gradle +++ b/metrics/core/build.gradle @@ -16,12 +16,12 @@ apply plugin: 'java-library' jar { - baseName 'besu-metrics-core' + archiveBaseName = 'besu-metrics-core' manifest { attributes( - 'Specification-Title': baseName, + 'Specification-Title': archiveBaseName, 'Specification-Version': project.version, - 'Implementation-Title': baseName, + 'Implementation-Title': archiveBaseName, 'Implementation-Version': calculateVersion() ) } @@ -46,7 +46,7 @@ dependencies { implementation 'io.vertx:vertx-web' implementation 'org.apache.logging.log4j:log4j-api' - runtime 'org.apache.logging.log4j:log4j-core' + runtimeOnly 'org.apache.logging.log4j:log4j-core' // test dependencies. testImplementation project(':util') diff --git a/metrics/rocksdb/build.gradle b/metrics/rocksdb/build.gradle index 7c71eddf4e..91a274de62 100644 --- a/metrics/rocksdb/build.gradle +++ b/metrics/rocksdb/build.gradle @@ -16,12 +16,12 @@ apply plugin: 'java-library' jar { - baseName 'besu-metrics-rocksdb' + archiveBaseName = 'besu-metrics-rocksdb' manifest { attributes( - 'Specification-Title': baseName, + 'Specification-Title': archiveBaseName, 'Specification-Version': project.version, - 'Implementation-Title': baseName, + 'Implementation-Title': archiveBaseName, 'Implementation-Version': calculateVersion() ) } diff --git a/nat/build.gradle b/nat/build.gradle index d71589f736..099fa2721e 100644 --- a/nat/build.gradle +++ b/nat/build.gradle @@ -16,12 +16,12 @@ apply plugin: 'java-library' jar { - baseName 'besu-nat' + archiveBaseName = 'besu-nat' manifest { attributes( - 'Specification-Title': baseName, + 'Specification-Title': archiveBaseName, 'Specification-Version': project.version, - 'Implementation-Title': baseName, + 'Implementation-Title': archiveBaseName, 'Implementation-Version': calculateVersion() ) } @@ -34,7 +34,7 @@ dependencies { implementation 'org.jupnp:org.jupnp' implementation 'org.jupnp:org.jupnp.support' - runtime 'org.apache.logging.log4j:log4j-core' + runtimeOnly 'org.apache.logging.log4j:log4j-core' // test dependencies. testImplementation project(path: ':ethereum:core', configuration: 'testArtifacts') diff --git a/plugin-api/build.gradle b/plugin-api/build.gradle index 69324df5e0..630effe80f 100644 --- a/plugin-api/build.gradle +++ b/plugin-api/build.gradle @@ -15,12 +15,12 @@ import java.security.MessageDigest apply plugin: 'java-library' jar { - baseName 'plugin-api' + archiveBaseName = 'plugin-api' manifest { attributes( - 'Specification-Title': baseName, + 'Specification-Title': archiveBaseName, 'Specification-Version': project.version, - 'Implementation-Title': baseName, + 'Implementation-Title': archiveBaseName, 'Implementation-Version': calculateVersion() ) } @@ -35,7 +35,11 @@ configurations { testArtifacts } artifacts { testSupportArtifacts testSupportJar } class FileStateChecker extends DefaultTask { + + @Input Set files + + @Input String knownHash @TaskAction diff --git a/plugins/rocksdb/build.gradle b/plugins/rocksdb/build.gradle index 08d857f451..c7bcc9f0f3 100644 --- a/plugins/rocksdb/build.gradle +++ b/plugins/rocksdb/build.gradle @@ -14,12 +14,12 @@ apply plugin: 'java-library' jar { - baseName 'besu-plugin-rocksdb' + archiveBaseName = 'besu-plugin-rocksdb' manifest { attributes( - 'Specification-Title': baseName, + 'Specification-Title': archiveBaseName, 'Specification-Version': project.version, - 'Implementation-Title': baseName, + 'Implementation-Title': archiveBaseName, 'Implementation-Version': calculateVersion() ) } @@ -46,7 +46,7 @@ dependencies { implementation 'org.apache.tuweni:tuweni-bytes' implementation 'org.rocksdb:rocksdbjni' - runtime 'org.apache.logging.log4j:log4j-core' + runtimeOnly 'org.apache.logging.log4j:log4j-core' testImplementation project(':testutil') diff --git a/services/kvstore/build.gradle b/services/kvstore/build.gradle index 121fca1363..faf2d99b20 100644 --- a/services/kvstore/build.gradle +++ b/services/kvstore/build.gradle @@ -16,12 +16,12 @@ apply plugin: 'java-library' jar { - baseName 'besu-kvstore' + archiveBaseName = 'besu-kvstore' manifest { attributes( - 'Specification-Title': baseName, + 'Specification-Title': archiveBaseName, 'Specification-Version': project.version, - 'Implementation-Title': baseName, + 'Implementation-Title': archiveBaseName, 'Implementation-Version': calculateVersion() ) } @@ -40,7 +40,7 @@ dependencies { implementation 'org.apache.tuweni:tuweni-bytes' implementation 'org.rocksdb:rocksdbjni' - runtime 'org.apache.logging.log4j:log4j-core' + runtimeOnly 'org.apache.logging.log4j:log4j-core' testImplementation project(':testutil') diff --git a/services/pipeline/build.gradle b/services/pipeline/build.gradle index 002a3b6cdb..1dc2cd1ba0 100644 --- a/services/pipeline/build.gradle +++ b/services/pipeline/build.gradle @@ -16,12 +16,12 @@ apply plugin: 'java-library' jar { - baseName 'besu-pipeline' + archiveBaseName = 'besu-pipeline' manifest { attributes( - 'Specification-Title': baseName, + 'Specification-Title': archiveBaseName, 'Specification-Version': project.version, - 'Implementation-Title': baseName, + 'Implementation-Title': archiveBaseName, 'Implementation-Version': calculateVersion() ) } @@ -36,7 +36,7 @@ dependencies { implementation 'com.google.guava:guava' implementation 'org.apache.logging.log4j:log4j-api' - runtime 'org.apache.logging.log4j:log4j-core' + runtimeOnly 'org.apache.logging.log4j:log4j-core' testImplementation 'junit:junit' testImplementation 'org.assertj:assertj-core' diff --git a/services/tasks/build.gradle b/services/tasks/build.gradle index 6cb1407c3d..93ab36e87a 100644 --- a/services/tasks/build.gradle +++ b/services/tasks/build.gradle @@ -16,12 +16,12 @@ apply plugin: 'java-library' jar { - baseName 'besu-tasks' + archiveBaseName = 'besu-tasks' manifest { attributes( - 'Specification-Title': baseName, + 'Specification-Title': archiveBaseName, 'Specification-Version': project.version, - 'Implementation-Title': baseName, + 'Implementation-Title': archiveBaseName, 'Implementation-Version': calculateVersion() ) } @@ -40,7 +40,7 @@ dependencies { implementation 'org.apache.logging.log4j:log4j-api' implementation 'org.apache.tuweni:tuweni-bytes' - runtime 'org.apache.logging.log4j:log4j-core' + runtimeOnly 'org.apache.logging.log4j:log4j-core' testImplementation 'junit:junit' testImplementation 'org.assertj:assertj-core' diff --git a/testutil/build.gradle b/testutil/build.gradle index 8dffe2072c..72aa1b1624 100644 --- a/testutil/build.gradle +++ b/testutil/build.gradle @@ -16,12 +16,12 @@ apply plugin: 'java-library' jar { - baseName 'besu-util-test' + archiveBaseName = 'besu-util-test' manifest { attributes( - 'Specification-Title': baseName, + 'Specification-Title': archiveBaseName, 'Specification-Version': project.version, - 'Implementation-Title': baseName, + 'Implementation-Title': archiveBaseName, 'Implementation-Version': calculateVersion() ) } diff --git a/util/build.gradle b/util/build.gradle index 8a386f2a4a..5f149018ec 100644 --- a/util/build.gradle +++ b/util/build.gradle @@ -16,27 +16,28 @@ apply plugin: 'java-library' jar { - baseName 'besu-util' + archiveBaseName = 'besu-util' manifest { attributes( - 'Specification-Title': baseName, + 'Specification-Title': archiveBaseName, 'Specification-Version': project.version, - 'Implementation-Title': baseName, + 'Implementation-Title': archiveBaseName, 'Implementation-Version': calculateVersion() ) } } dependencies { + api 'org.apache.logging.log4j:log4j-api' + implementation project(':plugin-api') implementation 'com.google.guava:guava' implementation 'io.vertx:vertx-core' - implementation 'org.apache.logging.log4j:log4j-api' implementation 'org.apache.tuweni:tuweni-bytes' implementation 'org.apache.tuweni:tuweni-units' - runtime 'org.apache.logging.log4j:log4j-core' + runtimeOnly 'org.apache.logging.log4j:log4j-core' testImplementation 'junit:junit' testImplementation 'org.assertj:assertj-core'