Skip to content

Commit e3ca9f8

Browse files
authored
Update configuration and dependencies
Update build configuration and dependencies - Upgrade Gradle to 9.5.0, AGP to 9.1.1, and Kotlin to 2.3.21. - Migrate `app/build.gradle.kts` to the new Kotlin Android DSL. - Update Target SDK to 37. - Configure project to use Java 17 toolchain and bytecode target. - Enable `android.newDsl` and `android.builtInKotlin` in `gradle.properties`. - Update copyright headers to 2026.
2 parents 916f94e + e051d5a commit e3ca9f8

20 files changed

Lines changed: 63 additions & 60 deletions

File tree

HelloAndroid/app/build.gradle.kts

Lines changed: 39 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2025 The Android Open Source Project
2+
* Copyright 2026 The Android Open Source Project
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -16,54 +16,56 @@
1616

1717
plugins {
1818
alias(libs.plugins.android.application)
19-
alias(libs.plugins.kotlin.android)
2019
alias(libs.plugins.compose.compiler)
2120
}
21+
kotlin {
22+
android {
23+
namespace = "com.example.android.helloandroid"
24+
compileSdk {
25+
version = release(36) {
26+
minorApiLevel = 1
27+
}
28+
}
2229

23-
android {
24-
namespace = "com.example.android.helloandroid"
25-
compileSdk = 36
26-
27-
defaultConfig {
28-
applicationId = "com.example.android.helloandroid"
29-
minSdk = 23
30-
targetSdk = 36
31-
versionCode = 1
32-
versionName = "1.0"
30+
defaultConfig {
31+
applicationId = "com.example.android.helloandroid"
32+
minSdk = 23
33+
targetSdk = 37
34+
versionCode = 1
35+
versionName = "1.0"
3336

34-
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
35-
vectorDrawables {
36-
useSupportLibrary = true
37+
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
38+
vectorDrawables {
39+
useSupportLibrary = true
40+
}
3741
}
38-
}
3942

40-
buildTypes {
41-
release {
42-
isMinifyEnabled = false
43-
proguardFiles(
44-
getDefaultProguardFile("proguard-android-optimize.txt"),
45-
"proguard-rules.pro"
46-
)
43+
buildTypes {
44+
release {
45+
isMinifyEnabled = false
46+
proguardFiles(
47+
getDefaultProguardFile("proguard-android-optimize.txt"),
48+
"proguard-rules.pro"
49+
)
50+
}
51+
}
52+
compileOptions {
53+
sourceCompatibility = JavaVersion.VERSION_17
54+
targetCompatibility = JavaVersion.VERSION_17
55+
}
56+
buildFeatures {
57+
compose = true
4758
}
48-
}
49-
compileOptions {
50-
sourceCompatibility = JavaVersion.VERSION_1_8
51-
targetCompatibility = JavaVersion.VERSION_1_8
52-
}
53-
buildFeatures {
54-
compose = true
55-
}
5659

57-
packaging {
58-
resources {
59-
excludes += "/META-INF/{AL2.0,LGPL2.1}"
60+
packaging {
61+
resources {
62+
excludes += "/META-INF/{AL2.0,LGPL2.1}"
63+
}
6064
}
6165
}
62-
}
6366

64-
kotlin {
6567
compilerOptions {
66-
jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_1_8)
68+
jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17)
6769
}
6870
}
6971

HelloAndroid/app/src/androidTest/kotlin/com/example/android/helloandroid/ExampleInstrumentedTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2025 The Android Open Source Project
2+
* Copyright 2026 The Android Open Source Project
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

HelloAndroid/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!--
3-
Copyright 2025 The Android Open Source Project
3+
Copyright 2026 The Android Open Source Project
44
55
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
66
in compliance with the License. You may obtain a copy of the License at

HelloAndroid/app/src/main/kotlin/com/example/android/helloandroid/MainActivity.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2025 The Android Open Source Project
2+
* Copyright 2026 The Android Open Source Project
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

HelloAndroid/app/src/main/kotlin/com/example/android/helloandroid/ui/theme/Color.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2025 The Android Open Source Project
2+
* Copyright 2026 The Android Open Source Project
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

HelloAndroid/app/src/main/kotlin/com/example/android/helloandroid/ui/theme/Theme.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2025 The Android Open Source Project
2+
* Copyright 2026 The Android Open Source Project
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

HelloAndroid/app/src/main/kotlin/com/example/android/helloandroid/ui/theme/Type.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2025 The Android Open Source Project
2+
* Copyright 2026 The Android Open Source Project
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

HelloAndroid/app/src/main/res/drawable-v24/ic_launcher_foreground.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!--
3-
Copyright 2025 The Android Open Source Project
3+
Copyright 2026 The Android Open Source Project
44
55
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
66
in compliance with the License. You may obtain a copy of the License at

HelloAndroid/app/src/main/res/drawable/ic_launcher_background.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!--
3-
Copyright 2025 The Android Open Source Project
3+
Copyright 2026 The Android Open Source Project
44
55
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
66
in compliance with the License. You may obtain a copy of the License at

HelloAndroid/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!--
3-
Copyright 2025 The Android Open Source Project
3+
Copyright 2026 The Android Open Source Project
44
55
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
66
in compliance with the License. You may obtain a copy of the License at

0 commit comments

Comments
 (0)