diff --git a/build.gradle.kts b/build.gradle.kts index ecf5d553a..b3e8a37fb 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -15,13 +15,15 @@ * under the License. * * SPDX-License-Identifier: Apache-2.0 - */ + ********************************************************************************/ import com.bmuschko.gradle.docker.tasks.image.DockerBuildImage import com.github.jengelman.gradle.plugins.shadow.ShadowJavaPlugin +import org.gradle.kotlin.dsl.provider.inClassPathMode import java.time.Duration plugins { + checkstyle `java-library` `maven-publish` `jacoco-report-aggregation` @@ -109,11 +111,18 @@ allprojects { configFile = rootProject.file("resources/tx-checkstyle-config.xml") configDirectory.set(rootProject.file("resources")) + tasks.checkstyleMain { + this.source = project.sourceSets.getByName("main").allSource + } + + tasks.checkstyleTest { + this.source = project.sourceSets.getByName("test").allSource + } + //checkstyle violations are reported at the WARN level this.isShowViolations = System.getProperty("checkstyle.verbose", "true").toBoolean() } - // publishing to OSSRH is handled by the build plugin, but publishing to GH packages // must be configured separately publishing { @@ -144,8 +153,9 @@ subprojects { if (project.plugins.hasPlugin("com.github.johnrengelman.shadow") && file("${project.projectDir}/src/main/docker/Dockerfile").exists() ) { + val buildDir = project.layout.buildDirectory.get().asFile - val agentFile = project.buildDir.resolve("opentelemetry-javaagent.jar") + val agentFile = buildDir.resolve("opentelemetry-javaagent.jar") // create task to download the opentelemetry agent val openTelemetryAgentUrl = "https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v1.32.0/opentelemetry-javaagent.jar" val downloadOtel = tasks.create("downloadOtel") { @@ -155,7 +165,7 @@ subprojects { } // this task could be the first in the graph, so "build/" may not yet exist. Let's be defensive doFirst { - project.buildDir.mkdirs() + buildDir.mkdirs() } // download the jar file doLast { @@ -173,7 +183,7 @@ subprojects { // this task copies some legal docs into the build folder, so we can easily copy them into the docker images val copyLegalDocs = tasks.create("copyLegalDocs", Copy::class) { from(project.rootProject.projectDir) - into("${project.buildDir}/legal") + into("${buildDir}/legal") include("SECURITY.md", "NOTICE.md", "DEPENDENCIES", "LICENSE") dependsOn(tasks.named(ShadowJavaPlugin.SHADOW_JAR_TASK_NAME)) } diff --git a/edc-controlplane/build.gradle.kts b/edc-controlplane/build.gradle.kts index 0eb12e33b..9e901172f 100644 --- a/edc-controlplane/build.gradle.kts +++ b/edc-controlplane/build.gradle.kts @@ -15,7 +15,7 @@ * under the License. * * SPDX-License-Identifier: Apache-2.0 - */ + ********************************************************************************/ plugins { `java-library` diff --git a/edc-controlplane/edc-controlplane-base/build.gradle.kts b/edc-controlplane/edc-controlplane-base/build.gradle.kts index 85eead488..fd7a31c80 100644 --- a/edc-controlplane/edc-controlplane-base/build.gradle.kts +++ b/edc-controlplane/edc-controlplane-base/build.gradle.kts @@ -16,7 +16,7 @@ * under the License. * * SPDX-License-Identifier: Apache-2.0 - */ + ********************************************************************************/ plugins { `java-library` diff --git a/edc-controlplane/edc-controlplane-postgresql-azure-vault/build.gradle.kts b/edc-controlplane/edc-controlplane-postgresql-azure-vault/build.gradle.kts index 7c69d28a2..78a4c2022 100644 --- a/edc-controlplane/edc-controlplane-postgresql-azure-vault/build.gradle.kts +++ b/edc-controlplane/edc-controlplane-postgresql-azure-vault/build.gradle.kts @@ -16,7 +16,7 @@ * under the License. * * SPDX-License-Identifier: Apache-2.0 - */ + ********************************************************************************/ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar diff --git a/edc-controlplane/edc-controlplane-postgresql-hashicorp-vault/build.gradle.kts b/edc-controlplane/edc-controlplane-postgresql-hashicorp-vault/build.gradle.kts index 5295fafc7..8c8c7cefa 100644 --- a/edc-controlplane/edc-controlplane-postgresql-hashicorp-vault/build.gradle.kts +++ b/edc-controlplane/edc-controlplane-postgresql-hashicorp-vault/build.gradle.kts @@ -16,7 +16,7 @@ * under the License. * * SPDX-License-Identifier: Apache-2.0 - */ + ********************************************************************************/ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar diff --git a/edc-controlplane/edc-runtime-memory/build.gradle.kts b/edc-controlplane/edc-runtime-memory/build.gradle.kts index 04c936024..c5491e8b3 100644 --- a/edc-controlplane/edc-runtime-memory/build.gradle.kts +++ b/edc-controlplane/edc-runtime-memory/build.gradle.kts @@ -15,7 +15,7 @@ * under the License. * * SPDX-License-Identifier: Apache-2.0 - */ + ********************************************************************************/ plugins { `java-library` diff --git a/edc-dataplane/build.gradle.kts b/edc-dataplane/build.gradle.kts index dc5814dce..4389a99cf 100644 --- a/edc-dataplane/build.gradle.kts +++ b/edc-dataplane/build.gradle.kts @@ -15,7 +15,7 @@ * under the License. * * SPDX-License-Identifier: Apache-2.0 - */ + ********************************************************************************/ plugins { `java-library` diff --git a/edc-dataplane/edc-dataplane-azure-vault/build.gradle.kts b/edc-dataplane/edc-dataplane-azure-vault/build.gradle.kts index 4159fc0eb..0172e73d0 100644 --- a/edc-dataplane/edc-dataplane-azure-vault/build.gradle.kts +++ b/edc-dataplane/edc-dataplane-azure-vault/build.gradle.kts @@ -15,7 +15,7 @@ * under the License. * * SPDX-License-Identifier: Apache-2.0 - */ + ********************************************************************************/ plugins { `java-library` diff --git a/edc-dataplane/edc-dataplane-base/build.gradle.kts b/edc-dataplane/edc-dataplane-base/build.gradle.kts index bc6bac2e3..f7b498f74 100644 --- a/edc-dataplane/edc-dataplane-base/build.gradle.kts +++ b/edc-dataplane/edc-dataplane-base/build.gradle.kts @@ -15,7 +15,7 @@ * under the License. * * SPDX-License-Identifier: Apache-2.0 - */ + ********************************************************************************/ plugins { diff --git a/edc-dataplane/edc-dataplane-hashicorp-vault/build.gradle.kts b/edc-dataplane/edc-dataplane-hashicorp-vault/build.gradle.kts index 975956f36..63063b271 100644 --- a/edc-dataplane/edc-dataplane-hashicorp-vault/build.gradle.kts +++ b/edc-dataplane/edc-dataplane-hashicorp-vault/build.gradle.kts @@ -15,7 +15,7 @@ * under the License. * * SPDX-License-Identifier: Apache-2.0 - */ + ********************************************************************************/ plugins { `java-library` diff --git a/edc-extensions/bpn-validation/bpn-validation-core/build.gradle.kts b/edc-extensions/bpn-validation/bpn-validation-core/build.gradle.kts index 2a4c7226f..463660342 100644 --- a/edc-extensions/bpn-validation/bpn-validation-core/build.gradle.kts +++ b/edc-extensions/bpn-validation/bpn-validation-core/build.gradle.kts @@ -15,7 +15,7 @@ * under the License. * * SPDX-License-Identifier: Apache-2.0 - */ + ********************************************************************************/ plugins { `java-library` diff --git a/edc-extensions/bpn-validation/bpn-validation-spi/build.gradle.kts b/edc-extensions/bpn-validation/bpn-validation-spi/build.gradle.kts index af7a94ab8..a40e19ec3 100644 --- a/edc-extensions/bpn-validation/bpn-validation-spi/build.gradle.kts +++ b/edc-extensions/bpn-validation/bpn-validation-spi/build.gradle.kts @@ -15,7 +15,7 @@ * under the License. * * SPDX-License-Identifier: Apache-2.0 - */ + ********************************************************************************/ plugins { `java-library` diff --git a/edc-extensions/bpn-validation/build.gradle.kts b/edc-extensions/bpn-validation/build.gradle.kts index 335f1cd16..f4d82e271 100644 --- a/edc-extensions/bpn-validation/build.gradle.kts +++ b/edc-extensions/bpn-validation/build.gradle.kts @@ -15,7 +15,7 @@ * under the License. * * SPDX-License-Identifier: Apache-2.0 - */ + ********************************************************************************/ plugins { `java-library` diff --git a/edc-extensions/bpn-validation/business-partner-store-sql/build.gradle.kts b/edc-extensions/bpn-validation/business-partner-store-sql/build.gradle.kts index 0f0c87646..eba92d316 100644 --- a/edc-extensions/bpn-validation/business-partner-store-sql/build.gradle.kts +++ b/edc-extensions/bpn-validation/business-partner-store-sql/build.gradle.kts @@ -15,7 +15,7 @@ * under the License. * * SPDX-License-Identifier: Apache-2.0 - */ + ********************************************************************************/ plugins { `java-library` diff --git a/edc-extensions/build.gradle.kts b/edc-extensions/build.gradle.kts index 475444229..d6b1be67f 100644 --- a/edc-extensions/build.gradle.kts +++ b/edc-extensions/build.gradle.kts @@ -15,7 +15,7 @@ * under the License. * * SPDX-License-Identifier: Apache-2.0 - */ + ********************************************************************************/ plugins { `java-library` diff --git a/edc-extensions/dataplane-selector-configuration/build.gradle.kts b/edc-extensions/dataplane-selector-configuration/build.gradle.kts index 133bd88c3..185d46b59 100644 --- a/edc-extensions/dataplane-selector-configuration/build.gradle.kts +++ b/edc-extensions/dataplane-selector-configuration/build.gradle.kts @@ -15,7 +15,7 @@ * under the License. * * SPDX-License-Identifier: Apache-2.0 - */ + ********************************************************************************/ plugins { `maven-publish` diff --git a/edc-extensions/postgresql-migration/build.gradle.kts b/edc-extensions/postgresql-migration/build.gradle.kts index 027679f1e..22f26a7c2 100644 --- a/edc-extensions/postgresql-migration/build.gradle.kts +++ b/edc-extensions/postgresql-migration/build.gradle.kts @@ -15,7 +15,7 @@ * under the License. * * SPDX-License-Identifier: Apache-2.0 - */ + ********************************************************************************/ plugins { `maven-publish` diff --git a/edc-extensions/provision-additional-headers/build.gradle.kts b/edc-extensions/provision-additional-headers/build.gradle.kts index a15240789..7eccfd232 100644 --- a/edc-extensions/provision-additional-headers/build.gradle.kts +++ b/edc-extensions/provision-additional-headers/build.gradle.kts @@ -15,7 +15,7 @@ * under the License. * * SPDX-License-Identifier: Apache-2.0 - */ + ********************************************************************************/ plugins { `maven-publish` diff --git a/edc-extensions/ssi/jws2020-crypto-suite/build.gradle.kts b/edc-extensions/ssi/jws2020-crypto-suite/build.gradle.kts index e64ad023a..25602c5de 100644 --- a/edc-extensions/ssi/jws2020-crypto-suite/build.gradle.kts +++ b/edc-extensions/ssi/jws2020-crypto-suite/build.gradle.kts @@ -15,7 +15,7 @@ * under the License. * * SPDX-License-Identifier: Apache-2.0 - */ + ********************************************************************************/ plugins { `java-library` } diff --git a/edc-extensions/transferprocess-sftp-client/build.gradle.kts b/edc-extensions/transferprocess-sftp-client/build.gradle.kts index a552c7e94..67501fb0d 100644 --- a/edc-extensions/transferprocess-sftp-client/build.gradle.kts +++ b/edc-extensions/transferprocess-sftp-client/build.gradle.kts @@ -15,7 +15,7 @@ * under the License. * * SPDX-License-Identifier: Apache-2.0 - */ + ********************************************************************************/ plugins { `maven-publish` diff --git a/edc-extensions/transferprocess-sftp-common/build.gradle.kts b/edc-extensions/transferprocess-sftp-common/build.gradle.kts index e7afd6b5e..1448161c5 100644 --- a/edc-extensions/transferprocess-sftp-common/build.gradle.kts +++ b/edc-extensions/transferprocess-sftp-common/build.gradle.kts @@ -15,7 +15,7 @@ * under the License. * * SPDX-License-Identifier: Apache-2.0 - */ + ********************************************************************************/ plugins { `maven-publish` diff --git a/edc-extensions/transferprocess-sftp-provisioner/build.gradle.kts b/edc-extensions/transferprocess-sftp-provisioner/build.gradle.kts index 86379217c..67b6aee63 100644 --- a/edc-extensions/transferprocess-sftp-provisioner/build.gradle.kts +++ b/edc-extensions/transferprocess-sftp-provisioner/build.gradle.kts @@ -15,7 +15,7 @@ * under the License. * * SPDX-License-Identifier: Apache-2.0 - */ + ********************************************************************************/ plugins { `maven-publish` diff --git a/resources/tx-checkstyle-config.xml b/resources/tx-checkstyle-config.xml index 0f6c4fdfe..5c2258ca4 100644 --- a/resources/tx-checkstyle-config.xml +++ b/resources/tx-checkstyle-config.xml @@ -18,10 +18,8 @@ - - diff --git a/settings.gradle.kts b/settings.gradle.kts index 230dd6082..b6630d82e 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -15,7 +15,7 @@ * under the License. * * SPDX-License-Identifier: Apache-2.0 - */ + ********************************************************************************/ rootProject.name = "tractusx-edc"