Skip to content

Conversation

@mickael-menu
Copy link
Member

@mickael-menu mickael-menu commented Mar 24, 2022

While integrating the latest Kotlin toolkit using the Gradle Kotlin DSL as a Git submodule, I faced this error:
Screenshot 2022-03-24 at 16 41 58

According to this Gradle forum post, we can fix this by moving the version management to settings.gradle.kts instead.

Some additional info from the official documentation: https://docs.gradle.org/current/userguide/plugins.html#sec:plugin_version_management

@mickael-menu mickael-menu marked this pull request as ready for review March 24, 2022 16:52
@mickael-menu
Copy link
Member Author

I tested that this works with JitPack builds using:

diff --git a/test-app/build.gradle.kts b/test-app/build.gradle.kts
index a20d63be9..f0ad51afd 100644
--- a/test-app/build.gradle.kts
+++ b/test-app/build.gradle.kts
@@ -63,13 +63,7 @@ dependencies {
     implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.10")
     implementation("androidx.legacy:legacy-support-v4:1.0.0")
 
-    implementation(project(":readium:shared"))
-    implementation(project(":readium:streamer"))
-    implementation(project(":readium:navigator"))
-    implementation(project(":readium:navigator-media2"))
-
-    implementation(project(":readium:opds"))
-    implementation(project(":readium:lcp"))
+    implementation("com.github.readium:kotlin-toolkit:fix~gradle-versions-SNAPSHOT")
 
     implementation("androidx.core:core-ktx:1.7.0")
     implementation("androidx.activity:activity-ktx:1.4.0")

It works as well integrated as a Git submodule, but I needed to add this in my (Groovy) build.gradle:

buildscript {
    dependencies {
        classpath 'org.jetbrains.dokka:dokka-gradle-plugin:1.6.10'
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants