diff --git a/buildSrc/src/main/kotlin/cpg.common-conventions.gradle.kts b/buildSrc/src/main/kotlin/cpg.common-conventions.gradle.kts index 42ddb6e7d9..f3bd20c5bb 100644 --- a/buildSrc/src/main/kotlin/cpg.common-conventions.gradle.kts +++ b/buildSrc/src/main/kotlin/cpg.common-conventions.gradle.kts @@ -1,3 +1,4 @@ +import org.gradle.accessors.dm.LibrariesForLibs import org.jetbrains.dokka.gradle.DokkaTask import org.jetbrains.kotlin.gradle.tasks.KotlinCompile import org.gradle.api.services.BuildService; @@ -164,3 +165,11 @@ kover { } } } + +// Common dependencies that we need for all modules +val libs = the() // necessary to be able to use the version catalog in buildSrc +dependencies { + implementation(libs.apache.commons.lang3) + implementation(libs.neo4j.ogm.core) + implementation(libs.jackson) +} \ No newline at end of file diff --git a/cpg-core/build.gradle.kts b/cpg-core/build.gradle.kts index d21606d204..40d27d3269 100644 --- a/cpg-core/build.gradle.kts +++ b/cpg-core/build.gradle.kts @@ -52,13 +52,10 @@ tasks.test { } dependencies { - api(libs.apache.commons.lang3) - api(libs.neo4j.ogm.core) - api(libs.jackson) + api(libs.slf4j.api) implementation(libs.bundles.log4j) implementation(libs.kotlin.reflect) - implementation(libs.jacksonyml) testImplementation(libs.junit.params) diff --git a/cpg-language-cxx/build.gradle.kts b/cpg-language-cxx/build.gradle.kts index 71a3cac919..219448f656 100644 --- a/cpg-language-cxx/build.gradle.kts +++ b/cpg-language-cxx/build.gradle.kts @@ -41,15 +41,15 @@ publishing { dependencies { // Eclipse dependencies - api(libs.eclipse.runtime) { + implementation(libs.eclipse.runtime) { // For some reason, this group name is wrong exclude("org.osgi.service", "org.osgi.service.prefs") } - api(libs.osgi.service) - api(libs.icu4j) + implementation(libs.osgi.service) + implementation(libs.icu4j) // CDT - api(libs.eclipse.cdt.core) + implementation(libs.eclipse.cdt.core) testImplementation(libs.junit.params) testImplementation(project(":cpg-analysis")) diff --git a/cpg-language-java/build.gradle.kts b/cpg-language-java/build.gradle.kts index d8a0986a68..5f56c6077a 100644 --- a/cpg-language-java/build.gradle.kts +++ b/cpg-language-java/build.gradle.kts @@ -40,5 +40,5 @@ publishing { } dependencies { - api(libs.javaparser) + implementation(libs.javaparser) } diff --git a/cpg-language-jvm/build.gradle.kts b/cpg-language-jvm/build.gradle.kts index 6502dfa23a..16e6c00fe8 100644 --- a/cpg-language-jvm/build.gradle.kts +++ b/cpg-language-jvm/build.gradle.kts @@ -40,7 +40,7 @@ publishing { } dependencies { - api(libs.bundles.sootup) + implementation(libs.bundles.sootup) // needed until https://github.com/antlr/antlr4/issues/3895 is fixed runtimeOnly("org.antlr:antlr4-runtime") { version { diff --git a/cpg-neo4j/build.gradle.kts b/cpg-neo4j/build.gradle.kts index 82377fb321..496f37df4e 100644 --- a/cpg-neo4j/build.gradle.kts +++ b/cpg-neo4j/build.gradle.kts @@ -49,10 +49,10 @@ publishing { dependencies { // neo4j - api(libs.bundles.neo4j) + implementation(libs.bundles.neo4j) // Command line interface support - api(libs.picocli) + implementation(libs.picocli) annotationProcessor(libs.picocli.codegen) testImplementation(testFixtures(projects.cpgCore)) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index bb1dda77cc..a4ad4e068f 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -6,6 +6,7 @@ log4j = "2.24.0" spotless = "6.25.0" nexus-publish = "2.0.0" sootup = "1.3.0" +slf4j = "2.0.16" [libraries] kotlin-reflect = { module = "org.jetbrains.kotlin:kotlin-reflect", version.ref = "kotlin"} @@ -22,6 +23,8 @@ kotlin-test-junit5 = { module = "org.jetbrains.kotlin:kotlin-test-junit5", versi log4j-impl = { module = "org.apache.logging.log4j:log4j-slf4j2-impl", version.ref = "log4j" } log4j-core = { module = "org.apache.logging.log4j:log4j-core", version.ref = "log4j" } +slf4j-api = { module = "org.slf4j:slf4j-api", version.ref = "slf4j"} + apache-commons-lang3 = { module = "org.apache.commons:commons-lang3", version = "3.17.0"} neo4j-ogm-core = { module = "org.neo4j:neo4j-ogm-core", version.ref = "neo4j"} neo4j-ogm-bolt-driver = { module = "org.neo4j:neo4j-ogm-bolt-driver", version.ref = "neo4j"}