Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dependencies {
implementation(files(libs.javaClass.superclass.protectionDomain.codeSource.location))
implementation(plugin(libs.plugins.kotlin.multiplatform))
implementation(plugin(libs.plugins.kotlinx.atomicfu))
implementation(plugin(libs.plugins.android.library))
implementation(plugin(libs.plugins.android.kotlin.multiplatform.library))
implementation(plugin(libs.plugins.dokka))
implementation(libs.dokka.versioning)
implementation(plugin(libs.plugins.vanniktech.maven.publish))
Expand Down
39 changes: 20 additions & 19 deletions buildSrc/src/main/kotlin/base-convention.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,30 @@ import rules.applyCouchbaseLiteRule
plugins {
`kotlin-multiplatform`
`kotlin-native-cocoapods`
`android-library`
com.android.kotlin.multiplatform.library
org.jetbrains.kotlinx.atomicfu
}

kotlin {
android {
compileSdk = 36
minSdk = 22
withDeviceTestBuilder {
sourceSetTreeName = "test"
}.configure {
instrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
targetSdk {
version = release(36)
}
}
compilerOptions {
jvmTarget.set(JvmTarget.JVM_1_8)
}
// required by coroutines 1.7.0+ to avoid errors:
// 6 files found with path 'META-INF/LICENSE.md'
packaging.resources.pickFirsts += "META-INF/**"
}

cocoapods {
version = project.version.toString()
homepage = "https://kotbase.dev/"
Expand Down Expand Up @@ -70,24 +89,6 @@ tasks.withType<KotlinCompile>().configureEach {
compilerOptions.jvmTarget.set(JvmTarget.JVM_1_8)
}

android {
compileSdk = 36
defaultConfig {
minSdk = 22
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
testOptions {
targetSdk = 36
}
// required by coroutines 1.7.0+ to avoid errors:
// 6 files found with path 'META-INF/LICENSE.md'.
packaging.resources.pickFirsts += "META-INF/**"
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
}

dependencies {
components {
applyCouchbaseLiteRule("com.couchbase.lite:couchbase-lite-java", "com.couchbase.lite:couchbase-lite-android")
Expand Down
10 changes: 0 additions & 10 deletions buildSrc/src/main/kotlin/library-convention.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSetTree

plugins {
id("base-convention")
id("dokka-convention")
Expand All @@ -9,13 +6,6 @@ plugins {

kotlin {
explicitApiWarning()

@OptIn(ExperimentalKotlinGradlePluginApi::class)
androidTarget {
publishLibraryVariants("release")
instrumentedTestVariant.sourceSetTree.set(KotlinSourceSetTree.test)
unitTestVariant.sourceSetTree.set(KotlinSourceSetTree.unitTest)
}
}

mavenPublishing {
Expand Down
5 changes: 3 additions & 2 deletions buildSrc/src/main/kotlin/multiplatform-convention.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import com.android.build.api.dsl.KotlinMultiplatformAndroidCompilation
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi

plugins {
Expand Down Expand Up @@ -32,7 +33,7 @@ kotlin {
applyDefaultHierarchyTemplate {
common {
group("jvmCommon") {
withAndroidTarget()
withCompilations { it is KotlinMultiplatformAndroidCompilation }
withJvm()
}
group("native") {
Expand All @@ -44,7 +45,7 @@ kotlin {
}
}

androidTarget()
android
jvm()
iosArm64()
iosSimulatorArm64()
Expand Down
4 changes: 2 additions & 2 deletions couchbase-lite-ee-kermit/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ plugins {
description = "Couchbase Lite Enterprise Edition for Kotlin Multiplatform – Kermit Logger"

kotlin {
android.namespace = "dev.kotbase.kermit"

cocoapods {
framework {
binaryOption("bundleId", "dev.kotbase.kermit")
Expand All @@ -30,5 +32,3 @@ kotlin {
}
}
}

android.namespace = "dev.kotbase.kermit"
6 changes: 3 additions & 3 deletions couchbase-lite-ee-ktx/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ plugins {
description = "Couchbase Lite Enterprise Edition for Kotlin Multiplatform – Kotlin Extensions"

kotlin {
android.namespace = "dev.kotbase.ktx"

cocoapods {
framework {
binaryOption("bundleId", "dev.kotbase.ktx")
Expand All @@ -32,10 +34,8 @@ kotlin {
androidMain.dependencies {
compileOnly(libs.androidx.lifecycle.runtime.ktx)
}
androidInstrumentedTest.dependencies {
androidDeviceTest.dependencies {
implementation(libs.mockk.android)
}
}
}

android.namespace = "dev.kotbase.ktx"
10 changes: 5 additions & 5 deletions couchbase-lite-ee-paging/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ plugins {
description = "Couchbase Lite Enterprise Edition for Kotlin Multiplatform – AndroidX Paging Extensions"

kotlin {
android {
namespace = "dev.kotbase.paging"
minSdk = 23
}

cocoapods {
framework {
binaryOption("bundleId", "dev.kotbase.paging")
Expand All @@ -30,8 +35,3 @@ kotlin {
}
}
}

android {
namespace = "dev.kotbase.paging"
defaultConfig.minSdk = 23
}
6 changes: 3 additions & 3 deletions couchbase-lite-ee/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ plugins {
description = "Couchbase Lite Enterprise Edition for Kotlin Multiplatform"

kotlin {
android.namespace = "dev.kotbase"

cocoapods {
framework {
binaryOption("bundleId", "dev.kotbase")
Expand Down Expand Up @@ -73,7 +75,7 @@ kotlin {
api(libs.couchbase.lite.android.ee)
implementation(libs.androidx.startup)
}
androidInstrumentedTest.dependencies {
androidDeviceTest.dependencies {
implementation(libs.couchbase.lite.android.vector.search.arm64)
implementation(libs.couchbase.lite.android.vector.search.x64)
}
Expand All @@ -84,8 +86,6 @@ kotlin {
}
}

android.namespace = "dev.kotbase"

// Internal headers required for tests
tasks.named<DefFileTask>("generateDefCouchbaseLite") {
doLast {
Expand Down
4 changes: 2 additions & 2 deletions couchbase-lite-kermit/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ plugins {
description = "Couchbase Lite Community Edition for Kotlin Multiplatform – Kermit Logger"

kotlin {
android.namespace = "dev.kotbase.kermit"

cocoapods {
framework {
binaryOption("bundleId", "dev.kotbase.kermit")
Expand All @@ -30,5 +32,3 @@ kotlin {
}
}
}

android.namespace = "dev.kotbase.kermit"
6 changes: 3 additions & 3 deletions couchbase-lite-ktx/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ plugins {
description = "Couchbase Lite Community Edition for Kotlin Multiplatform – Kotlin Extensions"

kotlin {
android.namespace = "dev.kotbase.ktx"

cocoapods {
framework {
binaryOption("bundleId", "dev.kotbase.ktx")
Expand All @@ -32,10 +34,8 @@ kotlin {
androidMain.dependencies {
compileOnly(libs.androidx.lifecycle.runtime.ktx)
}
androidInstrumentedTest.dependencies {
androidDeviceTest.dependencies {
implementation(libs.mockk.android)
}
}
}

android.namespace = "dev.kotbase.ktx"
10 changes: 5 additions & 5 deletions couchbase-lite-paging/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ plugins {
description = "Couchbase Lite Community Edition for Kotlin Multiplatform – AndroidX Paging Extensions"

kotlin {
android {
namespace = "dev.kotbase.paging"
minSdk = 23
}

cocoapods {
framework {
binaryOption("bundleId", "dev.kotbase.paging")
Expand All @@ -30,8 +35,3 @@ kotlin {
}
}
}

android {
namespace = "dev.kotbase.paging"
defaultConfig.minSdk = 23
}
4 changes: 2 additions & 2 deletions couchbase-lite/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ plugins {
description = "Couchbase Lite Community Edition for Kotlin Multiplatform"

kotlin {
android.namespace = "dev.kotbase"

cocoapods {
framework {
binaryOption("bundleId", "dev.kotbase")
Expand Down Expand Up @@ -64,8 +66,6 @@ kotlin {
}
}

android.namespace = "dev.kotbase"

// Internal headers required for tests
tasks.named<DefFileTask>("generateDefCouchbaseLite") {
doLast {
Expand Down
6 changes: 3 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ couchbase-lite-objc = "3.2.4"
couchbase-lite-c = "3.2.4"
couchbase-lite-vector-search = "1.0.0"
dokka = "2.0.0"
mockk = "1.14.5"
mockk = "1.14.6"

[plugins]
android-library = { id = "com.android.library", version = "8.11.2" }
android-kotlin-multiplatform-library = { id = "com.android.kotlin.multiplatform.library", version = "8.12.3" }
dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" }
kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version = "2.2.20" }
kotlinx-atomicfu = { id = "org.jetbrains.kotlinx.atomicfu", version = "0.29.0" }
kotlinx-binary-compatibility-validator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version = "0.18.1" }
vanniktech-maven-publish = { id = "com.vanniktech.maven.publish", version = "0.34.0" }

[libraries]
androidx-lifecycle-runtime-ktx = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version = "2.9.3" }
androidx-lifecycle-runtime-ktx = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version = "2.9.4" }
androidx-startup = { module = "androidx.startup:startup-runtime", version = "1.2.0" }
androidx-test-core-ktx = { module = "androidx.test:core-ktx", version = "1.7.0" }
androidx-test-runner = { module = "androidx.test:runner", version = "1.7.0" }
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
8 changes: 4 additions & 4 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions testing-support-ee/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ plugins {
}

kotlin {
android.namespace = "dev.kotbase.testingsupport"

cocoapods {
framework {
binaryOption("bundleId", "dev.kotbase.testingsupport")
Expand Down Expand Up @@ -35,5 +37,3 @@ kotlin {
}
}
}

android.namespace = "dev.kotbase.testingsupport"
4 changes: 2 additions & 2 deletions testing-support/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ plugins {
}

kotlin {
android.namespace = "dev.kotbase.testingsupport"

cocoapods {
framework {
binaryOption("bundleId", "dev.kotbase.testingsupport")
Expand Down Expand Up @@ -35,5 +37,3 @@ kotlin {
}
}
}

android.namespace = "dev.kotbase.testingsupport"
Loading