From e1da7ec8f57aeffd2d928c36acaaa4a965e79c5a Mon Sep 17 00:00:00 2001 From: Christophe Loiseau Date: Thu, 2 May 2024 14:09:55 +0200 Subject: [PATCH] chore: Convert dependencies to use libs.version.toml (#908) * Add Azure repo for core-EDC fork * Prepare lib.toml --- .github/ISSUE_TEMPLATE/release.md | 4 +- build.gradle.kts | 5 +- .../{ => api}/eclipse-edc-management-api.yaml | 0 docs/{ => api}/postman_collection.json | 0 docs/{ => api}/sovity-edc-api-wrapper.yaml | 0 extensions/edc-ui-config/build.gradle.kts | 37 ++-- extensions/last-commit-info/build.gradle.kts | 43 ++-- .../policy-always-true/build.gradle.kts | 20 +- .../build.gradle.kts | 14 +- .../policy-time-interval/build.gradle.kts | 6 +- extensions/postgres-flyway/build.gradle.kts | 20 +- .../test-backend-controller/build.gradle.kts | 8 +- .../build.gradle.kts | 4 +- extensions/wrapper/README.md | 2 +- .../java-client-example/build.gradle.kts | 4 +- .../clients/java-client/build.gradle.kts | 57 +++--- .../wrapper/wrapper-api/build.gradle.kts | 36 ++-- .../wrapper-common-api/build.gradle.kts | 16 +- .../wrapper-common-mappers/build.gradle.kts | 38 ++-- .../wrapper/wrapper-ee-api/build.gradle.kts | 18 +- extensions/wrapper/wrapper/build.gradle.kts | 63 +++--- gradle/libs.versions.toml | 183 ++++++++++++++++++ gradle/wrapper/gradle-wrapper.properties | 2 +- launchers/common/auth-daps/build.gradle.kts | 4 +- launchers/common/auth-mock/build.gradle.kts | 2 +- launchers/common/base-mds/build.gradle.kts | 2 +- launchers/common/base/build.gradle.kts | 32 +-- .../common/observability/build.gradle.kts | 2 +- launchers/connectors/mds-ce/build.gradle.kts | 2 +- .../connectors/sovity-ce/build.gradle.kts | 2 +- .../connectors/sovity-dev/build.gradle.kts | 2 +- .../connectors/test-backend/build.gradle.kts | 8 +- tests/build.gradle.kts | 22 +-- utils/catalog-parser/build.gradle.kts | 34 ++-- utils/json-and-jsonld-utils/build.gradle.kts | 36 ++-- utils/test-connector-remote/build.gradle.kts | 28 +-- 36 files changed, 463 insertions(+), 293 deletions(-) rename docs/{ => api}/eclipse-edc-management-api.yaml (100%) rename docs/{ => api}/postman_collection.json (100%) rename docs/{ => api}/sovity-edc-api-wrapper.yaml (100%) create mode 100644 gradle/libs.versions.toml diff --git a/.github/ISSUE_TEMPLATE/release.md b/.github/ISSUE_TEMPLATE/release.md index e6d651e53..6ff21b07a 100644 --- a/.github/ISSUE_TEMPLATE/release.md +++ b/.github/ISSUE_TEMPLATE/release.md @@ -49,7 +49,7 @@ Feel free to edit this release checklist in-progress depending on what tasks nee - [ ] Set the UI release version for `EDC_UI_IMAGE` of the [docker-compose's .env file](https://github.com/sovity/edc-extensions/blob/main/.env). - [ ] If the Eclipse EDC version changed, update - the [eclipse-edc-management-api.yaml file](https://github.com/sovity/edc-extensions/blob/main/docs/eclipse-edc-management-api.yaml). + the [eclipse-edc-management-api.yaml file](https://github.com/sovity/edc-extensions/blob/main/docs/api/eclipse-edc-management-api.yaml). - [ ] Update the Postman Collection if required. - [ ] Merge the `release-prep` PR. - [ ] Wait for the main branch to be green. You can check the status in GH [actions](https://github.com/sovity/edc-extensions/actions). @@ -60,7 +60,7 @@ Feel free to edit this release checklist in-progress depending on what tasks nee - [ ] Test with `EDC_UI_ACTIVE_PROFILE=sovity-open-source` - [ ] Test with `EDC_UI_ACTIVE_PROFILE=mds-open-source` - [ ] Ensure with a `docker ps -a` that all containers are healthy, and not `healthy: starting` or `healthy: unhealthy`. -- [ ] Test the postman collection against that running docker-compose. +- [ ] Test the [postman collection](../../docs/api/postman_collection.json) against that running docker-compose. - [ ] [Create a release](https://github.com/sovity/edc-extensions/releases/new) - [ ] In `Choose the tag`, type your new release version in the format `vx.y.z` (for instance `v1.2.3`) then click `+Create new tag vx.y.z on release`. - [ ] Re-use the changelog section as release description, and the version as title. diff --git a/build.gradle.kts b/build.gradle.kts index 678ef4a0d..06e204e1f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,6 +1,5 @@ import org.gradle.api.tasks.testing.logging.TestExceptionFormat import org.gradle.api.tasks.testing.logging.TestLogEvent -import org.gradle.internal.impldep.org.jsoup.safety.Safelist.basic plugins { id("java") @@ -9,8 +8,8 @@ plugins { } dependencies { - testImplementation("org.junit.jupiter:junit-jupiter-api:5.10.0") - testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.10.0") + testImplementation(libs.junit.api) + testRuntimeOnly(libs.junit.engine) } val downloadArtifact: Configuration by configurations.creating { diff --git a/docs/eclipse-edc-management-api.yaml b/docs/api/eclipse-edc-management-api.yaml similarity index 100% rename from docs/eclipse-edc-management-api.yaml rename to docs/api/eclipse-edc-management-api.yaml diff --git a/docs/postman_collection.json b/docs/api/postman_collection.json similarity index 100% rename from docs/postman_collection.json rename to docs/api/postman_collection.json diff --git a/docs/sovity-edc-api-wrapper.yaml b/docs/api/sovity-edc-api-wrapper.yaml similarity index 100% rename from docs/sovity-edc-api-wrapper.yaml rename to docs/api/sovity-edc-api-wrapper.yaml diff --git a/extensions/edc-ui-config/build.gradle.kts b/extensions/edc-ui-config/build.gradle.kts index a5d78cdaf..56d0c920f 100644 --- a/extensions/edc-ui-config/build.gradle.kts +++ b/extensions/edc-ui-config/build.gradle.kts @@ -11,17 +11,17 @@ plugins { } dependencies { - api("${edcGroup}:core-spi:${edcVersion}") - api("${edcGroup}:control-plane-spi:${edcVersion}") - implementation("${edcGroup}:api-core:${edcVersion}") - implementation("${edcGroup}:management-api-configuration:${edcVersion}") + api(libs.edc.coreSpi) + api(libs.edc.controlPlaneSpi) + implementation(libs.edc.apiCore) + implementation(libs.edc.managementApiConfiguration) - implementation("jakarta.ws.rs:jakarta.ws.rs-api:3.1.0") - implementation("jakarta.validation:jakarta.validation-api:3.0.2") + implementation(libs.jakarta.rsApi) + implementation(libs.jakarta.validationApi) - testImplementation("${edcGroup}:control-plane-core:${edcVersion}") - testImplementation("${edcGroup}:junit:${edcVersion}") - testImplementation("${edcGroup}:http:${edcVersion}") { + testImplementation(libs.edc.controlPlaneCore) + testImplementation(libs.edc.junit) + testImplementation(libs.edc.http) { exclude(group = "org.eclipse.jetty", module = "jetty-client") exclude(group = "org.eclipse.jetty", module = "jetty-http") exclude(group = "org.eclipse.jetty", module = "jetty-io") @@ -31,18 +31,13 @@ dependencies { } // Updated jetty versions for e.g. CVE-2023-26048 - testImplementation("${jettyGroup}:jetty-client:${jettyVersion}") - testImplementation("${jettyGroup}:jetty-http:${jettyVersion}") - testImplementation("${jettyGroup}:jetty-io:${jettyVersion}") - testImplementation("${jettyGroup}:jetty-server:${jettyVersion}") - testImplementation("${jettyGroup}:jetty-util:${jettyVersion}") - testImplementation("${jettyGroup}:jetty-webapp:${jettyVersion}") - - testImplementation("io.rest-assured:rest-assured:${restAssured}") - testImplementation("${edcGroup}:data-plane-selector-core:${edcVersion}") - testImplementation("org.mockito:mockito-core:${mockitoVersion}") - testImplementation("org.junit.jupiter:junit-jupiter-api:5.10.0") - testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.10.0") + testImplementation(libs.bundles.jetty.cve2023) + + testImplementation(libs.restAssured.restAssured) + testImplementation(libs.edc.dataPlaneSelectorCore) + testImplementation(libs.mockito.core) + testImplementation(libs.junit.api) + testRuntimeOnly(libs.junit.engine) } val sovityEdcExtensionGroup: String by project diff --git a/extensions/last-commit-info/build.gradle.kts b/extensions/last-commit-info/build.gradle.kts index 80a8227cf..2d4f01a0a 100644 --- a/extensions/last-commit-info/build.gradle.kts +++ b/extensions/last-commit-info/build.gradle.kts @@ -12,23 +12,23 @@ plugins { } dependencies { - annotationProcessor("org.projectlombok:lombok:${lombokVersion}") - compileOnly("org.projectlombok:lombok:${lombokVersion}") + annotationProcessor(libs.lombok) + compileOnly(libs.lombok) - api("${edcGroup}:core-spi:${edcVersion}") - api("${edcGroup}:control-plane-spi:${edcVersion}") - implementation("${edcGroup}:api-core:${edcVersion}") - implementation("${edcGroup}:management-api-configuration:${edcVersion}") + api(libs.edc.coreSpi) + api(libs.edc.controlPlaneSpi) + implementation(libs.edc.apiCore) + implementation(libs.edc.managementApiConfiguration) - implementation("jakarta.ws.rs:jakarta.ws.rs-api:3.1.0") - implementation("jakarta.validation:jakarta.validation-api:3.0.2") + implementation(libs.jakarta.rsApi) + implementation(libs.jakarta.validationApi) - testAnnotationProcessor("org.projectlombok:lombok:${lombokVersion}") - testCompileOnly("org.projectlombok:lombok:${lombokVersion}") + testAnnotationProcessor(libs.lombok) + testCompileOnly(libs.lombok) - testImplementation("${edcGroup}:control-plane-core:${edcVersion}") - testImplementation("${edcGroup}:junit:${edcVersion}") - testImplementation("${edcGroup}:http:${edcVersion}") { + testImplementation(libs.edc.controlPlaneCore) + testImplementation(libs.edc.junit) + testImplementation(libs.edc.http) { exclude(group = "org.eclipse.jetty", module = "jetty-client") exclude(group = "org.eclipse.jetty", module = "jetty-http") exclude(group = "org.eclipse.jetty", module = "jetty-io") @@ -38,18 +38,13 @@ dependencies { } // Updated jetty versions for e.g. CVE-2023-26048 - testImplementation("${jettyGroup}:jetty-client:${jettyVersion}") - testImplementation("${jettyGroup}:jetty-http:${jettyVersion}") - testImplementation("${jettyGroup}:jetty-io:${jettyVersion}") - testImplementation("${jettyGroup}:jetty-server:${jettyVersion}") - testImplementation("${jettyGroup}:jetty-util:${jettyVersion}") - testImplementation("${jettyGroup}:jetty-webapp:${jettyVersion}") + testImplementation(libs.bundles.jetty.cve2023) - testImplementation("io.rest-assured:rest-assured:${restAssured}") - testImplementation("${edcGroup}:data-plane-selector-core:${edcVersion}") - testImplementation("org.mockito:mockito-core:${mockitoVersion}") - testImplementation("org.junit.jupiter:junit-jupiter-api:5.10.0") - testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.10.0") + testImplementation(libs.restAssured.restAssured) + testImplementation(libs.edc.dataPlaneSelectorCore) + testImplementation(libs.mockito.core) + testImplementation(libs.junit.api) + testRuntimeOnly(libs.junit.engine) } val sovityEdcExtensionGroup: String by project diff --git a/extensions/policy-always-true/build.gradle.kts b/extensions/policy-always-true/build.gradle.kts index 0b1fc415f..9122cf0df 100644 --- a/extensions/policy-always-true/build.gradle.kts +++ b/extensions/policy-always-true/build.gradle.kts @@ -8,17 +8,17 @@ plugins { } dependencies { - api("${edcGroup}:core-spi:${edcVersion}") - api("${edcGroup}:policy-engine-spi:${edcVersion}") - api("${edcGroup}:control-plane-spi:${edcVersion}") - implementation("${edcGroup}:api-core:${edcVersion}") + api(libs.edc.coreSpi) + api(libs.edc.policyEngineSpi) + api(libs.edc.controlPlaneSpi) + implementation(libs.edc.apiCore) - testImplementation("${edcGroup}:control-plane-core:${edcVersion}") - testImplementation("${edcGroup}:junit:${edcVersion}") - testImplementation("${edcGroup}:data-plane-selector-core:${edcVersion}") - testImplementation("org.mockito:mockito-core:${mockitoVersion}") - testImplementation("org.junit.jupiter:junit-jupiter-api:5.10.0") - testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.10.0") + testImplementation(libs.edc.controlPlaneCore) + testImplementation(libs.edc.junit) + testImplementation(libs.edc.dataPlaneSelectorCore) + testImplementation(libs.mockito.core) + testImplementation(libs.junit.api) + testRuntimeOnly(libs.junit.engine) } val sovityEdcExtensionGroup: String by project diff --git a/extensions/policy-referring-connector/build.gradle.kts b/extensions/policy-referring-connector/build.gradle.kts index 972612083..04287b42f 100644 --- a/extensions/policy-referring-connector/build.gradle.kts +++ b/extensions/policy-referring-connector/build.gradle.kts @@ -9,14 +9,14 @@ plugins { } dependencies { - api("${edcGroup}:auth-spi:${edcVersion}") - api("${edcGroup}:policy-engine-spi:${edcVersion}") - api("${edcGroup}:contract-spi:${edcVersion}") - testImplementation("${edcGroup}:junit:${edcVersion}") + api(libs.edc.authSpi) + api(libs.edc.policyEngineSpi) + api(libs.edc.contractSpi) + testImplementation(libs.edc.junit) - testImplementation("org.mockito:mockito-core:${mockitoVersion}") - testImplementation("org.junit.jupiter:junit-jupiter-api:${jupiterVersion}") - testImplementation("org.junit.jupiter:junit-jupiter-params:${jupiterVersion}") + testImplementation(libs.mockito.core) + testImplementation(libs.junit.api) + testImplementation(libs.junit.params) } tasks.withType { diff --git a/extensions/policy-time-interval/build.gradle.kts b/extensions/policy-time-interval/build.gradle.kts index 4a79097d7..e36914450 100644 --- a/extensions/policy-time-interval/build.gradle.kts +++ b/extensions/policy-time-interval/build.gradle.kts @@ -7,9 +7,9 @@ plugins { } dependencies { - api("${edcGroup}:auth-spi:${edcVersion}") - api("${edcGroup}:policy-engine-spi:${edcVersion}") - testImplementation("${edcGroup}:junit:${edcVersion}") + api(libs.edc.authSpi) + api(libs.edc.policyEngineSpi) + testImplementation(libs.edc.junit) } val sovityEdcExtensionGroup: String by project diff --git a/extensions/postgres-flyway/build.gradle.kts b/extensions/postgres-flyway/build.gradle.kts index 203782838..42089ae9b 100644 --- a/extensions/postgres-flyway/build.gradle.kts +++ b/extensions/postgres-flyway/build.gradle.kts @@ -12,22 +12,22 @@ plugins { } dependencies { - annotationProcessor("org.projectlombok:lombok:${lombokVersion}") - compileOnly("org.projectlombok:lombok:${lombokVersion}") + annotationProcessor(libs.lombok) + compileOnly(libs.lombok) - implementation("${edcGroup}:core-spi:${edcVersion}") - implementation("${edcGroup}:sql-core:${edcVersion}") + implementation(libs.edc.coreSpi) + implementation(libs.edc.sqlCore) // Adds Database-Related EDC-Extensions (EDC-SQL-Stores, JDBC-Driver, Pool and Transactions) - implementation("${edcGroup}:control-plane-sql:${edcVersion}") - implementation("${tractusGroup}:sql-pool:${tractusVersion}") - implementation("${edcGroup}:transaction-local:${edcVersion}") + implementation(libs.edc.controlPlaneSql) + implementation(libs.edc.transactionLocal) + implementation(libs.tractus.sqlPool) - implementation("org.postgresql:postgresql:${postgresVersion}") + implementation(libs.postgres) - implementation("org.flywaydb:flyway-core:${flywayVersion}") + implementation(libs.flyway.core) - testImplementation("${edcGroup}:junit:${edcVersion}") + testImplementation(libs.edc.junit) } val sovityEdcExtensionGroup: String by project diff --git a/extensions/test-backend-controller/build.gradle.kts b/extensions/test-backend-controller/build.gradle.kts index 56ffc60c7..41e9dee8a 100644 --- a/extensions/test-backend-controller/build.gradle.kts +++ b/extensions/test-backend-controller/build.gradle.kts @@ -6,9 +6,9 @@ plugins { } dependencies { - api("${edcGroup}:api-core:${edcVersion}") - api("${edcGroup}:core-spi:${edcVersion}") - api("${edcGroup}:http:${edcVersion}") + api(libs.edc.apiCore) + api(libs.edc.coreSpi) + api(libs.edc.http) } val sovityEdcExtensionGroup: String by project @@ -20,4 +20,4 @@ publishing { from(components["java"]) } } -} \ No newline at end of file +} diff --git a/extensions/transfer-process-status-checker/build.gradle.kts b/extensions/transfer-process-status-checker/build.gradle.kts index cf7424b81..5bc93ae54 100644 --- a/extensions/transfer-process-status-checker/build.gradle.kts +++ b/extensions/transfer-process-status-checker/build.gradle.kts @@ -7,8 +7,8 @@ plugins { } dependencies { - api("${edcGroup}:transfer-spi:${edcVersion}") - testImplementation("${edcGroup}:junit:${edcVersion}") + api(libs.edc.transferSpi) + testImplementation(libs.edc.junit) } val sovityEdcExtensionGroup: String by project diff --git a/extensions/wrapper/README.md b/extensions/wrapper/README.md index 85c01afdd..1fabd0c4b 100644 --- a/extensions/wrapper/README.md +++ b/extensions/wrapper/README.md @@ -21,7 +21,7 @@ We provide a full type-safe and opinionated API Wrapper for better access to the ## Explore Create and consume Data Offers using clean type-safe JSON REST APIs: -- [API Wrapper OpenAPI YAML](../../docs/sovity-edc-api-wrapper.yaml). +- [API Wrapper OpenAPI YAML](../../docs/api/sovity-edc-api-wrapper.yaml). - [Java API Client Library](./clients/java-client) - [TypeScript API Client Library](./clients/typescript-client) diff --git a/extensions/wrapper/clients/java-client-example/build.gradle.kts b/extensions/wrapper/clients/java-client-example/build.gradle.kts index f43ea26ca..8c670abe7 100644 --- a/extensions/wrapper/clients/java-client-example/build.gradle.kts +++ b/extensions/wrapper/clients/java-client-example/build.gradle.kts @@ -1,6 +1,6 @@ plugins { java - id("io.quarkus") version "2.16.6.Final" + alias(libs.plugins.quarkus) } repositories { @@ -13,7 +13,7 @@ val quarkusPlatformArtifactId = "quarkus-bom" val quarkusPlatformVersion = "2.16.6.Final" dependencies { - implementation(enforcedPlatform("${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:${quarkusPlatformVersion}")) + implementation(enforcedPlatform(libs.quarkus.bom)) implementation("io.quarkus:quarkus-arc") implementation("io.quarkus:quarkus-resteasy-reactive-jackson") diff --git a/extensions/wrapper/clients/java-client/build.gradle.kts b/extensions/wrapper/clients/java-client/build.gradle.kts index 844184df4..a6783b3d9 100644 --- a/extensions/wrapper/clients/java-client/build.gradle.kts +++ b/extensions/wrapper/clients/java-client/build.gradle.kts @@ -11,7 +11,7 @@ val jettyGroup: String by project plugins { `java-library` `maven-publish` - id("org.openapi.generator") version "6.6.0" + alias(libs.plugins.openapi.generator) } repositories { @@ -28,19 +28,19 @@ dependencies { } // Generated Client's Dependencies - implementation("io.swagger:swagger-annotations:1.6.11") - implementation("com.google.code.findbugs:jsr305:3.0.2") - implementation("com.squareup.okhttp3:okhttp:4.11.0") - implementation("com.squareup.okhttp3:logging-interceptor:4.11.0") - implementation("com.google.code.gson:gson:2.10.1") - implementation("io.gsonfire:gson-fire:1.8.5") - implementation("org.openapitools:jackson-databind-nullable:0.2.6") - implementation("org.apache.commons:commons-lang3:3.13.0") - implementation("jakarta.annotation:jakarta.annotation-api:1.3.5") + implementation(libs.swagger.annotations) + implementation(libs.findbugs.jsr305) + implementation(libs.okhttp.okhttp) + implementation(libs.okhttp.loggingInterceptor) + implementation(libs.gson) + implementation(libs.gsonFire) + implementation(libs.openapi.jacksonDatabindNullable) + implementation(libs.apache.commonsLang) + implementation(libs.jakarta.annotation) // Lombok - compileOnly("org.projectlombok:lombok:${lombokVersion}") - annotationProcessor("org.projectlombok:lombok:${lombokVersion}") + compileOnly(libs.lombok) + annotationProcessor(libs.lombok) } tasks.getByName("test") { @@ -49,7 +49,7 @@ tasks.getByName("test") { // Extract the openapi file from the JAR val openapiFile = "sovity-edc-api-wrapper.yaml" -task("extractOpenapiYaml") { +val extractOpenapiYaml by tasks.registering(Copy::class) { dependsOn(openapiYaml) into("${project.buildDir}") from(zipTree(openapiYaml.singleFile)) { @@ -58,24 +58,26 @@ task("extractOpenapiYaml") { } tasks.getByName("openApiGenerate") { - dependsOn("extractOpenapiYaml") + dependsOn(extractOpenapiYaml) generatorName.set("java") - configOptions.set(mutableMapOf( - "invokerPackage" to "de.sovity.edc.client.gen", - "apiPackage" to "de.sovity.edc.client.gen.api", - "modelPackage" to "de.sovity.edc.client.gen.model", - "caseInsensitiveResponseHeaders" to "true", - "additionalModelTypeAnnotations" to "@lombok.AllArgsConstructor\n@lombok.Builder", - "annotationLibrary" to "swagger1", - "hideGenerationTimestamp" to "true", - "useRuntimeException" to "true", - )) + configOptions.set( + mutableMapOf( + "invokerPackage" to "de.sovity.edc.client.gen", + "apiPackage" to "de.sovity.edc.client.gen.api", + "modelPackage" to "de.sovity.edc.client.gen.model", + "caseInsensitiveResponseHeaders" to "true", + "additionalModelTypeAnnotations" to "@lombok.AllArgsConstructor\n@lombok.Builder", + "annotationLibrary" to "swagger1", + "hideGenerationTimestamp" to "true", + "useRuntimeException" to "true", + ) + ) inputSpec.set("${project.buildDir}/${openapiFile}") outputDir.set("${project.buildDir}/generated/client-project") } -task("postprocessGeneratedClient") { +val postprocessGeneratedClient by tasks.registering(Copy::class) { dependsOn("openApiGenerate") from("${project.buildDir}/generated/client-project/src/main/java") @@ -109,6 +111,10 @@ java { withJavadocJar() } +tasks.getByName("sourcesJar") { + dependsOn(postprocessGeneratedClient) +} + tasks.withType { val fullOptions = this.options as StandardJavadocDocletOptions fullOptions.tags = listOf("http.response.details:a:Http Response Details") @@ -118,7 +124,6 @@ tasks.withType { val sovityEdcGroup: String by project group = sovityEdcGroup - publishing { publications { create(project.name) { diff --git a/extensions/wrapper/wrapper-api/build.gradle.kts b/extensions/wrapper/wrapper-api/build.gradle.kts index 2c9b125e6..5ddf07630 100644 --- a/extensions/wrapper/wrapper-api/build.gradle.kts +++ b/extensions/wrapper/wrapper-api/build.gradle.kts @@ -10,34 +10,34 @@ val jettyGroup: String by project plugins { `java-library` `maven-publish` - id("io.swagger.core.v3.swagger-gradle-plugin") version "2.2.14" //./gradlew clean resolve - id("org.hidetake.swagger.generator") version "2.19.2" //./gradlew generateSwaggerUI - id("org.openapi.generator") version "6.6.0" //./gradlew openApiValidate && ./gradlew openApiGenerate + alias(libs.plugins.swagger.plugin) //./gradlew clean resolve + alias(libs.plugins.hidetake.swaggerGenerator) //./gradlew generateSwaggerUI + alias(libs.plugins.openapi.generator) //./gradlew openApiValidate && ./gradlew openApiGenerate } dependencies { - annotationProcessor("org.projectlombok:lombok:${lombokVersion}") - compileOnly("org.projectlombok:lombok:${lombokVersion}") + annotationProcessor(libs.lombok) + compileOnly(libs.lombok) api(project(":extensions:wrapper:wrapper-common-api")) api(project(":extensions:wrapper:wrapper-common-mappers")) api(project(":extensions:wrapper:wrapper-ee-api")) - implementation("jakarta.validation:jakarta.validation-api:3.0.2") - implementation("jakarta.ws.rs:jakarta.ws.rs-api:3.1.0") - implementation("io.swagger.core.v3:swagger-annotations-jakarta:2.2.15") - implementation("io.swagger.core.v3:swagger-jaxrs2-jakarta:2.2.15") - implementation("jakarta.servlet:jakarta.servlet-api:5.0.0") - implementation("jakarta.validation:jakarta.validation-api:3.0.2") - implementation("jakarta.ws.rs:jakarta.ws.rs-api:3.1.0") - implementation("org.apache.commons:commons-lang3:3.13.0") + implementation(libs.jakarta.validationApi) + implementation(libs.jakarta.rsApi) + implementation(libs.swagger.annotationsJakarta) + implementation(libs.swagger.jaxrs2Jakarta) + implementation(libs.jakarta.servlet) + implementation(libs.jakarta.validationApi) + implementation(libs.jakarta.rsApi) + implementation(libs.apache.commonsLang) } val openapiFileDir = "${project.buildDir}/swagger" val openapiFileFilename = "sovity-edc-api-wrapper.yaml" val openapiFile = "$openapiFileDir/$openapiFileFilename" -val openapiDocsDir = project.rootProject.rootDir.resolve("docs") +val openapiDocsDir = project.rootProject.rootDir.resolve("docs").resolve("api") tasks.withType { outputDir = file(openapiFileDir) @@ -49,15 +49,15 @@ tasks.withType { resourcePackages = setOf("de.sovity.edc.ext.wrapper.api") } -tasks.register("copyOpenapiYamlToDocs") { +val copyOpenapiYamlToDocs by tasks.registering(Copy::class) { dependsOn("resolve") from(openapiFile) into(openapiDocsDir) } -task("openApiGenerateTypeScriptClient") { +val openApiGenerateTypeScriptClient by tasks.registering(org.openapitools.generator.gradle.plugin.tasks.GenerateTask::class) { dependsOn("resolve") - dependsOn("copyOpenapiYamlToDocs") + dependsOn(copyOpenapiYamlToDocs) generatorName.set("typescript-fetch") configOptions.set(mutableMapOf( "supportsES6" to "true", @@ -80,7 +80,7 @@ task("openApiGenera tasks.withType { dependsOn("resolve") - dependsOn("openApiGenerateTypeScriptClient") + dependsOn(openApiGenerateTypeScriptClient) from(openapiFileDir) { include(openapiFileFilename) } diff --git a/extensions/wrapper/wrapper-common-api/build.gradle.kts b/extensions/wrapper/wrapper-common-api/build.gradle.kts index b4856c153..083561a82 100644 --- a/extensions/wrapper/wrapper-common-api/build.gradle.kts +++ b/extensions/wrapper/wrapper-common-api/build.gradle.kts @@ -6,16 +6,16 @@ plugins { } dependencies { - annotationProcessor("org.projectlombok:lombok:${lombokVersion}") - compileOnly("org.projectlombok:lombok:${lombokVersion}") + annotationProcessor(libs.lombok) + compileOnly(libs.lombok) - api("jakarta.ws.rs:jakarta.ws.rs-api:3.1.0") - api("jakarta.validation:jakarta.validation-api:3.0.2") - api("io.swagger.core.v3:swagger-annotations-jakarta:2.2.15") - api("io.swagger.core.v3:swagger-jaxrs2-jakarta:2.2.15") - api("jakarta.servlet:jakarta.servlet-api:5.0.0") + api(libs.jakarta.rsApi) + api(libs.jakarta.validationApi) + api(libs.swagger.annotationsJakarta) + api(libs.swagger.jaxrs2Jakarta) + api(libs.jakarta.servlet) - implementation("org.apache.commons:commons-lang3:3.13.0") + implementation(libs.apache.commonsLang) } val sovityEdcGroup: String by project diff --git a/extensions/wrapper/wrapper-common-mappers/build.gradle.kts b/extensions/wrapper/wrapper-common-mappers/build.gradle.kts index 47a6496c8..71fd5b3f8 100644 --- a/extensions/wrapper/wrapper-common-mappers/build.gradle.kts +++ b/extensions/wrapper/wrapper-common-mappers/build.gradle.kts @@ -12,30 +12,30 @@ plugins { } dependencies { - annotationProcessor("org.projectlombok:lombok:${lombokVersion}") - compileOnly("org.projectlombok:lombok:${lombokVersion}") + annotationProcessor(libs.lombok) + compileOnly(libs.lombok) - api("${edcGroup}:policy-model:${edcVersion}") - api("${edcGroup}:core-spi:${edcVersion}") - api("${edcGroup}:transform-core:${edcVersion}") - api("${edcGroup}:transform-spi:${edcVersion}") + api(libs.edc.policyModel) + api(libs.edc.coreSpi) + api(libs.edc.transformCore) + api(libs.edc.transformSpi) api(project(":extensions:wrapper:wrapper-common-api")) api(project(":utils:json-and-jsonld-utils")) - implementation("org.apache.commons:commons-lang3:3.13.0") - implementation("org.apache.commons:commons-collections4:4.4") - implementation("com.vladsch.flexmark:flexmark-all:0.64.8") + implementation(libs.apache.commonsLang) + implementation(libs.apache.commonsCollections) + implementation(libs.flexmark.all) - testAnnotationProcessor("org.projectlombok:lombok:${lombokVersion}") - testCompileOnly("org.projectlombok:lombok:${lombokVersion}") + testAnnotationProcessor(libs.lombok) + testCompileOnly(libs.lombok) testImplementation(project(":utils:test-utils")) - testImplementation("${edcGroup}:json-ld:${edcVersion}") - testImplementation("net.javacrumbs.json-unit:json-unit-assertj:${jsonUnit}") - testImplementation("org.assertj:assertj-core:${assertj}") - testImplementation("org.junit.jupiter:junit-jupiter-api:5.10.0") - testImplementation("org.mockito:mockito-core:${mockitoVersion}") - testImplementation("org.mockito:mockito-inline:${mockitoVersion}") - testImplementation("org.mockito:mockito-junit-jupiter:${mockitoVersion}") - testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.10.0") + testImplementation(libs.edc.jsonLd) + testImplementation(libs.jsonUnit.assertj) + testImplementation(libs.assertj.core) + testImplementation(libs.junit.api) + testImplementation(libs.mockito.core) + testImplementation(libs.mockito.inline) + testImplementation(libs.mockito.junitJupiter) + testRuntimeOnly(libs.junit.engine) } val sovityEdcGroup: String by project diff --git a/extensions/wrapper/wrapper-ee-api/build.gradle.kts b/extensions/wrapper/wrapper-ee-api/build.gradle.kts index eab881398..bc2cae006 100644 --- a/extensions/wrapper/wrapper-ee-api/build.gradle.kts +++ b/extensions/wrapper/wrapper-ee-api/build.gradle.kts @@ -6,19 +6,19 @@ plugins { } dependencies { - annotationProcessor("org.projectlombok:lombok:${lombokVersion}") - compileOnly("org.projectlombok:lombok:${lombokVersion}") + annotationProcessor(libs.lombok) + compileOnly(libs.lombok) api(project(":extensions:wrapper:wrapper-common-api")) - api("jakarta.ws.rs:jakarta.ws.rs-api:3.1.0") - api("jakarta.validation:jakarta.validation-api:3.0.2") - api("io.swagger.core.v3:swagger-annotations-jakarta:2.2.15") - api("io.swagger.core.v3:swagger-jaxrs2-jakarta:2.2.15") - api("jakarta.servlet:jakarta.servlet-api:5.0.0") + api(libs.jakarta.rsApi) + api(libs.jakarta.validationApi) + api(libs.swagger.annotationsJakarta) + api(libs.swagger.jaxrs2Jakarta) + api(libs.jakarta.servlet) - implementation("org.apache.commons:commons-lang3:3.13.0") - implementation("org.glassfish.jersey.media:jersey-media-multipart:3.1.3") + implementation(libs.apache.commonsLang) + implementation(libs.jersey.mediaMultipart) } val sovityEdcGroup: String by project diff --git a/extensions/wrapper/wrapper/build.gradle.kts b/extensions/wrapper/wrapper/build.gradle.kts index 40681b945..c0ebb5be7 100644 --- a/extensions/wrapper/wrapper/build.gradle.kts +++ b/extensions/wrapper/wrapper/build.gradle.kts @@ -14,34 +14,34 @@ plugins { } dependencies { - annotationProcessor("org.projectlombok:lombok:${lombokVersion}") - compileOnly("org.projectlombok:lombok:${lombokVersion}") + annotationProcessor(libs.lombok) + compileOnly(libs.lombok) - implementation("${edcGroup}:api-core:${edcVersion}") - implementation("${edcGroup}:management-api-configuration:${edcVersion}") - implementation("${edcGroup}:dsp-http-spi:${edcVersion}") + implementation(libs.edc.apiCore) + implementation(libs.edc.managementApiConfiguration) + implementation(libs.edc.dspHttpSpi) api(project(":extensions:wrapper:wrapper-api")) api(project(":extensions:wrapper:wrapper-common-mappers")) api(project(":utils:catalog-parser")) api(project(":utils:json-and-jsonld-utils")) - api("${edcGroup}:contract-definition-api:${edcVersion}") - api("${edcGroup}:control-plane-spi:${edcVersion}") - api("${edcGroup}:core-spi:${edcVersion}") - api("${edcGroup}:policy-definition-api:${edcVersion}") - api("${edcGroup}:transfer-process-api:${edcVersion}") - implementation("org.apache.commons:commons-lang3:3.13.0") + api(libs.edc.contractDefinitionApi) + api(libs.edc.controlPlaneSpi) + api(libs.edc.coreSpi) + api(libs.edc.policyDefinitionApi) + api(libs.edc.transferProcessApi) + implementation(libs.apache.commonsLang) - testAnnotationProcessor("org.projectlombok:lombok:${lombokVersion}") - testCompileOnly("org.projectlombok:lombok:${lombokVersion}") + testAnnotationProcessor(libs.lombok) + testCompileOnly(libs.lombok) testImplementation(project(":extensions:wrapper:clients:java-client")) testImplementation(project(":extensions:policy-always-true")) testImplementation(project(":utils:test-utils")) - testImplementation("${edcGroup}:control-plane-core:${edcVersion}") - testImplementation("${edcGroup}:dsp:${edcVersion}") - testImplementation("${edcGroup}:iam-mock:${edcVersion}") - testImplementation("${edcGroup}:junit:${edcVersion}") - testImplementation("${edcGroup}:http:${edcVersion}") { + testImplementation(libs.edc.controlPlaneCore) + testImplementation(libs.edc.dsp) + testImplementation(libs.edc.iamMock) + testImplementation(libs.edc.junit) + testImplementation(libs.edc.http) { exclude(group = "org.eclipse.jetty", module = "jetty-client") exclude(group = "org.eclipse.jetty", module = "jetty-http") exclude(group = "org.eclipse.jetty", module = "jetty-io") @@ -51,24 +51,19 @@ dependencies { } // Updated jetty versions for e.g. CVE-2023-26048 - testImplementation("${jettyGroup}:jetty-client:${jettyVersion}") - testImplementation("${jettyGroup}:jetty-http:${jettyVersion}") - testImplementation("${jettyGroup}:jetty-io:${jettyVersion}") - testImplementation("${jettyGroup}:jetty-server:${jettyVersion}") - testImplementation("${jettyGroup}:jetty-util:${jettyVersion}") - testImplementation("${jettyGroup}:jetty-webapp:${jettyVersion}") + testImplementation(libs.bundles.jetty.cve2023) - testImplementation("${edcGroup}:json-ld:${edcVersion}") - testImplementation("${edcGroup}:dsp-http-spi:${edcVersion}") - testImplementation("${edcGroup}:dsp-api-configuration:${edcVersion}") - testImplementation("${edcGroup}:data-plane-selector-core:${edcVersion}") + testImplementation(libs.edc.jsonLd) + testImplementation(libs.edc.dspHttpSpi) + testImplementation(libs.edc.dspApiConfiguration) + testImplementation(libs.edc.dataPlaneSelectorCore) - testImplementation("net.javacrumbs.json-unit:json-unit-assertj:${jsonUnit}") - testImplementation("io.rest-assured:rest-assured:${restAssured}") - testImplementation("org.mockito:mockito-core:${mockitoVersion}") - testImplementation("org.assertj:assertj-core:${assertj}") - testImplementation("org.junit.jupiter:junit-jupiter-api:5.10.0") - testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.10.0") + testImplementation(libs.jsonUnit.assertj) + testImplementation(libs.restAssured.restAssured) + testImplementation(libs.mockito.core) + testImplementation(libs.assertj.core) + testImplementation(libs.junit.api) + testRuntimeOnly(libs.junit.engine) } tasks.withType { diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 000000000..ca6376cf0 --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,183 @@ +[versions] +assertj = "3.23.1" +awaitility = "4.2.0" +commonsCompress = "1.26.1" +commonsCollections = "4.4" +commonsIo = "2.13.0" +commonsLang = "3.13.0" +edc = "0.2.1.2" +findbugs = "3.0.2" +flexmark = "0.64.8" +flyway = "9.0.1" +gson = "2.10.1" +gsonFire = "1.8.5" +guava = "33.1.0-jre" +hidetakeSwagger = "2.19.2" +jakartaAnnotation = "1.3.5" +jakartaJson = "2.0.1" +jakartaRs = "3.1.0" +jakartaServlet = "5.0.0" +jakartaValidation = "3.0.2" +java = "17" +jersey = "3.1.3" +jetty = "11.0.15" +jsonUnit = "3.2.7" +junit = "5.10.0" +loggingHouse = "0.2.10" +lombok = "1.18.28" +mockito = "4.8.0" +mockserver = "5.15.0" +okhttp = "4.11.0" +okio = "3.9.0" +openapiGenerator = "6.6.0" +openapiJackson = "0.2.6" +postgres = "42.4.0" +quarkus = "2.16.6.Final" +restAssured = "4.5.0" +retry = "1.5.7" +shadow = "7.1.2" +swagger = "1.6.11" +swaggerCore = "2.2.15" +testcontainers = "1.17.6" +titaniumLd = "1.3.2" +tractus = "0.5.3" + +[libraries] + +apache-commonsCollections = { module = "org.apache.commons:commons-collections4", version.ref = "commonsCollections" } +apache-commonsCompress = { module = "org.apache.commons:commons-compress", version.ref = "commonsCompress" } +apache-commonsIo = { module = "commons-io:commons-io", version.ref = "commonsIo" } +apache-commonsLang = { module = "org.apache.commons:commons-lang3", version.ref = "commonsLang" } + +apicatalog-titaniumJsonLd = { module = "com.apicatalog:titanium-json-ld", version.ref = "titaniumLd" } + +assertj-core = { module = "org.assertj:assertj-core", version.ref = "assertj" } + +awaitility-java = { module = "org.awaitility:awaitility", version.ref = "awaitility" } + +edc-apiCore = { module = "org.eclipse.edc:api-core", version.ref = "edc" } +edc-apiObservability = { module = "org.eclipse.edc:api-observability", version.ref = "edc" } +edc-authSpi = { module = "org.eclipse.edc:auth-spi", version.ref = "edc" } +edc-authTokenbased = { module = "org.eclipse.edc:auth-tokenbased", version.ref = "edc" } +edc-boot = { module = "org.eclipse.edc:boot", version.ref = "edc" } +edc-configurationFilesystem = { module = "org.eclipse.edc:configuration-filesystem", version.ref = "edc" } +edc-contractDefinitionApi = { module = "org.eclipse.edc:contract-definition-api", version.ref = "edc" } +edc-contractSpi = { module = "org.eclipse.edc:contract-spi", version.ref = "edc" } +edc-controlPlaneAggregateServices = { module = "org.eclipse.edc:control-plane-aggregate-services", version.ref = "edc" } +edc-controlPlaneCore = { module = "org.eclipse.edc:control-plane-core", version.ref = "edc" } +edc-controlPlaneSpi = { module = "org.eclipse.edc:control-plane-spi", version.ref = "edc" } +edc-controlPlaneSql = { module = "org.eclipse.edc:control-plane-sql", version.ref = "edc" } +edc-coreSpi = { module = "org.eclipse.edc:core-spi", version.ref = "edc" } +edc-dataPlaneCore = { module = "org.eclipse.edc:data-plane-core", version.ref = "edc" } +edc-dataPlaneFramework = { module = "org.eclipse.edc:data-plane-framework", version.ref = "edc" } +edc-dataPlaneHttp = { module = "org.eclipse.edc:data-plane-http", version.ref = "edc" } +edc-dataPlaneSelectorClient = { module = "org.eclipse.edc:data-plane-selector-client", version.ref = "edc" } +edc-dataPlaneSelectorCore = { module = "org.eclipse.edc:data-plane-selector-core", version.ref = "edc" } +edc-dataPlaneUtil = { module = "org.eclipse.edc:data-plane-util", version.ref = "edc" } +edc-dsp = { module = "org.eclipse.edc:dsp", version.ref = "edc" } +edc-dspApiConfiguration = { module = "org.eclipse.edc:dsp-api-configuration", version.ref = "edc" } +edc-dspHttpSpi = { module = "org.eclipse.edc:dsp-http-spi", version.ref = "edc" } +edc-http = { module = "org.eclipse.edc:http", version.ref = "edc" } +edc-iamMock = { module = "org.eclipse.edc:iam-mock", version.ref = "edc" } +edc-jsonLd = { module = "org.eclipse.edc:json-ld", version.ref = "edc" } +edc-jsonLdSpi = { module = "org.eclipse.edc:json-ld-spi", version.ref = "edc" } +edc-junit = { module = "org.eclipse.edc:junit", version.ref = "edc" } +edc-managementApi = { module = "org.eclipse.edc:management-api", version.ref = "edc" } +edc-managementApiConfiguration = { module = "org.eclipse.edc:management-api-configuration", version.ref = "edc" } +edc-monitorJdkLogger = { module = "org.eclipse.edc:monitor-jdk-logger", version.ref = "edc" } +edc-oauth2Core = { module = "org.eclipse.edc:oauth2-core", version.ref = "edc" } +edc-policyDefinitionApi = { module = "org.eclipse.edc:policy-definition-api", version.ref = "edc" } +edc-policyEngineSpi = { module = "org.eclipse.edc:policy-engine-spi", version.ref = "edc" } +edc-policyModel = { module = "org.eclipse.edc:policy-model", version.ref = "edc" } +edc-sqlCore = { module = "org.eclipse.edc:sql-core", version.ref = "edc" } +edc-transactionLocal = { module = "org.eclipse.edc:transaction-local", version.ref = "edc" } +edc-transferDataPlane = { module = "org.eclipse.edc:transfer-data-plane", version.ref = "edc" } +edc-transferProcessApi = { module = "org.eclipse.edc:transfer-process-api", version.ref = "edc" } +edc-transferSpi = { module = "org.eclipse.edc:transfer-spi", version.ref = "edc" } +edc-transformCore = { module = "org.eclipse.edc:transform-core", version.ref = "edc" } +edc-transformSpi = { module = "org.eclipse.edc:transform-spi", version.ref = "edc" } +edc-vaultFilesystem = { module = "org.eclipse.edc:vault-filesystem", version.ref = "edc" } + +findbugs-jsr305 = { module = "com.google.code.findbugs:jsr305", version.ref = "findbugs" } + +flexmark-all = { module = "com.vladsch.flexmark:flexmark-all", version.ref = "flexmark" } + +flyway-core = { module = "org.flywaydb:flyway-core", version.ref = "flyway" } + +gson = { module = "com.google.code.gson:gson", version.ref = "gson" } + +gsonFire = { module = "io.gsonfire:gson-fire", version.ref = "gsonFire" } + +guava = { module = "com.google.guava:guava", version.ref = "guava" } + +jakarta-annotation = { module = "jakarta.annotation:jakarta.annotation-api", version.ref = "jakartaAnnotation" } +jakarta-json = { module = "org.glassfish:jakarta.json", version.ref = "jakartaJson" } +jakarta-rsApi = { module = "jakarta.ws.rs:jakarta.ws.rs-api", version.ref = "jakartaRs" } +jakarta-servlet = { module = "jakarta.servlet:jakarta.servlet-api", version.ref = "jakartaServlet" } +jakarta-validationApi = { module = "jakarta.validation:jakarta.validation-api", version.ref = "jakartaValidation" } + +jersey-mediaMultipart = { module = "org.glassfish.jersey.media:jersey-media-multipart", version.ref = "jersey" } + +jetty-client = { module = "org.eclipse.jetty:jetty-client", version.ref = "jetty" } +jetty-http = { module = "org.eclipse.jetty:jetty-http", version.ref = "jetty" } +jetty-io = { module = "org.eclipse.jetty:jetty-io", version.ref = "jetty" } +jetty-server = { module = "org.eclipse.jetty:jetty-server", version.ref = "jetty" } +jetty-util = { module = "org.eclipse.jetty:jetty-util", version.ref = "jetty" } +jetty-webapp = { module = "org.eclipse.jetty:jetty-webapp", version.ref = "jetty" } + +jsonUnit-assertj = { module = "net.javacrumbs.json-unit:json-unit-assertj", version.ref = "jsonUnit" } + +junit-api = { module = "org.junit.jupiter:junit-jupiter-api", version.ref = "junit" } +junit-engine = { module = "org.junit.jupiter:junit-jupiter-engine", version.ref = "junit" } +junit-params = { module = "org.junit.jupiter:junit-jupiter-params", version.ref = "junit" } + +loggingHouse-client = { module = "logging-house:logging-house-client", version.ref = "loggingHouse" } + +lombok = { module = "org.projectlombok:lombok", version.ref = "lombok" } + +mockito-core = { module = "org.mockito:mockito-core", version.ref = "mockito" } +mockito-inline = { module = "org.mockito:mockito-inline", version.ref = "mockito" } +mockito-junitJupiter = { module = "org.mockito:mockito-junit-jupiter", version.ref = "mockito" } + +mockserver-netty = { module = "org.mock-server:mockserver-netty", version.ref = "mockserver" } + +okhttp-okhttp = { module = "com.squareup.okhttp3:okhttp", version.ref = "okhttp" } +okhttp-loggingInterceptor = { module = "com.squareup.okhttp3:logging-interceptor", version.ref = "okhttp" } + +okio-jvm = { module = "com.squareup.okio:okio-jvm", version.ref = "okio" } + +openapi-jacksonDatabindNullable = { module = "org.openapitools:jackson-databind-nullable", version.ref = "openapiJackson" } + +postgres = { module = "org.postgresql:postgresql", version.ref = "postgres" } + +quarkus-bom = { module = "io.quarkus.platform:quarkus-bom", version.ref = "quarkus" } + +restAssured-restAssured = { module = "io.rest-assured:rest-assured", version.ref = "restAssured" } + +swagger-annotations = { module = "io.swagger:swagger-annotations", version.ref = "swagger" } +swagger-annotationsJakarta = { module = "io.swagger.core.v3:swagger-annotations-jakarta", version.ref = "swaggerCore" } +swagger-jaxrs2Jakarta = { module = "io.swagger.core.v3:swagger-jaxrs2-jakarta", version.ref = "swaggerCore" } + +testcontainers-testcontainers = { module = "org.testcontainers:testcontainers", version.ref = "testcontainers" } +testcontainers-junitJupiter = { module = "org.testcontainers:junit-jupiter", version.ref = "testcontainers" } +testcontainers-postgresql = { module = "org.testcontainers:postgresql", version.ref = "testcontainers" } + +tractus-sqlPool = { module = "org.eclipse.tractusx.edc:sql-pool", version.ref = "tractus" } + +[bundles] +jetty-cve2023 = [ + "jetty-client", + "jetty-http", + "jetty-io", + "jetty-server", + "jetty-util", + "jetty-webapp", +] + +[plugins] +hidetake-swaggerGenerator = { id = "org.hidetake.swagger.generator", version.ref = "hidetakeSwagger" } +openapi-generator = { id = "org.openapi.generator", version.ref = "openapiGenerator" } +quarkus = { id = "io.quarkus", version.ref = "quarkus" } +shadow = { id = "com.github.johnrengelman.shadow", version.ref = "shadow" } +swagger-plugin = { id = "io.swagger.core.v3.swagger-gradle-plugin", version.ref = "swaggerCore" } +retry = { id = "org.gradle.test-retry", version.ref = "retry" } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 070cb702f..48c0a02ca 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/launchers/common/auth-daps/build.gradle.kts b/launchers/common/auth-daps/build.gradle.kts index f2323a3d3..18e774404 100644 --- a/launchers/common/auth-daps/build.gradle.kts +++ b/launchers/common/auth-daps/build.gradle.kts @@ -7,8 +7,8 @@ val edcGroup: String by project dependencies { // OAuth2 IAM - api("${edcGroup}:oauth2-core:${edcVersion}") - api("${edcGroup}:vault-filesystem:${edcVersion}") + api(libs.edc.oauth2Core) + api(libs.edc.vaultFilesystem) } val sovityEdcGroup: String by project diff --git a/launchers/common/auth-mock/build.gradle.kts b/launchers/common/auth-mock/build.gradle.kts index cf90a2430..bf7d74f56 100644 --- a/launchers/common/auth-mock/build.gradle.kts +++ b/launchers/common/auth-mock/build.gradle.kts @@ -7,7 +7,7 @@ val edcGroup: String by project dependencies { // Mock IAM - api("${edcGroup}:iam-mock:${edcVersion}") + api(libs.edc.iamMock) } val sovityEdcGroup: String by project diff --git a/launchers/common/base-mds/build.gradle.kts b/launchers/common/base-mds/build.gradle.kts index 6905a27c1..313ed948b 100644 --- a/launchers/common/base-mds/build.gradle.kts +++ b/launchers/common/base-mds/build.gradle.kts @@ -3,7 +3,7 @@ plugins { } dependencies { - implementation("logging-house:logging-house-client:0.2.10") + implementation(libs.loggingHouse.client) } val sovityEdcGroup: String by project diff --git a/launchers/common/base/build.gradle.kts b/launchers/common/base/build.gradle.kts index ad391bced..67c78ee33 100644 --- a/launchers/common/base/build.gradle.kts +++ b/launchers/common/base/build.gradle.kts @@ -7,17 +7,17 @@ val edcGroup: String by project dependencies { // Control-Plane - api("${edcGroup}:control-plane-core:${edcVersion}") - api("${edcGroup}:management-api:${edcVersion}") - api("${edcGroup}:api-observability:${edcVersion}") - api("${edcGroup}:configuration-filesystem:${edcVersion}") - api("${edcGroup}:control-plane-aggregate-services:${edcVersion}") - api("${edcGroup}:http:${edcVersion}") - api("${edcGroup}:dsp:${edcVersion}") - api("${edcGroup}:json-ld:${edcVersion}") + api(libs.edc.controlPlaneCore) + api(libs.edc.managementApi) + api(libs.edc.apiObservability) + api(libs.edc.configurationFilesystem) + api(libs.edc.controlPlaneAggregateServices) + api(libs.edc.http) + api(libs.edc.dsp) + api(libs.edc.jsonLd) // Data Management API Key - api("${edcGroup}:auth-tokenbased:${edcVersion}") + api(libs.edc.authTokenbased) // sovity Extensions Package api(project(":extensions:sovity-edc-extensions-package")) @@ -25,15 +25,15 @@ dependencies { api(project(":extensions:transfer-process-status-checker")) // Control-plane to Data-plane - api("${edcGroup}:transfer-data-plane:${edcVersion}") - api("${edcGroup}:data-plane-selector-core:${edcVersion}") - api("${edcGroup}:data-plane-selector-client:${edcVersion}") + api(libs.edc.transferDataPlane) + api(libs.edc.dataPlaneSelectorCore) + api(libs.edc.dataPlaneSelectorClient) // Data-plane - api("${edcGroup}:data-plane-http:${edcVersion}") - api("${edcGroup}:data-plane-framework:${edcVersion}") - api("${edcGroup}:data-plane-core:${edcVersion}") - api("${edcGroup}:data-plane-util:${edcVersion}") + api(libs.edc.dataPlaneHttp) + api(libs.edc.dataPlaneFramework) + api(libs.edc.dataPlaneCore) + api(libs.edc.dataPlaneUtil) } val sovityEdcGroup: String by project diff --git a/launchers/common/observability/build.gradle.kts b/launchers/common/observability/build.gradle.kts index 0622ce5f0..93aca628b 100644 --- a/launchers/common/observability/build.gradle.kts +++ b/launchers/common/observability/build.gradle.kts @@ -7,7 +7,7 @@ val edcGroup: String by project dependencies { // Logging - api("${edcGroup}:monitor-jdk-logger:${edcVersion}") + api(libs.edc.monitorJdkLogger) } val sovityEdcGroup: String by project diff --git a/launchers/connectors/mds-ce/build.gradle.kts b/launchers/connectors/mds-ce/build.gradle.kts index 0779bd143..9ba337461 100644 --- a/launchers/connectors/mds-ce/build.gradle.kts +++ b/launchers/connectors/mds-ce/build.gradle.kts @@ -1,7 +1,7 @@ plugins { `java-library` id("application") - id("com.github.johnrengelman.shadow") version "7.1.2" + alias(libs.plugins.shadow) } val edcVersion: String by project diff --git a/launchers/connectors/sovity-ce/build.gradle.kts b/launchers/connectors/sovity-ce/build.gradle.kts index c871ae810..e0eb6d707 100644 --- a/launchers/connectors/sovity-ce/build.gradle.kts +++ b/launchers/connectors/sovity-ce/build.gradle.kts @@ -1,7 +1,7 @@ plugins { `java-library` id("application") - id("com.github.johnrengelman.shadow") version "7.1.2" + alias(libs.plugins.shadow) } val edcVersion: String by project diff --git a/launchers/connectors/sovity-dev/build.gradle.kts b/launchers/connectors/sovity-dev/build.gradle.kts index e4a27c9a9..df05375fa 100644 --- a/launchers/connectors/sovity-dev/build.gradle.kts +++ b/launchers/connectors/sovity-dev/build.gradle.kts @@ -1,7 +1,7 @@ plugins { `java-library` id("application") - id("com.github.johnrengelman.shadow") version "7.1.2" + alias(libs.plugins.shadow) } dependencies { diff --git a/launchers/connectors/test-backend/build.gradle.kts b/launchers/connectors/test-backend/build.gradle.kts index 82a7d8c29..d2ad0609b 100644 --- a/launchers/connectors/test-backend/build.gradle.kts +++ b/launchers/connectors/test-backend/build.gradle.kts @@ -4,14 +4,14 @@ val edcGroup: String by project plugins { `java-library` id("application") - id("com.github.johnrengelman.shadow") version "7.1.2" + alias(libs.plugins.shadow) } dependencies { api("${edcGroup}:connector-core:${edcVersion}") - api("${edcGroup}:boot:${edcVersion}") - api("${edcGroup}:http:${edcVersion}") - api("${edcGroup}:api-observability:${edcVersion}") + api(libs.edc.boot) + api(libs.edc.http) + api(libs.edc.apiObservability) api(project(":extensions:test-backend-controller")) } diff --git a/tests/build.gradle.kts b/tests/build.gradle.kts index 45f2b67a6..1652ef3b8 100644 --- a/tests/build.gradle.kts +++ b/tests/build.gradle.kts @@ -1,6 +1,6 @@ plugins { `java-library` - id("org.gradle.test-retry") version "1.5.7" + alias(libs.plugins.retry) } val assertj: String by project @@ -16,21 +16,19 @@ dependencies { api(project(":launchers:common:base")) api(project(":launchers:common:auth-mock")) - testAnnotationProcessor("org.projectlombok:lombok:${lombokVersion}") - testCompileOnly("org.projectlombok:lombok:${lombokVersion}") + testAnnotationProcessor(libs.lombok) + testCompileOnly(libs.lombok) testImplementation(project(":utils:test-utils")) testImplementation(project(":extensions:test-backend-controller")) testImplementation(project(":utils:test-connector-remote")) testImplementation(project(":extensions:wrapper:clients:java-client")) - testImplementation("net.javacrumbs.json-unit:json-unit-assertj:${jsonUnit}") - testImplementation("org.mockito:mockito-core:${mockitoVersion}") - testImplementation("org.assertj:assertj-core:${assertj}") - testImplementation("org.junit.jupiter:junit-jupiter-api:${jupiterVersion}") - testImplementation("org.junit.jupiter:junit-jupiter-params:${jupiterVersion}") - testImplementation("org.mock-server:mockserver-netty:${httpMockServerVersion}") { - // TODO: increase minimum guava version - } - testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.10.0") + testImplementation(libs.jsonUnit.assertj) + testImplementation(libs.mockito.core) + testImplementation(libs.assertj.core) + testImplementation(libs.junit.api) + testImplementation(libs.junit.params) + testImplementation(libs.mockserver.netty) + testRuntimeOnly(libs.junit.engine) } tasks.withType { diff --git a/utils/catalog-parser/build.gradle.kts b/utils/catalog-parser/build.gradle.kts index cdd99b1e4..7e1ca9a98 100644 --- a/utils/catalog-parser/build.gradle.kts +++ b/utils/catalog-parser/build.gradle.kts @@ -12,29 +12,29 @@ plugins { } dependencies { - annotationProcessor("org.projectlombok:lombok:${lombokVersion}") - compileOnly("org.projectlombok:lombok:${lombokVersion}") + annotationProcessor(libs.lombok) + compileOnly(libs.lombok) - api("org.glassfish:jakarta.json:${jakartaJsonVersion}") - api("${edcGroup}:core-spi:${edcVersion}") - api("${edcGroup}:control-plane-spi:${edcVersion}") - api("${edcGroup}:json-ld:${edcVersion}") + api(libs.jakarta.json) + api(libs.edc.coreSpi) + api(libs.edc.controlPlaneSpi) + api(libs.edc.jsonLd) implementation(project(":utils:json-and-jsonld-utils")) - implementation("org.apache.commons:commons-lang3:3.13.0") - implementation("org.apache.commons:commons-collections4:4.4") - implementation("commons-io:commons-io:2.13.0") + implementation(libs.apache.commonsLang) + implementation(libs.apache.commonsCollections) + implementation(libs.apache.commonsIo) - testAnnotationProcessor("org.projectlombok:lombok:${lombokVersion}") - testCompileOnly("org.projectlombok:lombok:${lombokVersion}") + testAnnotationProcessor(libs.lombok) + testCompileOnly(libs.lombok) testImplementation(project(":utils:test-utils")) - testImplementation("org.mockito:mockito-core:${mockitoVersion}") - testImplementation("org.mockito:mockito-inline:${mockitoVersion}") - testImplementation("org.mockito:mockito-junit-jupiter:${mockitoVersion}") - testImplementation("org.assertj:assertj-core:${assertj}") - testImplementation("org.junit.jupiter:junit-jupiter-api:5.10.0") - testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.10.0") + testImplementation(libs.mockito.core) + testImplementation(libs.mockito.inline) + testImplementation(libs.mockito.junitJupiter) + testImplementation(libs.assertj.core) + testImplementation(libs.junit.api) + testRuntimeOnly(libs.junit.engine) } val sovityEdcGroup: String by project diff --git a/utils/json-and-jsonld-utils/build.gradle.kts b/utils/json-and-jsonld-utils/build.gradle.kts index fb5ae7d64..b31e53c36 100644 --- a/utils/json-and-jsonld-utils/build.gradle.kts +++ b/utils/json-and-jsonld-utils/build.gradle.kts @@ -12,24 +12,24 @@ plugins { } dependencies { - annotationProcessor("org.projectlombok:lombok:${lombokVersion}") - compileOnly("org.projectlombok:lombok:${lombokVersion}") - - api("org.glassfish:jakarta.json:${jakartaJsonVersion}") - api("com.apicatalog:titanium-json-ld:1.3.2") - - implementation("org.apache.commons:commons-lang3:3.13.0") - implementation("org.apache.commons:commons-collections4:4.4") - implementation("commons-io:commons-io:2.13.0") - - testAnnotationProcessor("org.projectlombok:lombok:${lombokVersion}") - testCompileOnly("org.projectlombok:lombok:${lombokVersion}") - testImplementation("org.mockito:mockito-core:${mockitoVersion}") - testImplementation("org.mockito:mockito-inline:${mockitoVersion}") - testImplementation("org.mockito:mockito-junit-jupiter:${mockitoVersion}") - testImplementation("org.assertj:assertj-core:${assertj}") - testImplementation("org.junit.jupiter:junit-jupiter-api:5.10.0") - testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.10.0") + annotationProcessor(libs.lombok) + compileOnly(libs.lombok) + + api(libs.jakarta.json) + api(libs.apicatalog.titaniumJsonLd) + + implementation(libs.apache.commonsLang) + implementation(libs.apache.commonsCollections) + implementation(libs.apache.commonsIo) + + testAnnotationProcessor(libs.lombok) + testCompileOnly(libs.lombok) + testImplementation(libs.mockito.core) + testImplementation(libs.mockito.inline) + testImplementation(libs.mockito.junitJupiter) + testImplementation(libs.assertj.core) + testImplementation(libs.junit.api) + testRuntimeOnly(libs.junit.engine) } val sovityEdcGroup: String by project diff --git a/utils/test-connector-remote/build.gradle.kts b/utils/test-connector-remote/build.gradle.kts index 53563830f..0d3e18295 100644 --- a/utils/test-connector-remote/build.gradle.kts +++ b/utils/test-connector-remote/build.gradle.kts @@ -11,23 +11,23 @@ plugins { } dependencies { - annotationProcessor("org.projectlombok:lombok:${lombokVersion}") - compileOnly("org.projectlombok:lombok:${lombokVersion}") + annotationProcessor(libs.lombok) + compileOnly(libs.lombok) - api("org.junit.jupiter:junit-jupiter-api:5.10.0") - implementation("org.apache.commons:commons-lang3:3.13.0") + api(libs.junit.api) + implementation(libs.apache.commonsLang) - api("${edcGroup}:junit:${edcVersion}") - api("org.awaitility:awaitility:${awaitilityVersion}") + api(libs.edc.junit) + api(libs.awaitility.java) api(project(":utils:json-and-jsonld-utils")) - implementation("${edcGroup}:sql-core:${edcVersion}") - implementation("${edcGroup}:json-ld-spi:${edcVersion}") - implementation("${edcGroup}:json-ld:${edcVersion}") - implementation("org.assertj:assertj-core:${assertj}") - implementation("org.testcontainers:testcontainers:${testcontainersVersion}") - implementation("org.testcontainers:junit-jupiter:${testcontainersVersion}") - implementation("org.testcontainers:postgresql:${testcontainersVersion}") - implementation("io.rest-assured:rest-assured:${restAssured}") + implementation(libs.edc.sqlCore) + implementation(libs.edc.jsonLdSpi) + implementation(libs.edc.jsonLd) + implementation(libs.assertj.core) + implementation(libs.testcontainers.testcontainers) + implementation(libs.testcontainers.junitJupiter) + implementation(libs.testcontainers.postgresql) + implementation(libs.restAssured.restAssured) } val sovityEdcExtensionGroup: String by project