diff --git a/build.gradle b/build.gradle.kts similarity index 52% rename from build.gradle rename to build.gradle.kts index 4bade2cf..3dd8e574 100644 --- a/build.gradle +++ b/build.gradle.kts @@ -1,5 +1,5 @@ // -// Copyright (c) 2018 Couchbase, Inc. All rights reserved. +// Copyright (c) 2026 Couchbase, Inc. All rights reserved. // // Licensed under the Couchbase License Agreement (the "License"); // you may not use this file except in compliance with the License. @@ -12,22 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. // -buildscript { - ext { - KOTLIN_VERSION = '1.9.24' - JACOCO_VERSION = '0.8.10' - } - repositories { - google() - mavenCentral() - } +// Plugin versions and dependency versions are centralized in gradle/libs.versions.toml. +// Plugin resolution is configured via pluginManagement in settings.gradle.kts. - // Kotlin has to be here or its plugin throws a fit - // Android has to be here or gradle thows a fit. - dependencies { - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${KOTLIN_VERSION}" - classpath 'com.android.tools.build:gradle:8.4.0' - } +tasks.register("devPublish") { + dependsOn( + ":ce:android:ce_android:devPublish", + ":ce:android-ktx:ce_android-ktx:devPublish", + ":ce:java:ce_java:devPublish" + ) } - diff --git a/ce b/ce index c677cda4..48bdbb56 160000 --- a/ce +++ b/ce @@ -1 +1 @@ -Subproject commit c677cda4bb7c28bdb7eefe205125a7caa95fa688 +Subproject commit 48bdbb56a3fe3db71f92deba1f167a53f0b76703 diff --git a/common b/common index b7bcaf74..e5073332 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit b7bcaf74dd4f4752ba75e05f5adaaf6988931df6 +Subproject commit e507333244feb93d7196b621b046aaf5b4195b8b diff --git a/core_version.txt b/core_version.txt index a0d3ecb8..ef241730 100644 --- a/core_version.txt +++ b/core_version.txt @@ -1 +1 @@ -4.1.0-24 +4.1.0-64 diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 00000000..ec8801f0 --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,43 @@ +# This file will leave here and in the EE root, please keep them in sync + +[versions] +compileSdk = "36" +minSdk = "24" +buildTools = "36.0.0" +ndk = "27.2.12479018" +cmake = "3.30.5" +kotlin = "2.3.20" +agp = "9.1.0" +spotbugsPlugin = "6.4.8" +okhttp = "4.12.0" +checkstyle = "8.42" +sevntu = "1.44.1" +pmd = "6.55.0" +spotbugs = "4.9.8" +androidxAnnotation = "1.10.0" +junit = "4.13.2" +androidxTest = "1.7.0" +dokka = "1.9.20" +coroutines = "1.8.0" +work = "2.8.1" + +[libraries] +okhttp = { module = "com.squareup.okhttp3:okhttp", version.ref = "okhttp" } +kotlin-stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlin" } +spotbugs-annotations = { module = "com.github.spotbugs:spotbugs-annotations", version.ref = "spotbugs" } +androidx-annotation = { module = "androidx.annotation:annotation", version.ref = "androidxAnnotation" } +junit = { module = "junit:junit", version.ref = "junit" } +androidx-test-runner = { module = "androidx.test:runner", version.ref = "androidxTest" } +androidx-test-core = { module = "androidx.test:core", version.ref = "androidxTest" } +androidx-test-rules = { module = "androidx.test:rules", version.ref = "androidxTest" } +sevntu = { module = "com.github.sevntu-checkstyle:sevntu-checks", version.ref = "sevntu" } +kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines" } +androidx-work-runtime-ktx = { module = "androidx.work:work-runtime-ktx", version.ref = "work" } +androidx-work-testing = { module = "androidx.work:work-testing", version.ref = "work" } + +[plugins] +android-library = { id = "com.android.library", version.ref = "agp" } +spotbugs = { id = "com.github.spotbugs-base", version.ref = "spotbugsPlugin" } +kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } +kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } +dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 17655d0e..2f2958b9 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/settings.gradle b/settings.gradle.kts similarity index 55% rename from settings.gradle rename to settings.gradle.kts index 6e845439..9a0f19b4 100644 --- a/settings.gradle +++ b/settings.gradle.kts @@ -1,5 +1,13 @@ +pluginManagement { + repositories { + google() + gradlePluginPortal() + mavenCentral() + } +} + // This project contains two distinct applications: -// 1) the CBL-Android-EE source and the code to build, unit-test and publish it to maven +// 1) the CBL-Android-CE source and the code to build, unit-test and publish it to maven // 2) an independent application that runs automated tests on the application build in #1 // // The two apps are mutually exclusive: the test app is built and run only by CI machines @@ -12,18 +20,10 @@ // for the test projects in sync // -// normal source development -def module = "lib" - -// use the test application, instead, if testing -if (hasProperty("automatedTests") && automatedTests.toBoolean()) { module = 'test' } +val module = if (providers.gradleProperty("automatedTests").map { it.toBoolean() }.getOrElse(false)) "test" else "lib" -include "ce:android:lib", "ee:android:lib", "ce:android-ktx:${module}", "ee:android-ktx:${module}", "ce:java:${module}", "ee:java:${module}" +include("ce:android:lib", "ce:android-ktx:$module", "ce:java:$module") -project(":ee:android:lib").name = "ee_android" project(":ce:android:lib").name = "ce_android" -project(":ee:android-ktx:${module}").name = "ee_android-ktx" -project(":ce:android-ktx:${module}").name = "ce_android-ktx" -project(":ee:java:${module}").name = "ee_java" -project(":ce:java:${module}").name = "ce_java" - +project(":ce:android-ktx:$module").name = "ce_android-ktx" +project(":ce:java:$module").name = "ce_java" \ No newline at end of file