diff --git a/androidApp/build.gradle.kts b/androidApp/build.gradle.kts index 175e83f..7853800 100644 --- a/androidApp/build.gradle.kts +++ b/androidApp/build.gradle.kts @@ -4,11 +4,11 @@ plugins { } android { - compileSdk = 33 + compileSdk = 34 defaultConfig { applicationId = "com.jetbrains.androidApp" minSdk = 21 - targetSdk = 33 + targetSdk = 34 versionCode = 1 versionName = "1.0" } @@ -29,7 +29,7 @@ android { dependencies { implementation(project(":shared")) - implementation("com.google.android.material:material:1.9.0") + implementation("com.google.android.material:material:1.10.0") implementation("androidx.appcompat:appcompat:1.6.1") implementation("androidx.constraintlayout:constraintlayout:2.1.4") } \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index bf1cb69..9c758f1 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,22 +1,7 @@ - buildscript { - repositories { - gradlePluginPortal() - google() - mavenCentral() - } - dependencies { - classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.21") - classpath("com.android.tools.build:gradle:8.0.2") - } -} - -allprojects { - repositories { - google() - mavenCentral() - } -} - -tasks.register("clean", Delete::class) { - delete(rootProject.buildDir) +plugins { + //trick: for the same plugin versions in all sub-modules + id("com.android.application").version("8.1.2").apply(false) + id("com.android.library").version("8.1.2").apply(false) + kotlin("android").version("1.9.20-Beta2").apply(false) + kotlin("multiplatform").version("1.9.20-Beta2").apply(false) } \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 8a6a958..5f45f9a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,12 +1,12 @@ #Gradle -org.gradle.jvmargs=-Xmx2048M -Dkotlin.daemon.jvm.options\="-Xmx2048M" +org.gradle.jvmargs=-Xmx2048M -Dfile.encoding=UTF-8 -Dkotlin.daemon.jvm.options\="-Xmx2048M" #Kotlin kotlin.code.style=official #Android android.useAndroidX=true +android.nonTransitiveRClass=true #MPP -kotlin.mpp.androidSourceSetLayoutVersion=2 kotlin.mpp.enableCInteropCommonization=true \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index c390408..fd9a824 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -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.1.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip diff --git a/settings.gradle.kts b/settings.gradle.kts index 6b49fa1..8eed67d 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -6,6 +6,13 @@ pluginManagement { } } +dependencyResolutionManagement { + repositories { + google() + mavenCentral() + } +} + rootProject.name = "KmmSample" include(":androidApp") diff --git a/shared/build.gradle.kts b/shared/build.gradle.kts index 59d347b..98b72a0 100644 --- a/shared/build.gradle.kts +++ b/shared/build.gradle.kts @@ -4,9 +4,7 @@ plugins { } kotlin { - targetHierarchy.default() - - android() { + androidTarget { compilations.all { kotlinOptions { jvmTarget = "1.8" @@ -25,7 +23,7 @@ kotlin { } sourceSets { - val commonTest by getting { + commonTest { dependencies { implementation(kotlin("test-common")) implementation(kotlin("test-annotations-common"))