diff --git a/buildSrc/src/main/kotlin/Config.kt b/buildSrc/src/main/kotlin/Config.kt index 9ed4352d36..8c259ea770 100644 --- a/buildSrc/src/main/kotlin/Config.kt +++ b/buildSrc/src/main/kotlin/Config.kt @@ -62,7 +62,7 @@ val HOST_OS: OperatingSystem = findHostOs() object Realm { val ciBuild = (System.getenv("CI") != null) - const val version = "2.3.0" + const val version = "2.3.0-SNAPSHOT" const val group = "io.realm.kotlin" const val projectUrl = "https://realm.io" const val pluginPortalId = "io.realm.kotlin" diff --git a/integration-tests/gradle/gradle72-test/build.gradle.kts b/integration-tests/gradle/gradle72-test/build.gradle.kts index 377571d6c5..6b3b4ecafa 100644 --- a/integration-tests/gradle/gradle72-test/build.gradle.kts +++ b/integration-tests/gradle/gradle72-test/build.gradle.kts @@ -26,6 +26,13 @@ buildscript { it.substringAfter("\"").substringBefore("\"") } + extra["kotlinVersion"] = file("${rootProject.rootDir.absolutePath}/../../../buildSrc/src/main/kotlin/Config.kt") + .readLines() + .first { it.contains("const val kotlin") } + .let { + it.substringAfter("\"").substringBefore("\"") + } + repositories { maven(url = "file://${rootProject.rootDir.absolutePath}/../../../packages/build/m2-buildrepo") gradlePluginPortal() @@ -34,7 +41,7 @@ buildscript { } dependencies { classpath("com.android.tools.build:gradle:7.1.3") - classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:2.0.0") + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${rootProject.extra["kotlinVersion"]}") classpath("io.realm.kotlin:gradle-plugin:${rootProject.extra["realmVersion"]}") } } diff --git a/integration-tests/gradle/gradle75-test/build.gradle.kts b/integration-tests/gradle/gradle75-test/build.gradle.kts index 67f40a8d13..816b752028 100644 --- a/integration-tests/gradle/gradle75-test/build.gradle.kts +++ b/integration-tests/gradle/gradle75-test/build.gradle.kts @@ -26,6 +26,13 @@ buildscript { it.substringAfter("\"").substringBefore("\"") } + extra["kotlinVersion"] = file("${rootProject.rootDir.absolutePath}/../../../buildSrc/src/main/kotlin/Config.kt") + .readLines() + .first { it.contains("const val kotlin") } + .let { + it.substringAfter("\"").substringBefore("\"") + } + repositories { maven(url = "file://${rootProject.rootDir.absolutePath}/../../../packages/build/m2-buildrepo") gradlePluginPortal() @@ -34,7 +41,7 @@ buildscript { } dependencies { classpath("com.android.tools.build:gradle:7.4.0") - classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:2.0.0") + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${rootProject.extra["kotlinVersion"]}") classpath("io.realm.kotlin:gradle-plugin:${rootProject.extra["realmVersion"]}") } } diff --git a/integration-tests/gradle/gradle8-test/build.gradle.kts b/integration-tests/gradle/gradle8-test/build.gradle.kts index 43dc5ee957..767b12cee9 100644 --- a/integration-tests/gradle/gradle8-test/build.gradle.kts +++ b/integration-tests/gradle/gradle8-test/build.gradle.kts @@ -26,6 +26,13 @@ buildscript { it.substringAfter("\"").substringBefore("\"") } + extra["kotlinVersion"] = file("${rootProject.rootDir.absolutePath}/../../../buildSrc/src/main/kotlin/Config.kt") + .readLines() + .first { it.contains("const val kotlin") } + .let { + it.substringAfter("\"").substringBefore("\"") + } + repositories { maven(url = "file://${rootProject.rootDir.absolutePath}/../../../packages/build/m2-buildrepo") gradlePluginPortal() @@ -34,7 +41,7 @@ buildscript { } dependencies { classpath("com.android.tools.build:gradle:8.1.0") - classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:2.0.0") + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${rootProject.extra["kotlinVersion"]}") classpath("io.realm.kotlin:gradle-plugin:${rootProject.extra["realmVersion"]}") } } diff --git a/integration-tests/gradle/gradle85-test/build.gradle.kts b/integration-tests/gradle/gradle85-test/build.gradle.kts index 43dc5ee957..767b12cee9 100644 --- a/integration-tests/gradle/gradle85-test/build.gradle.kts +++ b/integration-tests/gradle/gradle85-test/build.gradle.kts @@ -26,6 +26,13 @@ buildscript { it.substringAfter("\"").substringBefore("\"") } + extra["kotlinVersion"] = file("${rootProject.rootDir.absolutePath}/../../../buildSrc/src/main/kotlin/Config.kt") + .readLines() + .first { it.contains("const val kotlin") } + .let { + it.substringAfter("\"").substringBefore("\"") + } + repositories { maven(url = "file://${rootProject.rootDir.absolutePath}/../../../packages/build/m2-buildrepo") gradlePluginPortal() @@ -34,7 +41,7 @@ buildscript { } dependencies { classpath("com.android.tools.build:gradle:8.1.0") - classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:2.0.0") + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${rootProject.extra["kotlinVersion"]}") classpath("io.realm.kotlin:gradle-plugin:${rootProject.extra["realmVersion"]}") } }