Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update build scripts for 1.9.20 #31

Closed
wants to merge 1 commit into from
Closed
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
27 changes: 7 additions & 20 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,23 +1,10 @@
buildscript {
repositories {
gradlePluginPortal()
google()
mavenCentral()
}
dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.21")
classpath("com.squareup.sqldelight:gradle-plugin:1.5.5")
classpath("com.android.tools.build:gradle:8.0.2")
}
}

allprojects {
repositories {
google()
mavenCentral()
}
plugins {
kotlin("multiplatform").version("1.9.20-RC").apply(false)
kotlin("android").version("1.9.20-RC").apply(false)
id("com.android.application").version("8.1.2").apply(false)
id("com.android.library").version("8.1.2").apply(false)
}

tasks.register("clean", Delete::class) {
delete(rootProject.buildDir)
}
delete(rootProject.layout.buildDirectory)
}
5 changes: 1 addition & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,4 @@ kotlin.code.style=official
kotlin.mpp.androidSourceSetLayoutVersion=2

#Android
android.useAndroidX=true

#Sql Delight Version
sqlDelightVersion=1.5.5
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

android.useAndroidX=true
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
7 changes: 7 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ pluginManagement {
}
}

dependencyResolutionManagement {
repositories {
google()
mavenCentral()
}
}

rootProject.name = "KMMApp"

include(":androidApp")
Expand Down
34 changes: 9 additions & 25 deletions shared/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
plugins {
kotlin("multiplatform")
kotlin("plugin.serialization") version "1.8.21"
kotlin("plugin.serialization").version("1.9.20-RC")
id("com.android.library")
id("com.squareup.sqldelight")
id("com.squareup.sqldelight").version("1.5.5")
}

group = "com.jetbrains.handson"
version = "1.0"

kotlin {
android {
androidTarget {
compilations.all {
kotlinOptions {
jvmTarget = "1.8"
Expand All @@ -27,15 +27,13 @@ kotlin {
}
}

val ktorVersion = "2.3.1"
val sqlDelightVersion = "1.5.4"
val ktorVersion = "2.3.2"
val sqlDelightVersion = "1.5.5"
val coroutinesVersion = "1.7.1"
val dateTimeVersion = "0.4.0"

sourceSets {
targetHierarchy.default()

val commonMain by getting {
commonMain {
dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion")
implementation("io.ktor:ktor-client-core:$ktorVersion")
Expand All @@ -45,32 +43,18 @@ kotlin {
implementation("org.jetbrains.kotlinx:kotlinx-datetime:$dateTimeVersion")
}
}

val commonTest by getting {
dependencies {
implementation(kotlin("test"))
}
}
val androidMain by getting {
androidMain {
dependencies {
implementation("io.ktor:ktor-client-android:$ktorVersion")
implementation("com.squareup.sqldelight:android-driver:$sqlDelightVersion")
}
}
val androidUnitTest by getting
val iosX64Main by getting
val iosArm64Main by getting
val iosSimulatorArm64Main by getting
val iosMain by getting {
iosMain {
dependencies {
implementation("io.ktor:ktor-client-darwin:$ktorVersion")
implementation("com.squareup.sqldelight:native-driver:$sqlDelightVersion")
}
}
val iosX64Test by getting
val iosArm64Test by getting
val iosSimulatorArm64Test by getting
val iosTest by getting
}
}

Expand All @@ -91,4 +75,4 @@ sqldelight {
database("AppDatabase") {
packageName = "com.jetbrains.handson.kmm.shared.cache"
}
}
}