diff --git a/build.gradle.kts b/build.gradle.kts index 687fb271..11ab35dc 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -35,7 +35,6 @@ allprojects { versionRegex.matches(candidate.version) || (candidate.group in setOf("org.apache.camel", "org.apache.camel.springboot") && !candidate.version.startsWith("3.18")) - || (candidate.group.startsWith("de.fraunhofer.iais.eis.ids") && !candidate.version.startsWith("4.1.")) } } } @@ -43,6 +42,8 @@ allprojects { subprojects { repositories { mavenCentral() + // Legacy IAIS Infomodel artifact repo + maven("https://gitlab.cc-asp.fraunhofer.de/api/v4/projects/55371/packages/maven") mavenLocal() } @@ -62,20 +63,21 @@ subprojects { } dependencies { + val versions = rootProject.libs.versions // Some versions are downgraded for unknown reasons, fix this here val groupPins = mapOf( "org.jetbrains.kotlin" to mapOf( - "*" to rootProject.libs.versions.kotlin.get() + "*" to versions.kotlin.get() ), "com.google.guava" to mapOf( - "guava" to rootProject.libs.versions.guava.get() + "guava" to versions.guava.get() ), "com.sun.xml.bind" to mapOf( - "jaxb-core" to rootProject.libs.versions.jaxbCore.get(), - "jaxb-impl" to rootProject.libs.versions.jaxbImpl.get() + "jaxb-core" to versions.jaxbCore.get(), + "jaxb-impl" to versions.jaxbImpl.get() ), "org.eclipse.jetty" to mapOf( - "*" to rootProject.libs.versions.jetty.get() + "*" to versions.jetty.get() ) ) // We need to explicitly specify the kotlin version for all kotlin dependencies, diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 8da1ffee..8079e91a 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,5 +1,5 @@ [versions] -idscp2 = "0.18.1" +idscp2 = "0.18.0" ktlint = "0.50.0" # Kotlin library/compiler version diff --git a/ids-connector/build.gradle.kts b/ids-connector/build.gradle.kts index db109ee3..3044c2d8 100644 --- a/ids-connector/build.gradle.kts +++ b/ids-connector/build.gradle.kts @@ -40,7 +40,7 @@ dependencies { // Clears library JARs before copying val cleanLibs = tasks.create("deleteLibs") { - delete("$buildDir/libs/libraryJars", "$buildDir/libs/projectJars") + delete(layout.buildDirectory.dir("libs/libraryJars"), layout.buildDirectory.dir("libs/projectJars")) } // Copies all runtime library JARs to build/libs/lib val rootProjectDir: String = rootProject.projectDir.absolutePath @@ -50,7 +50,7 @@ val copyLibraryJars = tasks.create("copyLibraryJars") { it.absolutePath.startsWith(rootProjectDir) } ) - destinationDir = file("$buildDir/libs/libraryJars") + destinationDir = file(layout.buildDirectory.dir("libs/libraryJars")) dependsOn(cleanLibs) } val copyProjectJars = tasks.create("copyProjectJars") { @@ -59,7 +59,7 @@ val copyProjectJars = tasks.create("copyProjectJars") { it.absolutePath.startsWith(rootProjectDir) } ) - destinationDir = file("$buildDir/libs/projectJars") + destinationDir = file(layout.buildDirectory.dir("libs/projectJars")) dependsOn(cleanLibs) } @@ -73,7 +73,7 @@ tasks.withType { doLast { Files.copy( Paths.get(archiveFile.get().toString()), - Paths.get("$buildDir/libs/projectJars/${archiveFileName.get()}") + Paths.get(layout.buildDirectory.file("libs/projectJars/${archiveFileName.get()}").get().toString()) ) } } @@ -97,7 +97,7 @@ buildConfig { configure { module { // mark as generated sources for IDEA - generatedSourceDirs.add(File("$buildDir/generated/source/buildConfig/main/main")) + generatedSourceDirs.add(layout.buildDirectory.dir("generated/source/buildConfig/main/main").get().asFile) } } diff --git a/ids-container-manager/build.gradle.kts b/ids-container-manager/build.gradle.kts index 0425cecc..4ed3e600 100644 --- a/ids-container-manager/build.gradle.kts +++ b/ids-container-manager/build.gradle.kts @@ -13,7 +13,7 @@ protobuf { tasks.clean { // Sometimes required to fix an error caused by non-existence of this folder. doLast { - mkdir("${project.buildDir}/classes/kotlin/main") + mkdir(layout.buildDirectory.dir("classes/kotlin/main")) } } diff --git a/ids-infomodel-manager/build.gradle.kts b/ids-infomodel-manager/build.gradle.kts index b204c655..b293acd3 100644 --- a/ids-infomodel-manager/build.gradle.kts +++ b/ids-infomodel-manager/build.gradle.kts @@ -19,7 +19,7 @@ buildConfig { configure { module { // mark as generated sources for IDEA - generatedSourceDirs.add(File("$buildDir/generated/source/buildConfig/main/main")) + generatedSourceDirs.add(layout.buildDirectory.dir("generated/source/buildConfig/main/main").get().asFile) } }