Skip to content

Commit

Permalink
Create and publish Besu BOM (Bill of Materials)
Browse files Browse the repository at this point in the history
Signed-off-by: Fabio Di Fabio <[email protected]>
  • Loading branch information
fab-10 committed Sep 24, 2024
1 parent 04ba15a commit cfcb1ea
Show file tree
Hide file tree
Showing 8 changed files with 612 additions and 435 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
### Additions and Improvements
- Remove privacy test classes support [#7569](https://github.com/hyperledger/besu/pull/7569)
- Add Blob Transaction Metrics [#7622](https://github.com/hyperledger/besu/pull/7622)
- Create and publish Besu BOM (Bill of Materials) [#7615](https://github.com/hyperledger/besu/pull/7615)

### Bug fixes
- Fix mounted data path directory permissions for besu user [#7575](https://github.com/hyperledger/besu/pull/7575)
Expand Down
15 changes: 10 additions & 5 deletions acceptance-tests/tests/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ task acceptanceTest(type: Test) {
setSystemProperties(test.getSystemProperties())
systemProperty 'acctests.runBesuAsProcess', 'true'
systemProperty 'java.security.properties', "${buildDir}/resources/test/acceptanceTesting.security"
mustRunAfter rootProject.subprojects*.test
def javaProjects = rootProject.subprojects - project(':platform')
mustRunAfter javaProjects.test
description = 'Runs ALL Besu acceptance tests (mainnet and non-mainnet).'
group = 'verification'

Expand Down Expand Up @@ -135,7 +136,8 @@ task acceptanceTestNotPrivacy(type: Test) {
setSystemProperties(test.getSystemProperties())
systemProperty 'acctests.runBesuAsProcess', 'true'
systemProperty 'java.security.properties', "${buildDir}/resources/test/acceptanceTesting.security"
mustRunAfter rootProject.subprojects*.test
def javaProjects = rootProject.subprojects - project(':platform')
mustRunAfter javaProjects.test
description = 'Runs MAINNET Besu acceptance tests (excluding specific non-mainnet suites).'
group = 'verification'

Expand Down Expand Up @@ -163,7 +165,8 @@ task acceptanceTestCliqueBft(type: Test) {
setSystemProperties(test.getSystemProperties())
systemProperty 'acctests.runBesuAsProcess', 'true'
systemProperty 'java.security.properties', "${buildDir}/resources/test/acceptanceTesting.security"
mustRunAfter rootProject.subprojects*.test
def javaProjects = rootProject.subprojects - project(':platform')
mustRunAfter javaProjects.test
description = 'Runs Clique and BFT Besu acceptance tests.'
group = 'verification'

Expand Down Expand Up @@ -192,7 +195,8 @@ task acceptanceTestBftSoak(type: Test) {
// Set to any time > 60 minutes to run the soak test for longer
// systemProperty 'acctests.soakTimeMins', '120'
systemProperty 'java.security.properties', "${buildDir}/resources/test/acceptanceTesting.security"
mustRunAfter rootProject.subprojects*.test
def javaProjects = rootProject.subprojects - project(':platform')
mustRunAfter javaProjects.test
description = 'Runs BFT soak test.'
group = 'verification'

Expand All @@ -219,7 +223,8 @@ task acceptanceTestPermissioning(type: Test) {
setSystemProperties(test.getSystemProperties())
systemProperty 'acctests.runBesuAsProcess', 'true'
systemProperty 'java.security.properties', "${buildDir}/resources/test/acceptanceTesting.security"
mustRunAfter rootProject.subprojects*.test
def javaProjects = rootProject.subprojects - project(':platform')
mustRunAfter javaProjects.test
description = 'Runs Permissioning Besu acceptance tests.'
group = 'verification'

Expand Down
34 changes: 22 additions & 12 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ plugins {
id 'com.github.ben-manes.versions' version '0.51.0'
id 'com.github.jk1.dependency-license-report' version '2.9'
id 'com.jfrog.artifactory' version '5.2.5'
id 'io.spring.dependency-management' version '1.1.6'
id 'me.champeau.jmh' version '0.7.2' apply false
id 'net.ltgt.errorprone' version '4.0.1'
id 'maven-publish'
Expand Down Expand Up @@ -118,12 +117,10 @@ licenseReport {
]
}

allprojects {
configure(allprojects - project(':platform')) {
apply plugin: 'java-library'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'jacoco'
apply plugin: 'net.ltgt.errorprone'
apply from: "${rootDir}/gradle/versions.gradle"

version = calculateVersion()

Expand Down Expand Up @@ -183,6 +180,12 @@ allprojects {
}

dependencies {
api platform(project(':platform'))

annotationProcessor(platform(project(':platform')))

testAnnotationProcessor(platform(project(':platform')))

components.all(BouncyCastleCapability)
errorprone 'com.google.errorprone:error_prone_core'
// https://github.com/hyperledger/besu-errorprone-checks/
Expand Down Expand Up @@ -439,14 +442,16 @@ task checkMavenCoordinateCollisions {
doLast {
def coordinates = [:]
getAllprojects().forEach {
if (it.properties.containsKey('publishing') && it.jar?.enabled) {
def coordinate = it.publishing?.publications[0].coordinates
if (coordinate.toString().startsWith("org") && coordinates.containsKey(coordinate)) {
throw new GradleException("Duplicate maven coordinates detected, ${coordinate} is used by " +
"both ${coordinates[coordinate]} and ${it.path}.\n" +
"Please add a `publishing` script block to one or both subprojects.")
if (it.properties.containsKey('publishing')) {
if(!it.properties.containsKey('jar') || it.jar.enabled) {
def coordinate = it.publishing?.publications[0].coordinates
if (coordinate.toString().startsWith("org") && coordinates.containsKey(coordinate)) {
throw new GradleException("Duplicate maven coordinates detected, ${coordinate} is used by " +
"both ${coordinates[coordinate]} and ${it.path}.\n" +
"Please add a `publishing` script block to one or both subprojects.")
}
coordinates[coordinate] = it.path
}
coordinates[coordinate] = it.path
}
}
}
Expand Down Expand Up @@ -594,7 +599,9 @@ subprojects {


configurations {
testSupportAnnotationProcessor.extendsFrom annotationProcessor
testSupportImplementation.extendsFrom implementation
integrationTestAnnotationProcessor.extendsFrom annotationProcessor
integrationTestImplementation.extendsFrom implementation
testSupportArtifacts
}
Expand All @@ -619,7 +626,10 @@ subprojects {
duplicateClassesStrategy = DuplicatesStrategy.WARN
}

dependencies { jmh 'org.slf4j:slf4j-api' }
dependencies {
jmhAnnotationProcessor(platform(project(':platform')))
jmh 'org.slf4j:slf4j-api'
}
}

// making sure assemble task invokes integration test compile
Expand Down
1 change: 1 addition & 0 deletions ethereum/referencetests/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*/

configurations {
referenceTestAnnotationProcessor.extendsFrom testAnnotationProcessor
// we need this because referenceTestImplementation defaults to 'canBeResolved=false'.
tarConfig.extendsFrom referenceTestImplementation
tarConfig {
Expand Down
Loading

0 comments on commit cfcb1ea

Please sign in to comment.