Skip to content
Open
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
3 changes: 1 addition & 2 deletions Auth/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
// alias(libs.plugins.complete.kotlin)
id(libs.plugins.kotlin.multiplatform.get().pluginId)
id(libs.plugins.android.library.get().pluginId)
id(libs.plugins.android.kotlin.multiplatform.library.get().pluginId)
}

description = "Extends supabase-kt with a Auth Client"
Expand Down Expand Up @@ -79,4 +79,3 @@ kotlin {
}
}

configureLibraryAndroidTarget()
4 changes: 1 addition & 3 deletions Functions/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id(libs.plugins.kotlin.multiplatform.get().pluginId)
id(libs.plugins.android.library.get().pluginId)
id(libs.plugins.android.kotlin.multiplatform.library.get().pluginId)
}

description = "Extends supabase-kt with a Edge Functions Client"
Expand All @@ -26,5 +26,3 @@ kotlin {
}
}
}

configureLibraryAndroidTarget()
3 changes: 1 addition & 2 deletions Postgrest/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id(libs.plugins.kotlin.multiplatform.get().pluginId)
id(libs.plugins.android.library.get().pluginId)
id(libs.plugins.android.kotlin.multiplatform.library.get().pluginId)
}

description = "Extends supabase-kt with a Postgrest Client"
Expand Down Expand Up @@ -29,4 +29,3 @@ kotlin {
}
}

configureLibraryAndroidTarget()
3 changes: 1 addition & 2 deletions Realtime/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id(libs.plugins.kotlin.multiplatform.get().pluginId)
id(libs.plugins.android.library.get().pluginId)
id(libs.plugins.android.kotlin.multiplatform.library.get().pluginId)
}

description = "Extends supabase-kt with a Realtime Client"
Expand Down Expand Up @@ -31,4 +31,3 @@ kotlin {
}
}

configureLibraryAndroidTarget()
3 changes: 1 addition & 2 deletions Storage/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id(libs.plugins.kotlin.multiplatform.get().pluginId)
id(libs.plugins.android.library.get().pluginId)
id(libs.plugins.android.kotlin.multiplatform.library.get().pluginId)
}

description = "Extends supabase-kt with a Storage Client"
Expand Down Expand Up @@ -40,4 +40,3 @@ kotlin {
}
}

configureLibraryAndroidTarget()
4 changes: 2 additions & 2 deletions Supabase/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
id(libs.plugins.kotlin.multiplatform.get().pluginId)
id(libs.plugins.android.library.get().pluginId)
// id(libs.plugins.android.kotlin.multiplatform.library.get().pluginId)
id(libs.plugins.android.kotlin.multiplatform.library.get().pluginId)
id(libs.plugins.detekt.get().pluginId)
id(libs.plugins.dokka.get().pluginId)
alias(libs.plugins.kotlinx.plugin.serialization)
Expand Down Expand Up @@ -63,4 +64,3 @@ kotlin {
}
}

configureLibraryAndroidTarget()
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ fun libraryModules(withBom: Boolean = true, init: Project.() -> Unit) = configur

plugins {
id(libs.plugins.kotlin.multiplatform.get().pluginId) apply false
id(libs.plugins.android.library.get().pluginId) apply false
id(libs.plugins.android.kotlin.multiplatform.library.get().pluginId) apply false
id(libs.plugins.detekt.get().pluginId) apply false
id(libs.plugins.dokka.get().pluginId)
alias(libs.plugins.kotlinx.plugin.serialization) apply false
Expand Down
19 changes: 15 additions & 4 deletions buildSrc/src/main/kotlin/KotlinTargets.kt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import com.android.build.api.dsl.androidLibrary
import org.gradle.kotlin.dsl.assign
import org.gradle.kotlin.dsl.extra
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
Expand Down Expand Up @@ -39,10 +41,19 @@ fun KotlinMultiplatformExtension.configuredJvmTarget(jvmTarget: JvmTarget = JvmT
}
}

fun KotlinMultiplatformExtension.configuredAndroidTarget(jvmTarget: JvmTarget = JvmTarget.JVM_1_8) {
androidTarget {
publishLibraryVariants("release", "debug")
compilerOptions.jvmTarget = jvmTarget
fun KotlinMultiplatformExtension.configuredAndroidTarget(
jvmTarget: JvmTarget = JvmTarget.JVM_1_8,
) {
androidLibrary {
compileSdk = 35
minSdk = 21
this.namespace = namespace ?: "${project.extra["base-group"].toString().replace("-", ".")}.${project.name.replace("-", "")}.library"
withHostTestBuilder {}.configure {}
compilations.configureEach {
compilerOptions.configure {
this.jvmTarget.set(jvmTarget)
}
}
}
}

Expand Down
5 changes: 3 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ androidx-startup = "1.2.0"
androidx-activity-compose = "1.10.1"
multiplatform-settings = "1.3.0"
complete-kotlin = "1.1.0"
agp = "8.9.2"
agp = "8.11.1"
maven-publish = "0.34.0"
apollo-kotlin = "4.3.3"
serialization = "1.9.0"
Expand All @@ -23,7 +23,7 @@ browser = "1.9.0"
compose = "1.8.2"
coil2 = "2.7.0"
okio = "3.16.0"
koin = "4.0.4"
koin = "4.1.0"
androidx-core = "1.17.0"
androidx-compat = "1.7.1"
androidx-lifecycle = "2.9.2"
Expand All @@ -39,6 +39,7 @@ dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" }
kotlinx-plugin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
complete-kotlin = { id = "com.louiscad.complete-kotlin", version.ref = "complete-kotlin" }
android-library = { id = "com.android.library", version.ref = "agp" }
android-kotlin-multiplatform-library = { id = "com.android.kotlin.multiplatform.library", version.ref = "agp" }
maven-publish = { id = "com.vanniktech.maven.publish", version.ref = "maven-publish" }
detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" }

Expand Down
3 changes: 1 addition & 2 deletions serializers/Jackson/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id(libs.plugins.kotlin.multiplatform.get().pluginId)
id(libs.plugins.android.library.get().pluginId)
id(libs.plugins.android.kotlin.multiplatform.library.get().pluginId)
}

description = "Extends supabase-kt with a Jackson Serializer"
Expand Down Expand Up @@ -30,4 +30,3 @@ kotlin {
}
}

configureLibraryAndroidTarget()
3 changes: 1 addition & 2 deletions serializers/Moshi/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id(libs.plugins.kotlin.multiplatform.get().pluginId)
id(libs.plugins.android.library.get().pluginId)
id(libs.plugins.android.kotlin.multiplatform.library.get().pluginId)
}

description = "Extends supabase-kt with a Moshi Serializer"
Expand Down Expand Up @@ -31,4 +31,3 @@ kotlin {
}
}

configureLibraryAndroidTarget()
3 changes: 1 addition & 2 deletions test-common/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id(libs.plugins.kotlin.multiplatform.get().pluginId)
id(libs.plugins.android.library.get().pluginId)
id(libs.plugins.android.kotlin.multiplatform.library.get().pluginId)
}

description = "Common test module"
Expand Down Expand Up @@ -28,4 +28,3 @@ kotlin {
}
}

configureLibraryAndroidTarget()
Loading