From 236e990acdf4fd7a1a98f072e5129a7f08ea402e Mon Sep 17 00:00:00 2001 From: Ilker Aslan Date: Mon, 20 Feb 2023 19:13:38 +0100 Subject: [PATCH] chore: use groovy for gradle --- android/app/build.gradle | 18 ++++++++++ android/app/build.gradle.kts | 22 ------------- shared/build.gradle | 58 ++++++++++++++++++++++++++++++++ shared/build.gradle.kts | 64 ------------------------------------ 4 files changed, 76 insertions(+), 86 deletions(-) create mode 100644 android/app/build.gradle delete mode 100644 android/app/build.gradle.kts create mode 100644 shared/build.gradle delete mode 100644 shared/build.gradle.kts diff --git a/android/app/build.gradle b/android/app/build.gradle new file mode 100644 index 0000000..ab972a0 --- /dev/null +++ b/android/app/build.gradle @@ -0,0 +1,18 @@ +apply plugin: "aditogether.android.app" + +android { + namespace = "aditogether.android.app" + + buildTypes { + named("release") + + named("debug") { + applicationIdSuffix ".debug" + debuggable true + } + } +} + +dependencies { + implementation project(':shared') +} diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts deleted file mode 100644 index 244b6b1..0000000 --- a/android/app/build.gradle.kts +++ /dev/null @@ -1,22 +0,0 @@ -plugins { - id("aditogether.android.app") - kotlin("android") -} - -android { - namespace = "aditogether.android.app" - - buildTypes { - getByName("release") - - getByName("debug") { - applicationIdSuffix = ".debug" - isDebuggable = true - } - } -} - -dependencies { - implementation(project(mapOf("path" to ":shared"))) - -} diff --git a/shared/build.gradle b/shared/build.gradle new file mode 100644 index 0000000..30185f2 --- /dev/null +++ b/shared/build.gradle @@ -0,0 +1,58 @@ +import aditogether.buildtools.android.AndroidConfigs + +apply plugin: "aditogether.multiplatform" +apply plugin: "com.android.library" + +android { + namespace = "aditogether.shared" + compileSdk = AndroidConfigs.COMPILE_SDK + + buildTypes { + named("release") + + named("debug") { + debuggable true + } + } +} + +kotlin { + android() + + iosArm64 { + /* Apple iOS on ARM64 platforms (Apple iPhone 5s and newer) */ + binaries.framework { + baseName = "aditogether" + } + } + + iosX64 { + /* Apple iOS simulator on x86_64 platforms */ + binaries.framework { + baseName = "aditogether" + } + } + + iosSimulatorArm64 { + /* Apple iOS simulator on Apple Silicon platforms */ + binaries.framework { + baseName = "aditogether" + } + } + + sourceSets { + commonMain {} + commonTest {} + + androidMain {} + androidUnitTest {} + + jvmMain {} + jvmTest {} + + iosMain { dependsOn(commonMain) } + iosX64Main { dependsOn(iosMain) } + iosArm64Main { dependsOn(iosMain) } + iosSimulatorArm64Main { dependsOn(iosMain) } + } +} diff --git a/shared/build.gradle.kts b/shared/build.gradle.kts deleted file mode 100644 index 4635793..0000000 --- a/shared/build.gradle.kts +++ /dev/null @@ -1,64 +0,0 @@ -plugins { - id("aditogether.multiplatform") - id("com.android.library") -} - -android { - namespace = "aditogether.shared" - compileSdk = aditogether.buildtools.android.AndroidConfigs.COMPILE_SDK - - buildTypes { - getByName("release") - - getByName("debug") { - isJniDebuggable = true - } - } -} - -kotlin { - android() - - iosArm64 { - /* Apple iOS on ARM64 platforms (Apple iPhone 5s and newer) */ - this.binaries.framework { - baseName = "aditogether" - } - } - - iosX64 { - /* Apple iOS simulator on x86_64 platforms */ - this.binaries.framework { - baseName = "aditogether" - } - } - - iosSimulatorArm64 { - /* Apple iOS simulator on Apple Silicon platforms */ - this.binaries.framework { - baseName = "aditogether" - } - } - - sourceSets { - val commonMain by sourceSets.getting - val commonTest by sourceSets.getting - - val androidMain by sourceSets.getting - val androidUnitTest by sourceSets.getting - - val jvmMain by sourceSets.getting - val jvmTest by sourceSets.getting - - val iosX64Main by getting - val iosArm64Main by getting - val iosSimulatorArm64Main by getting - - val iosMain by sourceSets.creating { - dependsOn(commonMain) - iosX64Main.dependsOn(this) - iosArm64Main.dependsOn(this) - iosSimulatorArm64Main.dependsOn(this) - } - } -}