diff --git a/build.gradle b/build.gradle index c7d93282c..02e645a30 100644 --- a/build.gradle +++ b/build.gradle @@ -44,9 +44,7 @@ allprojects { '-Xlint:deprecation', ]) if (!allowCompilationWarnings) { - options.compilerArgs.addAll([ - '-Werror' - ]) + options.compilerArgs.addAll(['-Werror']) } if (!project.path.contains("testing-tools")) { @@ -110,6 +108,13 @@ allprojects { ktlint(libs.versions.ktlint.get().toString()).setEditorConfigPath("$rootDir/.editorconfig") } } + // spotless check applied to build.gradle (groovy) files + groovyGradle { + target '**/*.gradle' + greclipse() + indentWithSpaces(2) + endWithNewline() + } } } } @@ -143,8 +148,15 @@ dockerCompose { // "l1-blockscout", // "l2-blockscout" ] - composeAdditionalArgs = ["--profile", "l1", "--profile", "l2"] - useComposeFiles = ["${project.rootDir.path}/docker/compose.yml"] + composeAdditionalArgs = [ + "--profile", + "l1", + "--profile", + "l2" + ] + useComposeFiles = [ + "${project.rootDir.path}/docker/compose.yml" + ] waitForHealthyStateTimeout = Duration.ofMinutes(3) waitForTcpPorts = false removeOrphans = true @@ -157,10 +169,10 @@ dockerCompose { } localStackPostgresDbOnly { - startedServices = [ - "postgres" + startedServices = ["postgres"] + useComposeFiles = [ + "${project.rootDir.path}/docker/compose.yml" ] - useComposeFiles = ["${project.rootDir.path}/docker/compose.yml"] waitForHealthyStateTimeout = Duration.ofMinutes(3) waitForTcpPorts = true removeOrphans = true @@ -183,8 +195,17 @@ dockerCompose { // "l1-blockscout", // "l2-blockscout" ] - composeAdditionalArgs = ["--profile", "l1", "--profile", "l2", "--profile", "staterecover"] - useComposeFiles = ["${project.rootDir.path}/docker/compose.yml"] + composeAdditionalArgs = [ + "--profile", + "l1", + "--profile", + "l2", + "--profile", + "staterecover" + ] + useComposeFiles = [ + "${project.rootDir.path}/docker/compose.yml" + ] waitForHealthyStateTimeout = Duration.ofMinutes(3) waitForTcpPorts = false removeOrphans = true diff --git a/buildSrc/src/main/groovy/net.consensys.zkevm.kotlin-application-conventions.gradle b/buildSrc/src/main/groovy/net.consensys.zkevm.kotlin-application-conventions.gradle index 5e3856ee0..e76b16c1d 100644 --- a/buildSrc/src/main/groovy/net.consensys.zkevm.kotlin-application-conventions.gradle +++ b/buildSrc/src/main/groovy/net.consensys.zkevm.kotlin-application-conventions.gradle @@ -3,9 +3,9 @@ */ plugins { - // Apply the common convention plugin for shared build configuration between library and application projects. - id 'net.consensys.zkevm.kotlin-common-conventions' + // Apply the common convention plugin for shared build configuration between library and application projects. + id 'net.consensys.zkevm.kotlin-common-conventions' - // Apply the application plugin to add support for building a CLI application in Java. - id 'application' + // Apply the application plugin to add support for building a CLI application in Java. + id 'application' } diff --git a/buildSrc/src/main/groovy/net.consensys.zkevm.kotlin-library-conventions.gradle b/buildSrc/src/main/groovy/net.consensys.zkevm.kotlin-library-conventions.gradle index cb05f69b8..11b4ef780 100644 --- a/buildSrc/src/main/groovy/net.consensys.zkevm.kotlin-library-conventions.gradle +++ b/buildSrc/src/main/groovy/net.consensys.zkevm.kotlin-library-conventions.gradle @@ -1,4 +1,4 @@ plugins { - id 'net.consensys.zkevm.kotlin-common-conventions' - id 'java-library' + id 'net.consensys.zkevm.kotlin-common-conventions' + id 'java-library' } diff --git a/buildSrc/src/main/groovy/net.consensys.zkevm.linea-native-libs-helper.gradle b/buildSrc/src/main/groovy/net.consensys.zkevm.linea-native-libs-helper.gradle index be2fc0333..1cfd8718f 100644 --- a/buildSrc/src/main/groovy/net.consensys.zkevm.linea-native-libs-helper.gradle +++ b/buildSrc/src/main/groovy/net.consensys.zkevm.linea-native-libs-helper.gradle @@ -5,8 +5,8 @@ import java.time.Duration import java.time.Instant void downloadFileUsingWget( - String url, - String outputFilePath + String url, + String outputFilePath ) { println("Downloading ${url} into ${outputFilePath}") @@ -31,9 +31,9 @@ ext.architectureResourceDirMapping = [ ] private String downloadAssetIfNotPresent( - String libsZipUrl, - String releaseTag, - String outputDir + String libsZipUrl, + String releaseTag, + String outputDir ) { def fileName = releaseTag + ".zip" def outputFilePath = Path.of(outputDir).resolve(fileName) @@ -55,7 +55,7 @@ private String downloadAssetIfNotPresent( } def getBinaryResourceFolder( - String libFile + String libFile ) { def destResource = architectureResourceDirMapping.find { libFile.contains(it.key.toString()) @@ -68,8 +68,8 @@ def getBinaryResourceFolder( } def getBinaryResourceFileName( - String libFile, - String libName + String libFile, + String libName ) { def versionPattern = ~/v\d+\.\d+\.\d+/ def matcher = versionPattern.matcher(libFile) @@ -82,9 +82,9 @@ def getBinaryResourceFileName( } def lazyUnzipWithRetry( - Path zipFile, - Path outputDir = zipFile.parent.resolve(zipFile.getFileName().toString().replaceFirst("\\.zip", "")).toString(), - Duration timeout + Path zipFile, + Path outputDir = zipFile.parent.resolve(zipFile.getFileName().toString().replaceFirst("\\.zip", "")).toString(), + Duration timeout ) { if (outputDir.toFile().exists()) { println("Skipping unzip, directory already exists at ${outputDir.toString()}") @@ -114,51 +114,47 @@ def lazyUnzipWithRetry( } def extractLibToResources( - Path zipFile, - Path outputUnzipDir, - String libName + Path zipFile, + Path outputUnzipDir, + String libName ) { lazyUnzipWithRetry(zipFile, outputUnzipDir, Duration.ofSeconds(60)) fileTree(outputUnzipDir.toFile()) - .filter { it.name.contains(libName) && (it.name.endsWith(".so") || it.name.endsWith(".dylib")) } - .each { File file -> - def javaResourcesLibDir = getBinaryResourceFolder(file.name) - def destResourceFileName = getBinaryResourceFileName(file.name, libName) - def destResourcesPath = Path.of(project.layout.projectDirectory - .file("src/main/resources/${javaResourcesLibDir}").asFile.absolutePath) - def destFilePath = destResourcesPath.resolve(destResourceFileName) - - if (destFilePath.toFile().exists()) { - println("Skipping: ${file} already found at ${destResourcesPath}/${destResourceFileName}") - } else { - println("Copying ${file} to ${destResourcesPath}/${destResourceFileName}") - } - copy { - from file - into destResourcesPath - rename { - destResourceFileName + .filter { it.name.contains(libName) && (it.name.endsWith(".so") || it.name.endsWith(".dylib")) } + .each { File file -> + def javaResourcesLibDir = getBinaryResourceFolder(file.name) + def destResourceFileName = getBinaryResourceFileName(file.name, libName) + def destResourcesPath = Path.of(project.layout.projectDirectory + .file("src/main/resources/${javaResourcesLibDir}").asFile.absolutePath) + def destFilePath = destResourcesPath.resolve(destResourceFileName) + + if (destFilePath.toFile().exists()) { + println("Skipping: ${file} already found at ${destResourcesPath}/${destResourceFileName}") + } else { + println("Copying ${file} to ${destResourcesPath}/${destResourceFileName}") + } + copy { + from file + into destResourcesPath + rename { + destResourceFileName + } } } - } } def downloadZipReleaseAndExtractToResources( - String libsZipUrl, - String releaseTag, - String libName, - String outputDir + String libsZipUrl, + String releaseTag, + String libName, + String outputDir ) { def zipFile = downloadAssetIfNotPresent(libsZipUrl, releaseTag, outputDir) def outputUnzipDir = Path.of(outputDir).resolve(releaseTag) extractLibToResources(Path.of(zipFile), outputUnzipDir, libName) } -ext.fetchLibFromZip = { - String libsZipUrl, - String libName, - String outputDir - -> - def releaseTag = libsZipUrl.split("/").last().replace(".zip", "") - downloadZipReleaseAndExtractToResources(libsZipUrl, releaseTag, libName, outputDir) +ext.fetchLibFromZip = { String libsZipUrl, String libName, String outputDir -> + def releaseTag = libsZipUrl.split("/").last().replace(".zip", "") + downloadZipReleaseAndExtractToResources(libsZipUrl, releaseTag, libName, outputDir) } diff --git a/coordinator/app/build.gradle b/coordinator/app/build.gradle index 4aa322845..bfb7f6f55 100644 --- a/coordinator/app/build.gradle +++ b/coordinator/app/build.gradle @@ -79,10 +79,10 @@ jar { archiveBaseName = 'coordinator' manifest { attributes( - 'Class-Path': project.configurations.runtimeClasspath.collect { it.getName() }.findAll { it.endsWith('jar') }.join(' '), - 'Main-Class': 'net.consensys.zkevm.coordinator.app.CoordinatorAppMain', - 'Multi-Release': 'true' - ) + 'Class-Path': project.configurations.runtimeClasspath.collect { it.getName() }.findAll { it.endsWith('jar') }.join(' '), + 'Main-Class': 'net.consensys.zkevm.coordinator.app.CoordinatorAppMain', + 'Multi-Release': 'true' + ) } } @@ -103,9 +103,18 @@ run { "-Dvertx.configurationFile=config/coordinator/vertx-options.json", "-Dlog4j2.configurationFile=config/coordinator/log4j2-dev.xml" ] + System.properties.entrySet() - .findAll { it.key.startsWith("config") } - .collect { "-D${it.key}=${it.value}" } - args = ["--traces-limits", "config/common/traces-limits-v1.toml", "--smart-contract-errors", "config/common/smart-contract-errors.toml", "--gas-price-cap-time-of-day-multipliers", "config/common/gas-price-cap-time-of-day-multipliers.toml", "config/coordinator/coordinator-docker.config.toml", "config/coordinator/coordinator-local-dev.config.overrides.toml"] + .findAll { it.key.startsWith("config") } + .collect { "-D${it.key}=${it.value}" } + args = [ + "--traces-limits", + "config/common/traces-limits-v1.toml", + "--smart-contract-errors", + "config/common/smart-contract-errors.toml", + "--gas-price-cap-time-of-day-multipliers", + "config/common/gas-price-cap-time-of-day-multipliers.toml", + "config/coordinator/coordinator-docker.config.toml", + "config/coordinator/coordinator-local-dev.config.overrides.toml" + ] } test { diff --git a/coordinator/clients/prover-client/file-based-client/build.gradle b/coordinator/clients/prover-client/file-based-client/build.gradle index d16051ab8..8b865ae80 100644 --- a/coordinator/clients/prover-client/file-based-client/build.gradle +++ b/coordinator/clients/prover-client/file-based-client/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'net.consensys.zkevm.kotlin-library-conventions' + id 'net.consensys.zkevm.kotlin-library-conventions' } dependencies { diff --git a/coordinator/clients/prover-client/serialization/build.gradle b/coordinator/clients/prover-client/serialization/build.gradle index 831635f59..adb6b4a2b 100644 --- a/coordinator/clients/prover-client/serialization/build.gradle +++ b/coordinator/clients/prover-client/serialization/build.gradle @@ -3,14 +3,10 @@ plugins { } dependencies { - api "com.fasterxml.jackson.core:jackson-annotations:${libs.versions.jackson.get()}" - api "com.fasterxml.jackson.core:jackson-databind:${libs.versions.jackson.get()}" - api "com.fasterxml.jackson.module:jackson-module-kotlin:${libs.versions.jackson.get()}" - api("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:${libs.versions.jackson.get()}") - api(project(":jvm-libs:generic:extensions:kotlin")) - api(project(":coordinator:core")) -} - -test { - useJUnitPlatform() + api "com.fasterxml.jackson.core:jackson-annotations:${libs.versions.jackson.get()}" + api "com.fasterxml.jackson.core:jackson-databind:${libs.versions.jackson.get()}" + api "com.fasterxml.jackson.module:jackson-module-kotlin:${libs.versions.jackson.get()}" + api("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:${libs.versions.jackson.get()}") + api(project(":jvm-libs:generic:extensions:kotlin")) + api(project(":coordinator:core")) } diff --git a/coordinator/clients/shomei-client/build.gradle b/coordinator/clients/shomei-client/build.gradle index 38206beb8..7117d606d 100644 --- a/coordinator/clients/shomei-client/build.gradle +++ b/coordinator/clients/shomei-client/build.gradle @@ -3,21 +3,17 @@ plugins { } dependencies { - implementation project(':coordinator:core') - implementation project(':jvm-libs:generic:extensions:futures') - implementation project(':jvm-libs:generic:json-rpc') - implementation project(':jvm-libs:linea:metrics:micrometer') - implementation project(':jvm-libs:linea:core:traces') - implementation project(":jvm-libs:linea:teku-execution-client") - implementation "tech.pegasys.teku.internal:unsigned:${libs.versions.teku.get()}" + implementation project(':coordinator:core') + implementation project(':jvm-libs:generic:extensions:futures') + implementation project(':jvm-libs:generic:json-rpc') + implementation project(':jvm-libs:linea:metrics:micrometer') + implementation project(':jvm-libs:linea:core:traces') + implementation project(":jvm-libs:linea:teku-execution-client") + implementation "tech.pegasys.teku.internal:unsigned:${libs.versions.teku.get()}" - api "io.vertx:vertx-core" + api "io.vertx:vertx-core" - testImplementation 'org.junit.jupiter:junit-jupiter' - testImplementation "io.vertx:vertx-junit5" - testImplementation "com.github.tomakehurst:wiremock-jre8:${libs.versions.wiremock.get()}" -} - -test { - useJUnitPlatform() + testImplementation 'org.junit.jupiter:junit-jupiter' + testImplementation "io.vertx:vertx-junit5" + testImplementation "com.github.tomakehurst:wiremock-jre8:${libs.versions.wiremock.get()}" } diff --git a/coordinator/clients/web3signer-client/build.gradle b/coordinator/clients/web3signer-client/build.gradle index 6349f6f38..5fa4fe993 100644 --- a/coordinator/clients/web3signer-client/build.gradle +++ b/coordinator/clients/web3signer-client/build.gradle @@ -3,7 +3,7 @@ */ plugins { - id 'net.consensys.zkevm.kotlin-library-conventions' + id 'net.consensys.zkevm.kotlin-library-conventions' } dependencies { diff --git a/coordinator/core/build.gradle b/coordinator/core/build.gradle index 024428f9c..19a0c1b0f 100644 --- a/coordinator/core/build.gradle +++ b/coordinator/core/build.gradle @@ -1,6 +1,6 @@ plugins { - id 'net.consensys.zkevm.kotlin-library-conventions' - id 'java-test-fixtures' + id 'net.consensys.zkevm.kotlin-library-conventions' + id 'java-test-fixtures' } dependencies { @@ -39,7 +39,3 @@ dependencies { testImplementation(testFixtures(project(':jvm-libs:generic:extensions:kotlin'))) testImplementation("io.vertx:vertx-junit5") } - -test { - useJUnitPlatform() -} diff --git a/coordinator/ethereum/blob-submitter/build.gradle b/coordinator/ethereum/blob-submitter/build.gradle index 7775de97f..d616229b9 100644 --- a/coordinator/ethereum/blob-submitter/build.gradle +++ b/coordinator/ethereum/blob-submitter/build.gradle @@ -37,10 +37,6 @@ dependencies { testImplementation("org.apache.logging.log4j:log4j-slf4j2-impl:2.20.0") } -test { - useJUnitPlatform() -} - sourceSets { integrationTest { kotlin { @@ -52,30 +48,27 @@ sourceSets { } } -task integrationTest(type: Test) { - test -> - description = "Runs integration tests." - group = "verification" - useJUnitPlatform() +task integrationTest(type: Test) { test -> + description = "Runs integration tests." + group = "verification" + useJUnitPlatform() - classpath = sourceSets.integrationTest.runtimeClasspath - testClassesDirs = sourceSets.integrationTest.output.classesDirs + classpath = sourceSets.integrationTest.runtimeClasspath + testClassesDirs = sourceSets.integrationTest.output.classesDirs - dependsOn(":localStackComposeUp") + dependsOn(":localStackComposeUp") - testLogging { - events TestLogEvent.FAILED, + testLogging { + events TestLogEvent.FAILED, TestLogEvent.SKIPPED, TestLogEvent.STANDARD_ERROR, TestLogEvent.STARTED, TestLogEvent.PASSED - exceptionFormat TestExceptionFormat.FULL - showCauses true - showExceptions true - showStackTraces true - // set showStandardStreams if you need to see test logs - showStandardStreams false - } + exceptionFormat TestExceptionFormat.FULL + showCauses true + showExceptions true + showStackTraces true + // set showStandardStreams if you need to see test logs + showStandardStreams false + } } - - diff --git a/coordinator/ethereum/common/build.gradle b/coordinator/ethereum/common/build.gradle index 5c6e803de..48d22142f 100644 --- a/coordinator/ethereum/common/build.gradle +++ b/coordinator/ethereum/common/build.gradle @@ -9,7 +9,3 @@ dependencies { exclude group: "org.slf4j", module: "slf4j-nop" } } - -test { - useJUnitPlatform() -} diff --git a/coordinator/ethereum/finalization-monitor/build.gradle b/coordinator/ethereum/finalization-monitor/build.gradle index 4e1e6605b..9ab211d81 100644 --- a/coordinator/ethereum/finalization-monitor/build.gradle +++ b/coordinator/ethereum/finalization-monitor/build.gradle @@ -21,7 +21,3 @@ dependencies { testImplementation(testFixtures(project(":jvm-libs:generic:extensions:kotlin"))) testImplementation("io.vertx:vertx-junit5") } - -test { - useJUnitPlatform() -} diff --git a/coordinator/ethereum/gas-pricing/build.gradle b/coordinator/ethereum/gas-pricing/build.gradle index 6261396bb..86f80e9ef 100644 --- a/coordinator/ethereum/gas-pricing/build.gradle +++ b/coordinator/ethereum/gas-pricing/build.gradle @@ -11,7 +11,3 @@ dependencies { testFixturesImplementation "tech.pegasys.teku.internal:async:${libs.versions.teku.get()}" testFixturesImplementation project(":coordinator:core") } - -test { - useJUnitPlatform() -} diff --git a/coordinator/ethereum/gas-pricing/dynamic-cap/build.gradle b/coordinator/ethereum/gas-pricing/dynamic-cap/build.gradle index 8add5a634..aa17f5851 100644 --- a/coordinator/ethereum/gas-pricing/dynamic-cap/build.gradle +++ b/coordinator/ethereum/gas-pricing/dynamic-cap/build.gradle @@ -12,7 +12,3 @@ dependencies { testImplementation("io.vertx:vertx-junit5") } - -test { - useJUnitPlatform() -} diff --git a/coordinator/ethereum/gas-pricing/static-cap/build.gradle b/coordinator/ethereum/gas-pricing/static-cap/build.gradle index 499fbf50b..59ec63d5f 100644 --- a/coordinator/ethereum/gas-pricing/static-cap/build.gradle +++ b/coordinator/ethereum/gas-pricing/static-cap/build.gradle @@ -32,19 +32,12 @@ sourceSets { } } -task integrationTest(type: Test) { - test -> - description = "Runs integration tests." - group = "verification" - useJUnitPlatform() - - classpath = sourceSets.integrationTest.runtimeClasspath - testClassesDirs = sourceSets.integrationTest.output.classesDirs - dependsOn(":localStackComposeUp") -} - - - -test { +task integrationTest(type: Test) { test -> + description = "Runs integration tests." + group = "verification" useJUnitPlatform() + + classpath = sourceSets.integrationTest.runtimeClasspath + testClassesDirs = sourceSets.integrationTest.output.classesDirs + dependsOn(":localStackComposeUp") } diff --git a/coordinator/ethereum/message-anchoring/build.gradle b/coordinator/ethereum/message-anchoring/build.gradle index b6c8640d6..e39da1986 100644 --- a/coordinator/ethereum/message-anchoring/build.gradle +++ b/coordinator/ethereum/message-anchoring/build.gradle @@ -34,13 +34,12 @@ sourceSets { } } -task integrationTest(type: Test) { - test -> - description = "Runs integration tests." - group = "verification" - useJUnitPlatform() +task integrationTest(type: Test) { test -> + description = "Runs integration tests." + group = "verification" + useJUnitPlatform() - classpath = sourceSets.integrationTest.runtimeClasspath - testClassesDirs = sourceSets.integrationTest.output.classesDirs - dependsOn(":localStackComposeUp") + classpath = sourceSets.integrationTest.runtimeClasspath + testClassesDirs = sourceSets.integrationTest.output.classesDirs + dependsOn(":localStackComposeUp") } diff --git a/coordinator/ethereum/test-utils/build.gradle b/coordinator/ethereum/test-utils/build.gradle index 1b9690d99..68156f416 100644 --- a/coordinator/ethereum/test-utils/build.gradle +++ b/coordinator/ethereum/test-utils/build.gradle @@ -34,27 +34,26 @@ sourceSets { } } -task integrationTest(type: Test) { - test -> - description = "Runs integration tests." - group = "verification" - useJUnitPlatform() +task integrationTest(type: Test) { test -> + description = "Runs integration tests." + group = "verification" + useJUnitPlatform() - classpath = sourceSets.integrationTest.runtimeClasspath - testClassesDirs = sourceSets.integrationTest.output.classesDirs + classpath = sourceSets.integrationTest.runtimeClasspath + testClassesDirs = sourceSets.integrationTest.output.classesDirs - dependsOn(":localStackComposeUp") - testLogging { - events TestLogEvent.FAILED, + dependsOn(":localStackComposeUp") + testLogging { + events TestLogEvent.FAILED, TestLogEvent.SKIPPED, TestLogEvent.STANDARD_ERROR, TestLogEvent.STARTED, TestLogEvent.PASSED - exceptionFormat TestExceptionFormat.FULL - showCauses true - showExceptions true - showStackTraces true - // set showStandardStreams if you need to see test logs - showStandardStreams true - } + exceptionFormat TestExceptionFormat.FULL + showCauses true + showExceptions true + showStackTraces true + // set showStandardStreams if you need to see test logs + showStandardStreams true + } } diff --git a/coordinator/persistence/aggregation/build.gradle b/coordinator/persistence/aggregation/build.gradle index 69228d19d..0a23f4a60 100644 --- a/coordinator/persistence/aggregation/build.gradle +++ b/coordinator/persistence/aggregation/build.gradle @@ -30,16 +30,13 @@ sourceSets { } } -task integrationTest(type: Test) { - test -> - description = "Runs integration tests." - group = "verification" - useJUnitPlatform() +task integrationTest(type: Test) { test -> + description = "Runs integration tests." + group = "verification" + useJUnitPlatform() - classpath = sourceSets.integrationTest.runtimeClasspath - testClassesDirs = sourceSets.integrationTest.output.classesDirs + classpath = sourceSets.integrationTest.runtimeClasspath + testClassesDirs = sourceSets.integrationTest.output.classesDirs - dependsOn(":localStackPostgresDbOnlyComposeUp") + dependsOn(":localStackPostgresDbOnlyComposeUp") } - - diff --git a/coordinator/persistence/batch/build.gradle b/coordinator/persistence/batch/build.gradle index 9a28a9ec6..7fcf0a811 100644 --- a/coordinator/persistence/batch/build.gradle +++ b/coordinator/persistence/batch/build.gradle @@ -30,16 +30,13 @@ sourceSets { } } -task integrationTest(type: Test) { - test -> - description = "Runs integration tests." - group = "verification" - useJUnitPlatform() +task integrationTest(type: Test) { test -> + description = "Runs integration tests." + group = "verification" + useJUnitPlatform() - classpath = sourceSets.integrationTest.runtimeClasspath - testClassesDirs = sourceSets.integrationTest.output.classesDirs + classpath = sourceSets.integrationTest.runtimeClasspath + testClassesDirs = sourceSets.integrationTest.output.classesDirs - dependsOn(":localStackPostgresDbOnlyComposeUp") + dependsOn(":localStackPostgresDbOnlyComposeUp") } - - diff --git a/coordinator/persistence/blob/build.gradle b/coordinator/persistence/blob/build.gradle index 89e06d63b..8ad52ed6e 100644 --- a/coordinator/persistence/blob/build.gradle +++ b/coordinator/persistence/blob/build.gradle @@ -33,26 +33,24 @@ sourceSets { } } -task integrationTest(type: Test) { - test -> - testLogging { - events TestLogEvent.FAILED, +task integrationTest(type: Test) { test -> + testLogging { + events TestLogEvent.FAILED, TestLogEvent.SKIPPED, TestLogEvent.STANDARD_ERROR, TestLogEvent.STANDARD_OUT - exceptionFormat TestExceptionFormat.FULL - showCauses true - showExceptions true - showStackTraces true - showStandardStreams false - } - description = "Runs integration tests." - group = "verification" - useJUnitPlatform() + exceptionFormat TestExceptionFormat.FULL + showCauses true + showExceptions true + showStackTraces true + showStandardStreams false + } + description = "Runs integration tests." + group = "verification" + useJUnitPlatform() - classpath = sourceSets.integrationTest.runtimeClasspath - testClassesDirs = sourceSets.integrationTest.output.classesDirs + classpath = sourceSets.integrationTest.runtimeClasspath + testClassesDirs = sourceSets.integrationTest.output.classesDirs - dependsOn(":localStackPostgresDbOnlyComposeUp") + dependsOn(":localStackPostgresDbOnlyComposeUp") } - diff --git a/coordinator/persistence/db-common/build.gradle b/coordinator/persistence/db-common/build.gradle index 7ecf65d82..4cacebdef 100644 --- a/coordinator/persistence/db-common/build.gradle +++ b/coordinator/persistence/db-common/build.gradle @@ -25,14 +25,13 @@ sourceSets { } } -task integrationTest(type: Test) { - test -> - description = "Runs integration tests." - group = "verification" - useJUnitPlatform() +task integrationTest(type: Test) { test -> + description = "Runs integration tests." + group = "verification" + useJUnitPlatform() - classpath = sourceSets.integrationTest.runtimeClasspath - testClassesDirs = sourceSets.integrationTest.output.classesDirs + classpath = sourceSets.integrationTest.runtimeClasspath + testClassesDirs = sourceSets.integrationTest.output.classesDirs - dependsOn(":localStackComposeUp") + dependsOn(":localStackComposeUp") } diff --git a/coordinator/persistence/feehistory/build.gradle b/coordinator/persistence/feehistory/build.gradle index f4f7adbe5..2c7aa94a8 100644 --- a/coordinator/persistence/feehistory/build.gradle +++ b/coordinator/persistence/feehistory/build.gradle @@ -33,27 +33,24 @@ sourceSets { } } -task integrationTest(type: Test) { - test -> - testLogging { - events TestLogEvent.FAILED, +task integrationTest(type: Test) { test -> + testLogging { + events TestLogEvent.FAILED, TestLogEvent.SKIPPED, TestLogEvent.STANDARD_ERROR, TestLogEvent.STANDARD_OUT - exceptionFormat TestExceptionFormat.FULL - showCauses true - showExceptions true - showStackTraces true - showStandardStreams false - } - description = "Runs integration tests." - group = "verification" - useJUnitPlatform() + exceptionFormat TestExceptionFormat.FULL + showCauses true + showExceptions true + showStackTraces true + showStandardStreams false + } + description = "Runs integration tests." + group = "verification" + useJUnitPlatform() - classpath = sourceSets.integrationTest.runtimeClasspath - testClassesDirs = sourceSets.integrationTest.output.classesDirs + classpath = sourceSets.integrationTest.runtimeClasspath + testClassesDirs = sourceSets.integrationTest.output.classesDirs - dependsOn(":localStackComposeUp") + dependsOn(":localStackComposeUp") } - - diff --git a/coordinator/utilities/build.gradle b/coordinator/utilities/build.gradle index 5b4363f5b..54ea8e21b 100644 --- a/coordinator/utilities/build.gradle +++ b/coordinator/utilities/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'net.consensys.zkevm.kotlin-library-conventions' + id 'net.consensys.zkevm.kotlin-library-conventions' } dependencies { @@ -16,7 +16,3 @@ dependencies { testImplementation "io.vertx:vertx-junit5" testImplementation testFixtures(project(':jvm-libs:generic:extensions:kotlin')) } - -test { - useJUnitPlatform() -} diff --git a/docker/compose-local-dev-traces-v2.overrides.yml b/docker/compose-local-dev-traces-v2.overrides.yml index ccd575ded..a31e32576 100644 --- a/docker/compose-local-dev-traces-v2.overrides.yml +++ b/docker/compose-local-dev-traces-v2.overrides.yml @@ -14,7 +14,7 @@ services: command: [ "sh", "/file-downloader.sh", "https://github.com/Consensys/linea-sequencer/releases/download/v0.8.0-rc6.1/linea-sequencer-v0.8.0-rc6.1.jar", "/linea-besu-sequencer" ] traces-node: - command: ['echo', 'forced exit as replaced by traces-node-v2'] + entrypoint: ['echo', 'forced exit as replaced by traces-node-v2'] traces-api: command: ['echo', 'forced exit as replaced by traces-node-v2'] diff --git a/finalized-tag-updater/build.gradle b/finalized-tag-updater/build.gradle index aff7c4a6a..93f922a19 100644 --- a/finalized-tag-updater/build.gradle +++ b/finalized-tag-updater/build.gradle @@ -20,11 +20,11 @@ shadowJar { } manifest { attributes( - 'Specification-Title': archiveBaseName, - 'Specification-Version': project.version, - 'Implementation-Title': archiveBaseName, - 'Implementation-Version': project.version, - ) + 'Specification-Title': archiveBaseName, + 'Specification-Version': project.version, + 'Implementation-Title': archiveBaseName, + 'Implementation-Version': project.version, + ) } } @@ -51,11 +51,12 @@ dependencies { tasks.register('copyShadowJarToLocalBesu', Copy) { def jarFileSuffix = "${project.version}" != 'unspecified' ? "${project.version}" : "all" - def jarFile = project.getLayout().buildDirectory.dir("libs").get() - .asFileTree - .filter { it.name.endsWith("-${jarFileSuffix}.jar") } - .singleFile - - from jarFile - into file("$rootDir/tmp/linea-besu-sequencer/plugins") + def jarFiles = project.getLayout().buildDirectory.dir("libs").get() + .asFileTree + .filter { it.name.endsWith("-${jarFileSuffix}.jar") } + .files + if (jarFiles.size() > 0) { + from jarFiles[0] + into file("$rootDir/tmp/linea-besu-sequencer/plugins") + } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 312656ad5..ede6c9b3d 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -2,7 +2,10 @@ docker = { id = "com.avast.gradle.docker-compose", version = "0.17.7" } web3j = { id = "org.web3j", version.ref = "web3j" } spotless = { id = "com.diffplug.spotless", version = "6.16.0" } -jreleaser = {id = "org.jreleaser", version = "1.13.1"} +jreleaser = {id = "org.jreleaser", version = "1.15.0"} + +[libraries] +jreleaser = { group = "org.jreleaser", name = "jreleaser-gradle-plugin", version = "1.15.0" } [versions] besu = "24.10.0" diff --git a/gradle/publishing.gradle b/gradle/publishing.gradle index 3992ce8d3..cd11839a8 100644 --- a/gradle/publishing.gradle +++ b/gradle/publishing.gradle @@ -1,5 +1,5 @@ apply plugin: 'maven-publish' -apply plugin: 'org.jreleaser' //, version: "1.13.1" +apply plugin: 'org.jreleaser' java { // necessary for maven publishing @@ -8,7 +8,7 @@ java { } def stagingDeployDir = rootProject.layout.buildDirectory.dir("staging-deploy") - .get().asFile.absolutePath.toString() + .get().asFile.absolutePath.toString() def _artifactId = project.hasProperty('artifactId') ? project.artifactId : project.name @@ -57,6 +57,14 @@ publishing { } } +task prePublishValidation { + doFirst { + if (project.description == null) { + throw new GradleScriptException("${project} will be published, but it doesn't have a description! Please add it!", null) + } + } +} + task createJreleaserOutputDir { doLast { // workaround for JRleaser poor support for multi-module projects @@ -66,6 +74,7 @@ task createJreleaserOutputDir { } } +jreleaserRelease.dependsOn(prePublishValidation) jreleaserRelease.dependsOn(createJreleaserOutputDir) diff --git a/jvm-libs/generic/build.gradle b/jvm-libs/generic/build.gradle new file mode 100644 index 000000000..ee1163c23 --- /dev/null +++ b/jvm-libs/generic/build.gradle @@ -0,0 +1,18 @@ +buildscript { + dependencies { + classpath(libs.jreleaser) + } +} + +plugins { + id 'net.consensys.zkevm.kotlin-library-minimal-conventions' +} + +subprojects { + def hasSourceFiles = it.fileTree(dir: 'src', includes: ['**/*.java', '**/*.kt']).files.size() > 0 + + group="${rootProject.group}.internal" + if (hasSourceFiles) { + it.apply from: rootProject.file("gradle/publishing.gradle") + } +} diff --git a/jvm-libs/generic/errors/build.gradle b/jvm-libs/generic/errors/build.gradle index 4e7f99b7b..b61f85e5f 100644 --- a/jvm-libs/generic/errors/build.gradle +++ b/jvm-libs/generic/errors/build.gradle @@ -1,3 +1,5 @@ plugins { id 'net.consensys.zkevm.kotlin-common-conventions' } + +description = "Utilities related to errors" diff --git a/jvm-libs/generic/extensions/futures/build.gradle b/jvm-libs/generic/extensions/futures/build.gradle index 8ca9b886b..ae64c1924 100644 --- a/jvm-libs/generic/extensions/futures/build.gradle +++ b/jvm-libs/generic/extensions/futures/build.gradle @@ -1,13 +1,15 @@ plugins { - id 'net.consensys.zkevm.kotlin-common-conventions' - id 'java-library' + id 'net.consensys.zkevm.kotlin-common-conventions' + id 'java-library' } +description = "Utilities related to futures used in Linea" + dependencies { implementation "io.vertx:vertx-core" testImplementation("io.vertx:vertx-junit5") } jar { - dependsOn configurations.runtimeClasspath + dependsOn configurations.runtimeClasspath } diff --git a/jvm-libs/generic/extensions/kotlin/build.gradle b/jvm-libs/generic/extensions/kotlin/build.gradle index 6ebb46c25..ac0b8cd38 100644 --- a/jvm-libs/generic/extensions/kotlin/build.gradle +++ b/jvm-libs/generic/extensions/kotlin/build.gradle @@ -3,9 +3,10 @@ plugins { id 'java-test-fixtures' } +description = "Basic Kotlin types extensions" + dependencies { api "org.jetbrains.kotlinx:kotlinx-datetime:${libs.versions.kotlinxDatetime.get()}" - testImplementation "io.tmio:tuweni-units:${libs.versions.tuweni.get()}" } jar { diff --git a/jvm-libs/generic/extensions/tuweni/build.gradle b/jvm-libs/generic/extensions/tuweni/build.gradle index abbc14918..128d3755e 100644 --- a/jvm-libs/generic/extensions/tuweni/build.gradle +++ b/jvm-libs/generic/extensions/tuweni/build.gradle @@ -2,6 +2,8 @@ plugins { id 'net.consensys.zkevm.kotlin-library-conventions' } +description = "Tuweni bytes utilities" + dependencies { api "io.tmio:tuweni-bytes:${libs.versions.tuweni.get()}" implementation(project(':jvm-libs:generic:extensions:kotlin')) diff --git a/jvm-libs/generic/http-rest/build.gradle b/jvm-libs/generic/http-rest/build.gradle index c6b8552bf..eb0c11e0e 100644 --- a/jvm-libs/generic/http-rest/build.gradle +++ b/jvm-libs/generic/http-rest/build.gradle @@ -2,6 +2,8 @@ plugins { id 'net.consensys.zkevm.kotlin-library-conventions' } +description = "HTTP REST utilities" + dependencies { implementation project(":jvm-libs:generic:errors") implementation project(':jvm-libs:generic:extensions:futures') @@ -15,7 +17,3 @@ dependencies { testImplementation "com.github.tomakehurst:wiremock-jre8:${libs.versions.wiremock.get()}" testImplementation "io.vertx:vertx-micrometer-metrics" } - -test { - useJUnitPlatform() -} diff --git a/jvm-libs/generic/json-rpc/build.gradle b/jvm-libs/generic/json-rpc/build.gradle index af5f59a91..e2e4c4337 100644 --- a/jvm-libs/generic/json-rpc/build.gradle +++ b/jvm-libs/generic/json-rpc/build.gradle @@ -1,8 +1,10 @@ plugins { - id 'net.consensys.zkevm.kotlin-library-conventions' - id 'java-library' + id 'net.consensys.zkevm.kotlin-library-conventions' + id 'java-library' } +description = "JSON RPC 2.0 utilities" + dependencies { implementation project(":jvm-libs:linea:metrics:micrometer") implementation project(":jvm-libs:generic:extensions:futures") @@ -28,5 +30,5 @@ dependencies { } jar { - dependsOn configurations.runtimeClasspath + dependsOn configurations.runtimeClasspath } diff --git a/jvm-libs/generic/logging/build.gradle b/jvm-libs/generic/logging/build.gradle index 938d26a7b..e230bf675 100644 --- a/jvm-libs/generic/logging/build.gradle +++ b/jvm-libs/generic/logging/build.gradle @@ -3,6 +3,8 @@ plugins { id 'java-library' } +description = "Logging utilities" + dependencies { implementation(project(':jvm-libs:generic:extensions:kotlin')) testImplementation "org.apache.logging.log4j:log4j-core-test:${libs.versions.log4j.get()}" diff --git a/jvm-libs/generic/persistence/db/build.gradle b/jvm-libs/generic/persistence/db/build.gradle index cfb4cc91a..1e139ce7c 100644 --- a/jvm-libs/generic/persistence/db/build.gradle +++ b/jvm-libs/generic/persistence/db/build.gradle @@ -3,6 +3,8 @@ plugins { id 'java-test-fixtures' } +description = "Vertx + Postgres backed persistence utilities" + dependencies { implementation(project(":jvm-libs:generic:extensions:futures")) implementation(project(":jvm-libs:generic:extensions:kotlin")) diff --git a/jvm-libs/generic/serialization/jackson/build.gradle b/jvm-libs/generic/serialization/jackson/build.gradle index 27f0c6a9d..ebc9b06b8 100644 --- a/jvm-libs/generic/serialization/jackson/build.gradle +++ b/jvm-libs/generic/serialization/jackson/build.gradle @@ -2,6 +2,8 @@ plugins { id 'net.consensys.zkevm.kotlin-library-conventions' } +description = "Jackson SerDe utilities" + dependencies { implementation(project(':jvm-libs:generic:extensions:kotlin')) api "com.fasterxml.jackson.core:jackson-annotations:${libs.versions.jackson.get()}" diff --git a/jvm-libs/generic/vertx-helper/build.gradle b/jvm-libs/generic/vertx-helper/build.gradle index 7e77bfca7..028cb499b 100644 --- a/jvm-libs/generic/vertx-helper/build.gradle +++ b/jvm-libs/generic/vertx-helper/build.gradle @@ -1,7 +1,9 @@ plugins { - id 'net.consensys.zkevm.kotlin-library-conventions' + id 'net.consensys.zkevm.kotlin-library-conventions' } +description = "Vertx utilities" + dependencies { implementation project(':jvm-libs:generic:extensions:kotlin') implementation project(':jvm-libs:generic:extensions:futures') @@ -22,4 +24,3 @@ dependencies { test { systemProperty "vertx.parameter.filename", "/vertx-options.json" } - diff --git a/jvm-libs/linea/blob-decompressor/build.gradle b/jvm-libs/linea/blob-decompressor/build.gradle index 2a085ddb9..576960d88 100644 --- a/jvm-libs/linea/blob-decompressor/build.gradle +++ b/jvm-libs/linea/blob-decompressor/build.gradle @@ -48,11 +48,11 @@ compileKotlin { task cleanResources(type: Delete) { fileTree(project.layout.projectDirectory.dir('src/main/resources')) - .filter { - it.name.endsWith(".so") || it.name.endsWith(".dll") || it.name.endsWith(".dylib") - }.each { - delete it - } + .filter { + it.name.endsWith(".so") || it.name.endsWith(".dll") || it.name.endsWith(".dylib") + }.each { + delete it + } } clean.dependsOn cleanResources diff --git a/jvm-libs/linea/core/domain-models/build.gradle b/jvm-libs/linea/core/domain-models/build.gradle index b8ad8171c..9f0f46350 100644 --- a/jvm-libs/linea/core/domain-models/build.gradle +++ b/jvm-libs/linea/core/domain-models/build.gradle @@ -7,5 +7,5 @@ dependencies { } jar { - dependsOn configurations.runtimeClasspath + dependsOn configurations.runtimeClasspath } diff --git a/jvm-libs/linea/core/traces/build.gradle b/jvm-libs/linea/core/traces/build.gradle index 0f5cad399..0348e0c57 100644 --- a/jvm-libs/linea/core/traces/build.gradle +++ b/jvm-libs/linea/core/traces/build.gradle @@ -1,6 +1,6 @@ plugins { - id 'net.consensys.zkevm.kotlin-common-conventions' - id 'java-test-fixtures' + id 'net.consensys.zkevm.kotlin-common-conventions' + id 'java-test-fixtures' } dependencies { @@ -12,5 +12,5 @@ dependencies { } jar { - dependsOn configurations.runtimeClasspath + dependsOn configurations.runtimeClasspath } diff --git a/jvm-libs/linea/linea-contracts/l2-message-service/build.gradle b/jvm-libs/linea/linea-contracts/l2-message-service/build.gradle index 0109a53ab..9396e5ac8 100644 --- a/jvm-libs/linea/linea-contracts/l2-message-service/build.gradle +++ b/jvm-libs/linea/linea-contracts/l2-message-service/build.gradle @@ -22,7 +22,7 @@ dependencies { web3jContractWrappers { def contractAbi = layout.buildDirectory.dir("${rootProject.projectDir}/contracts/abi").get() - .file("L2MessageServiceV1.0.abi").asFile.absolutePath + .file("L2MessageServiceV1.0.abi").asFile.absolutePath contractsPackage = "net.consensys.linea.contract" contracts = ["$contractAbi": "L2MessageService"] diff --git a/jvm-libs/linea/web3j-extensions/build.gradle b/jvm-libs/linea/web3j-extensions/build.gradle index 81ecdaae2..bfaec3e97 100644 --- a/jvm-libs/linea/web3j-extensions/build.gradle +++ b/jvm-libs/linea/web3j-extensions/build.gradle @@ -38,17 +38,13 @@ sourceSets { } } -task integrationTest(type: Test) { - test -> - description = "Runs integration tests." - group = "verification" - useJUnitPlatform() +task integrationTest(type: Test) { test -> + description = "Runs integration tests." + group = "verification" + useJUnitPlatform() - classpath = sourceSets.integrationTest.runtimeClasspath - testClassesDirs = sourceSets.integrationTest.output.classesDirs + classpath = sourceSets.integrationTest.runtimeClasspath + testClassesDirs = sourceSets.integrationTest.output.classesDirs - dependsOn(":localStackComposeUp") + dependsOn(":localStackComposeUp") } - - - diff --git a/state-recover/clients/blobscan-client/build.gradle b/state-recover/clients/blobscan-client/build.gradle index 1db52da19..caa6d00f8 100644 --- a/state-recover/clients/blobscan-client/build.gradle +++ b/state-recover/clients/blobscan-client/build.gradle @@ -37,28 +37,27 @@ sourceSets { } } -task integrationTest(type: Test) { - test -> - description = "Runs integration tests." - group = "verification" - useJUnitPlatform() +task integrationTest(type: Test) { test -> + description = "Runs integration tests." + group = "verification" + useJUnitPlatform() - classpath = sourceSets.integrationTest.runtimeClasspath - testClassesDirs = sourceSets.integrationTest.output.classesDirs + classpath = sourceSets.integrationTest.runtimeClasspath + testClassesDirs = sourceSets.integrationTest.output.classesDirs - dependsOn(":localStackComposeUp") + dependsOn(":localStackComposeUp") - testLogging { - events TestLogEvent.FAILED, + testLogging { + events TestLogEvent.FAILED, TestLogEvent.SKIPPED, TestLogEvent.STANDARD_ERROR, TestLogEvent.STARTED, TestLogEvent.PASSED - exceptionFormat TestExceptionFormat.FULL - showCauses true - showExceptions true - showStackTraces true - // set showStandardStreams if you need to see test logs - showStandardStreams false - } + exceptionFormat TestExceptionFormat.FULL + showCauses true + showExceptions true + showStackTraces true + // set showStandardStreams if you need to see test logs + showStandardStreams false + } } diff --git a/state-recover/clients/smartcontract/build.gradle b/state-recover/clients/smartcontract/build.gradle index a34367a78..05e0f07a1 100644 --- a/state-recover/clients/smartcontract/build.gradle +++ b/state-recover/clients/smartcontract/build.gradle @@ -29,28 +29,27 @@ sourceSets { } } -task integrationTest(type: Test) { - test -> - description = "Runs integration tests." - group = "verification" - useJUnitPlatform() +task integrationTest(type: Test) { test -> + description = "Runs integration tests." + group = "verification" + useJUnitPlatform() - classpath = sourceSets.integrationTest.runtimeClasspath - testClassesDirs = sourceSets.integrationTest.output.classesDirs + classpath = sourceSets.integrationTest.runtimeClasspath + testClassesDirs = sourceSets.integrationTest.output.classesDirs - dependsOn(":localStackComposeUp") + dependsOn(":localStackComposeUp") - testLogging { - events TestLogEvent.FAILED, + testLogging { + events TestLogEvent.FAILED, TestLogEvent.SKIPPED, TestLogEvent.STANDARD_ERROR, TestLogEvent.STARTED, TestLogEvent.PASSED - exceptionFormat TestExceptionFormat.FULL - showCauses true - showExceptions true - showStackTraces true - // set showStandardStreams if you need to see test logs - showStandardStreams false - } + exceptionFormat TestExceptionFormat.FULL + showCauses true + showExceptions true + showStackTraces true + // set showStandardStreams if you need to see test logs + showStandardStreams false + } } diff --git a/testing-tools/app/build.gradle b/testing-tools/app/build.gradle index 326595f21..d2bb3d4d2 100644 --- a/testing-tools/app/build.gradle +++ b/testing-tools/app/build.gradle @@ -14,7 +14,6 @@ openApiGenerate { configOptions.set([ dateLibrary: "java8" ]) - } application { diff --git a/traces-api-facade/app/build.gradle b/traces-api-facade/app/build.gradle index 059e3061e..ea6abeec0 100644 --- a/traces-api-facade/app/build.gradle +++ b/traces-api-facade/app/build.gradle @@ -1,6 +1,6 @@ plugins { - id 'net.consensys.zkevm.kotlin-application-conventions' - id 'com.github.johnrengelman.shadow' version '7.1.2' + id 'net.consensys.zkevm.kotlin-application-conventions' + id 'com.github.johnrengelman.shadow' version '7.1.2' } dependencies { @@ -42,16 +42,16 @@ dependencies { } application { - mainClass = 'net.consensys.linea.traces.app.TracesAppMain' + mainClass = 'net.consensys.linea.traces.app.TracesAppMain' } jar { manifest { attributes( - 'Class-Path': configurations.runtimeClasspath.collect { it.getName() }.findAll {it.endsWith('jar') }.join(' '), - 'Main-Class': 'net.consensys.linea.traces.app.TracesAppMain', - 'Multi-Release': 'true' - ) + 'Class-Path': configurations.runtimeClasspath.collect { it.getName() }.findAll {it.endsWith('jar') }.join(' '), + 'Main-Class': 'net.consensys.linea.traces.app.TracesAppMain', + 'Multi-Release': 'true' + ) } } @@ -61,9 +61,12 @@ run { "-Dvertx.configurationFile=config/traces-api/vertx.json", "-Dlog4j2.configurationFile=config/traces-api/log4j2-dev.xml" ] + System.properties.entrySet() - .findAll { it.key.startsWith("config") } - .collect { "-D${it.key}=${it.value}" } - args = ["config/traces-api/traces-app-docker.config.toml", "config/traces-api/traces-app-local-dev.config.overrides.toml"] + .findAll { it.key.startsWith("config") } + .collect { "-D${it.key}=${it.value}" } + args = [ + "config/traces-api/traces-app-docker.config.toml", + "config/traces-api/traces-app-local-dev.config.overrides.toml" + ] } test { diff --git a/traces-api-facade/conflation/build.gradle b/traces-api-facade/conflation/build.gradle index e912640b9..39e149ed2 100644 --- a/traces-api-facade/conflation/build.gradle +++ b/traces-api-facade/conflation/build.gradle @@ -1,14 +1,14 @@ plugins { - id 'net.consensys.zkevm.kotlin-library-conventions' - id 'idea' - id 'application' + id 'net.consensys.zkevm.kotlin-library-conventions' + id 'idea' + id 'application' } dependencies { - implementation project(':traces-api-facade:core') - implementation "org.jetbrains.kotlin:kotlin-reflect:1.7.20" - implementation "com.fasterxml.jackson.core:jackson-annotations:${libs.versions.jackson.get()}" - implementation "com.fasterxml.jackson.core:jackson-databind:${libs.versions.jackson.get()}" + implementation project(':traces-api-facade:core') + implementation "org.jetbrains.kotlin:kotlin-reflect:1.7.20" + implementation "com.fasterxml.jackson.core:jackson-annotations:${libs.versions.jackson.get()}" + implementation "com.fasterxml.jackson.core:jackson-databind:${libs.versions.jackson.get()}" } application { diff --git a/traces-api-facade/core/build.gradle b/traces-api-facade/core/build.gradle index f5816aa92..5733d8b59 100644 --- a/traces-api-facade/core/build.gradle +++ b/traces-api-facade/core/build.gradle @@ -1,9 +1,9 @@ plugins { - id 'net.consensys.zkevm.kotlin-library-conventions' + id 'net.consensys.zkevm.kotlin-library-conventions' } dependencies { - api project(':jvm-libs:linea:core:domain-models') - api project(':jvm-libs:linea:core:traces') - api "io.vertx:vertx-core" + api project(':jvm-libs:linea:core:domain-models') + api project(':jvm-libs:linea:core:traces') + api "io.vertx:vertx-core" } diff --git a/transaction-exclusion-api/app/build.gradle b/transaction-exclusion-api/app/build.gradle index c5bcaf8c3..686194fc1 100644 --- a/transaction-exclusion-api/app/build.gradle +++ b/transaction-exclusion-api/app/build.gradle @@ -51,17 +51,17 @@ dependencies { } application { - mainClass = 'net.consensys.linea.transactionexclusion.app.TransactionExclusionAppMain' + mainClass = 'net.consensys.linea.transactionexclusion.app.TransactionExclusionAppMain' } jar { archiveBaseName = 'transaction-exclusion-api' manifest { attributes( - 'Class-Path': configurations.runtimeClasspath.collect { it.getName() }.findAll {it.endsWith('jar') }.join(' '), - 'Main-Class': 'net.consensys.linea.transactionexclusion.app.TransactionExclusionAppMain', - 'Multi-Release': 'true' - ) + 'Class-Path': configurations.runtimeClasspath.collect { it.getName() }.findAll {it.endsWith('jar') }.join(' '), + 'Main-Class': 'net.consensys.linea.transactionexclusion.app.TransactionExclusionAppMain', + 'Multi-Release': 'true' + ) } } @@ -77,10 +77,12 @@ run { "-Dvertx.configurationFile=config/transaction-exclusion-api/vertx.json", "-Dlog4j2.configurationFile=config/transaction-exclusion-api/log4j2-dev.xml" ] + System.properties.entrySet() - .findAll { it.key.startsWith("config") } - .collect { "-D${it.key}=${it.value}" } - args = ["config/transaction-exclusion-api/transaction-exclusion-app-docker.config.toml", - "config/transaction-exclusion-api/transaction-exclusion-app-local-dev.config.overrides.toml"] + .findAll { it.key.startsWith("config") } + .collect { "-D${it.key}=${it.value}" } + args = [ + "config/transaction-exclusion-api/transaction-exclusion-app-docker.config.toml", + "config/transaction-exclusion-api/transaction-exclusion-app-local-dev.config.overrides.toml" + ] } sourceSets { @@ -94,18 +96,17 @@ sourceSets { } } -task integrationTest(type: Test) { - test -> - systemProperty "vertx.configurationFile", "vertx-options.json" +task integrationTest(type: Test) { test -> + systemProperty "vertx.configurationFile", "vertx-options.json" - description = "Runs integration tests." - group = "verification" - useJUnitPlatform() + description = "Runs integration tests." + group = "verification" + useJUnitPlatform() - classpath = sourceSets.integrationTest.runtimeClasspath - testClassesDirs = sourceSets.integrationTest.output.classesDirs + classpath = sourceSets.integrationTest.runtimeClasspath + testClassesDirs = sourceSets.integrationTest.output.classesDirs - dependsOn(":localStackPostgresDbOnlyComposeUp") + dependsOn(":localStackPostgresDbOnlyComposeUp") } task integrationTestAllNeeded { diff --git a/transaction-exclusion-api/persistence/rejectedtransaction/build.gradle b/transaction-exclusion-api/persistence/rejectedtransaction/build.gradle index 9132994e2..05c65f144 100644 --- a/transaction-exclusion-api/persistence/rejectedtransaction/build.gradle +++ b/transaction-exclusion-api/persistence/rejectedtransaction/build.gradle @@ -30,26 +30,24 @@ sourceSets { } } -task integrationTest(type: Test) { - test -> - testLogging { - events TestLogEvent.FAILED, +task integrationTest(type: Test) { test -> + testLogging { + events TestLogEvent.FAILED, TestLogEvent.SKIPPED, TestLogEvent.STANDARD_ERROR, TestLogEvent.STANDARD_OUT - exceptionFormat TestExceptionFormat.FULL - showCauses true - showExceptions true - showStackTraces true - showStandardStreams false - } - description = "Runs integration tests." - group = "verification" - useJUnitPlatform() + exceptionFormat TestExceptionFormat.FULL + showCauses true + showExceptions true + showStackTraces true + showStandardStreams false + } + description = "Runs integration tests." + group = "verification" + useJUnitPlatform() - classpath = sourceSets.integrationTest.runtimeClasspath - testClassesDirs = sourceSets.integrationTest.output.classesDirs + classpath = sourceSets.integrationTest.runtimeClasspath + testClassesDirs = sourceSets.integrationTest.output.classesDirs - dependsOn(":localStackPostgresDbOnlyComposeUp") + dependsOn(":localStackPostgresDbOnlyComposeUp") } -