Skip to content

Commit

Permalink
Reverted to available idscp2 dependency, added legacy infomodel repo
Browse files Browse the repository at this point in the history
  • Loading branch information
milux committed Nov 7, 2023
1 parent b204eb6 commit 70ec924
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 14 deletions.
14 changes: 8 additions & 6 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,15 @@ 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."))
}
}
}

subprojects {
repositories {
mavenCentral()
// Legacy IAIS Infomodel artifact repo
maven("https://gitlab.cc-asp.fraunhofer.de/api/v4/projects/55371/packages/maven")
mavenLocal()
}

Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[versions]
idscp2 = "0.18.1"
idscp2 = "0.18.0"
ktlint = "0.50.0"

# Kotlin library/compiler version
Expand Down
10 changes: 5 additions & 5 deletions ids-connector/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ dependencies {

// Clears library JARs before copying
val cleanLibs = tasks.create<Delete>("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
Expand All @@ -50,7 +50,7 @@ val copyLibraryJars = tasks.create<Copy>("copyLibraryJars") {
it.absolutePath.startsWith(rootProjectDir)
}
)
destinationDir = file("$buildDir/libs/libraryJars")
destinationDir = file(layout.buildDirectory.dir("libs/libraryJars"))
dependsOn(cleanLibs)
}
val copyProjectJars = tasks.create<Copy>("copyProjectJars") {
Expand All @@ -59,7 +59,7 @@ val copyProjectJars = tasks.create<Copy>("copyProjectJars") {
it.absolutePath.startsWith(rootProjectDir)
}
)
destinationDir = file("$buildDir/libs/projectJars")
destinationDir = file(layout.buildDirectory.dir("libs/projectJars"))
dependsOn(cleanLibs)
}

Expand All @@ -73,7 +73,7 @@ tasks.withType<Jar> {
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())
)
}
}
Expand All @@ -97,7 +97,7 @@ buildConfig {
configure<IdeaModel> {
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)
}
}

Expand Down
2 changes: 1 addition & 1 deletion ids-container-manager/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
}
}

Expand Down
2 changes: 1 addition & 1 deletion ids-infomodel-manager/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ buildConfig {
configure<IdeaModel> {
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)
}
}

Expand Down

0 comments on commit 70ec924

Please sign in to comment.