Skip to content

Commit 1b158cb

Browse files
authored
Merge pull request #30 from kotlin-hands-on/update_deps
Update dependencies for main (starter) branch
2 parents 4971054 + 490aab9 commit 1b158cb

File tree

7 files changed

+36
-22
lines changed

7 files changed

+36
-22
lines changed

androidApp/build.gradle.kts

+10-2
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,20 @@ plugins {
55

66
dependencies {
77
implementation(project(":shared"))
8-
implementation("com.google.android.material:material:1.6.1")
9-
implementation("androidx.appcompat:appcompat:1.4.2")
8+
implementation("com.google.android.material:material:1.9.0")
9+
implementation("androidx.appcompat:appcompat:1.6.1")
1010
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
1111
}
1212

1313
android {
1414
compileSdk = 33
15+
compileOptions {
16+
sourceCompatibility = JavaVersion.VERSION_1_8
17+
targetCompatibility = JavaVersion.VERSION_1_8
18+
}
19+
kotlinOptions {
20+
jvmTarget = "1.8"
21+
}
1522
defaultConfig {
1623
applicationId = "com.jetbrains.handson.androidApp"
1724
minSdk = 21
@@ -24,4 +31,5 @@ android {
2431
isMinifyEnabled = false
2532
}
2633
}
34+
namespace = "com.jetbrains.handson.androidApp"
2735
}

androidApp/src/main/AndroidManifest.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.jetbrains.handson.androidApp">
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
33

44
<application
55
android:allowBackup="false"

build.gradle.kts

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ buildscript {
55
mavenCentral()
66
}
77
dependencies {
8-
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.21")
9-
classpath("com.android.tools.build:gradle:7.2.2")
8+
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.21")
9+
classpath("com.android.tools.build:gradle:8.0.2")
1010
}
1111
}
1212

gradle.properties

+4-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,7 @@ org.gradle.jvmargs=-Xmx2048M -Dkotlin.daemon.jvm.options\="-Xmx2048M"
55
kotlin.code.style=official
66

77
#Android
8-
android.useAndroidX=true
8+
android.useAndroidX=true
9+
android.defaults.buildfeatures.buildconfig=true
10+
android.nonTransitiveRClass=false
11+
android.nonFinalResIds=false

gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip

shared/build.gradle.kts

+17-14
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,14 @@ plugins {
44
}
55

66
kotlin {
7-
android()
7+
android {
8+
compilations.all {
9+
kotlinOptions {
10+
jvmTarget = "1.8"
11+
}
12+
}
13+
}
14+
815
listOf(
916
iosX64(),
1017
iosArm64(),
@@ -16,6 +23,8 @@ kotlin {
1623
}
1724

1825
sourceSets {
26+
targetHierarchy.default()
27+
1928
val commonMain by getting
2029
val commonTest by getting {
2130
dependencies {
@@ -27,21 +36,11 @@ kotlin {
2736
val iosX64Main by getting
2837
val iosArm64Main by getting
2938
val iosSimulatorArm64Main by getting
30-
val iosMain by creating {
31-
dependsOn(commonMain)
32-
iosX64Main.dependsOn(this)
33-
iosArm64Main.dependsOn(this)
34-
iosSimulatorArm64Main.dependsOn(this)
35-
}
39+
val iosMain by getting
3640
val iosX64Test by getting
3741
val iosArm64Test by getting
3842
val iosSimulatorArm64Test by getting
39-
val iosTest by creating {
40-
dependsOn(commonTest)
41-
iosX64Test.dependsOn(this)
42-
iosArm64Test.dependsOn(this)
43-
iosSimulatorArm64Test.dependsOn(this)
44-
}
43+
val iosTest by getting
4544
}
4645
}
4746

@@ -50,6 +49,10 @@ android {
5049
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
5150
defaultConfig {
5251
minSdk = 21
53-
targetSdk =32
5452
}
53+
compileOptions {
54+
sourceCompatibility = JavaVersion.VERSION_1_8
55+
targetCompatibility = JavaVersion.VERSION_1_8
56+
}
57+
namespace = "com.jetbrains.handson.android"
5558
}
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.jetbrains.handson.android"/>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android" />

0 commit comments

Comments
 (0)