From a3c7d00e16386d766921af1ccc693be5d1efd9ea Mon Sep 17 00:00:00 2001 From: Shreyas Patil Date: Sun, 22 Sep 2024 11:19:11 +0530 Subject: [PATCH 1/3] Upgrade AGP version: 8.6.1 --- build.gradle | 2 +- gradle/wrapper/gradle-wrapper.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index b82ed72..979b79a 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { ext { - agpVersion = '8.2.2' + agpVersion = '8.6.1' kotlinVersion = '1.9.22' dokkaVersion = '1.9.20' coroutinesVersion = '1.8.1' diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 80033e8..cbfb92b 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Thu Jan 25 19:41:13 IST 2024 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists From b88496fdaefb8f63e113e146c6dbf5fc6bef5eb8 Mon Sep 17 00:00:00 2001 From: Shreyas Patil Date: Sun, 22 Sep 2024 11:20:15 +0530 Subject: [PATCH 2/3] Migrate to Kotlin 2.0.20 and compose compiler plugin --- build.gradle | 3 ++- gradle.properties | 2 +- gradle/libs.version.toml | 0 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 gradle/libs.version.toml diff --git a/build.gradle b/build.gradle index 979b79a..a3cad8d 100644 --- a/build.gradle +++ b/build.gradle @@ -2,7 +2,7 @@ buildscript { ext { agpVersion = '8.6.1' - kotlinVersion = '1.9.22' + kotlinVersion = '2.0.20' dokkaVersion = '1.9.20' coroutinesVersion = '1.8.1' androidCoreVersion = '1.13.1' @@ -27,6 +27,7 @@ buildscript { plugins { id 'com.diffplug.spotless' version "$spotlessVersion" + id "org.jetbrains.kotlin.plugin.compose" version "$kotlinVersion" apply false } subprojects { diff --git a/gradle.properties b/gradle.properties index 8145fa7..d778821 100644 --- a/gradle.properties +++ b/gradle.properties @@ -19,6 +19,6 @@ android.useAndroidX=true android.enableJetifier=true # Kotlin code style for this project: "official" or "obsolete": kotlin.code.style=official -android.defaults.buildfeatures.buildconfig=true + android.nonTransitiveRClass=false android.nonFinalResIds=false \ No newline at end of file diff --git a/gradle/libs.version.toml b/gradle/libs.version.toml new file mode 100644 index 0000000..e69de29 From f4c06ba228ec653a51c21ca6e828959a2b885cf0 Mon Sep 17 00:00:00 2001 From: Shreyas Patil Date: Sun, 22 Sep 2024 11:22:36 +0530 Subject: [PATCH 3/3] Apply compose plugin in the modules --- app/build.gradle | 7 ++++--- capturable/build.gradle | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 4c9d673..3bef772 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,15 +1,16 @@ plugins { id 'com.android.application' id 'kotlin-android' + id 'org.jetbrains.kotlin.plugin.compose' } android { - compileSdk 34 + compileSdk 35 defaultConfig { applicationId "dev.shreyaspatil.capturableExample" minSdk 21 - targetSdk 34 + targetSdk 35 versionCode 1 versionName "1.0" @@ -57,7 +58,7 @@ dependencies { implementation 'androidx.appcompat:appcompat:1.7.0' implementation 'com.google.android.material:material:1.12.0' implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.8.6' - implementation 'androidx.activity:activity-compose:1.9.1' + implementation 'androidx.activity:activity-compose:1.9.2' // Jetpack Compose implementation platform("androidx.compose:compose-bom:$composeBomVersion") diff --git a/capturable/build.gradle b/capturable/build.gradle index 69aae59..fe85bbe 100644 --- a/capturable/build.gradle +++ b/capturable/build.gradle @@ -2,14 +2,15 @@ plugins { id 'com.android.library' id 'kotlin-android' id 'org.jetbrains.dokka' + id 'org.jetbrains.kotlin.plugin.compose' } android { - compileSdk 34 + compileSdk 35 defaultConfig { minSdk 21 - targetSdk 34 + targetSdk 35 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" consumerProguardFiles "consumer-rules.pro"