From 4b299064c53230d9d44588a0c357a736b77db91c Mon Sep 17 00:00:00 2001 From: DianQK Date: Wed, 3 May 2023 06:22:15 +0800 Subject: [PATCH 1/5] Fix warnings of gradle --- app/build.gradle.kts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index d4148c6..b212fb9 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -25,7 +25,7 @@ fun String.runCommand(workingDir: File = file("./")): String { } val gitCommitHash = "git rev-parse --verify --short HEAD".runCommand() -val keystorePropertiesFile = rootProject.file("keystore.properties") +val keystorePropertiesFile: File = rootProject.file("keystore.properties") val keystoreProperties = Properties() if (keystorePropertiesFile.exists()) { println("Loading keystore properties from ${keystorePropertiesFile.absolutePath}") @@ -126,7 +126,7 @@ android { kotlinCompilerExtensionVersion = "1.4.3" } - packagingOptions { + packaging { resources { excludes += "/META-INF/{AL2.0,LGPL2.1}" } From c71d016a5834a2bcc3994aa1d94a9ce305483957 Mon Sep 17 00:00:00 2001 From: DianQK Date: Wed, 3 May 2023 06:22:36 +0800 Subject: [PATCH 2/5] Bump activity-compose to 1.7.1 --- app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index b212fb9..6da15d7 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -158,7 +158,7 @@ dependencies { implementation(libs.androidx.core.ktx) implementation(libs.androidx.lifecycle.runtime.ktx) implementation(libs.androidx.lifecycle.runtime.compose) - implementation("androidx.activity:activity-compose:1.7.0") + implementation("androidx.activity:activity-compose:1.7.1") implementation("androidx.work:work-runtime-ktx:2.8.1") implementation(libs.compose.ui) From cf2c08b441d65a11179481e42020ae1aa6e382c0 Mon Sep 17 00:00:00 2001 From: DianQK Date: Wed, 3 May 2023 06:30:12 +0800 Subject: [PATCH 3/5] Bump jvm to 17 --- .gitignore | 1 + .idea/.name | 1 - .idea/compiler.xml | 6 --- .idea/inspectionProfiles/Project_Default.xml | 41 -------------------- .idea/kotlinc.xml | 6 --- .idea/misc.xml | 4 -- .idea/vcs.xml | 7 ---- app/build.gradle.kts | 8 ++-- mdrender/build.gradle.kts | 9 +++-- mdrenderbenchmark/build.gradle.kts | 10 +++-- uniffi/build.gradle.kts | 9 +++-- 11 files changed, 23 insertions(+), 79 deletions(-) delete mode 100644 .idea/.name delete mode 100644 .idea/compiler.xml delete mode 100644 .idea/inspectionProfiles/Project_Default.xml delete mode 100644 .idea/kotlinc.xml delete mode 100644 .idea/misc.xml delete mode 100644 .idea/vcs.xml diff --git a/.gitignore b/.gitignore index ac12ec3..0366b01 100644 --- a/.gitignore +++ b/.gitignore @@ -22,6 +22,7 @@ local.properties # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 # User-specific stuff +/.idea .idea/**/workspace.xml .idea/**/tasks.xml .idea/**/usage.statistics.xml diff --git a/.idea/.name b/.idea/.name deleted file mode 100644 index 7da6500..0000000 --- a/.idea/.name +++ /dev/null @@ -1 +0,0 @@ -Ruslin \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml deleted file mode 100644 index fb7f4a8..0000000 --- a/.idea/compiler.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml deleted file mode 100644 index 44ca2d9..0000000 --- a/.idea/inspectionProfiles/Project_Default.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml deleted file mode 100644 index 0fc3113..0000000 --- a/.idea/kotlinc.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index cb73134..0000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 3e58455..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 6da15d7..aac08e9 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -103,18 +103,18 @@ android { } compileOptions { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 } kotlinOptions { - jvmTarget = JavaVersion.VERSION_11.toString() + jvmTarget = JavaVersion.VERSION_17.toString() freeCompilerArgs = freeCompilerArgs + "-opt-in=kotlin.RequiresOptIn" freeCompilerArgs = freeCompilerArgs + "-Xjvm-default=all" } kotlin { - jvmToolchain(11) + jvmToolchain(17) } buildFeatures { diff --git a/mdrender/build.gradle.kts b/mdrender/build.gradle.kts index f02f505..48fed93 100644 --- a/mdrender/build.gradle.kts +++ b/mdrender/build.gradle.kts @@ -25,13 +25,16 @@ android { } } compileOptions { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 } kotlinOptions { - jvmTarget = "11" + jvmTarget = JavaVersion.VERSION_17.toString() // freeCompilerArgs += "-opt-in=kotlin.RequiresOptIn -Xjvm-default=all" } + kotlin { + jvmToolchain(17) + } } dependencies { diff --git a/mdrenderbenchmark/build.gradle.kts b/mdrenderbenchmark/build.gradle.kts index 7363cf4..bd8b432 100644 --- a/mdrenderbenchmark/build.gradle.kts +++ b/mdrenderbenchmark/build.gradle.kts @@ -19,14 +19,16 @@ android { } compileOptions { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 } kotlinOptions { - jvmTarget = "11" + jvmTarget = JavaVersion.VERSION_17.toString() + } + kotlin { + jvmToolchain(17) } - testBuildType = "release" buildTypes { diff --git a/uniffi/build.gradle.kts b/uniffi/build.gradle.kts index 9d3793d..c58c0ba 100644 --- a/uniffi/build.gradle.kts +++ b/uniffi/build.gradle.kts @@ -24,11 +24,14 @@ android { } } compileOptions { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 } kotlinOptions { - jvmTarget = "11" + jvmTarget = JavaVersion.VERSION_17.toString() + } + kotlin { + jvmToolchain(17) } } From 5f179b618e17e692cdc81f22f2793d2f8f4ce0bc Mon Sep 17 00:00:00 2001 From: DianQK Date: Wed, 3 May 2023 06:34:21 +0800 Subject: [PATCH 4/5] Bump material3 to 1.1.0-rc01 --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index d896780..35f7584 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -18,7 +18,7 @@ appcompat = "1.6.1" material = "1.8.0" compose = "1.4.0" accompanist = "0.30.0" -material3 = "1.1.0-beta01" +material3 = "1.1.0-rc01" lifecycleRuntime = "2.6.1" # test From 31251c560c0b4df30968a52fab57ad9829b6b4e2 Mon Sep 17 00:00:00 2001 From: DianQK Date: Wed, 3 May 2023 06:42:17 +0800 Subject: [PATCH 5/5] Bump hilt and core --- app/build.gradle.kts | 5 +++-- gradle/libs.versions.toml | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index aac08e9..60cd8ae 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -175,9 +175,10 @@ dependencies { implementation("com.google.android.material:material:1.8.0") - implementation("com.google.dagger:hilt-android:2.45") implementation("androidx.webkit:webkit:1.6.1") - kapt("com.google.dagger:hilt-compiler:2.45") + + implementation(libs.hilt.android) + kapt(libs.hilt.compiler) kapt("androidx.hilt:hilt-compiler:1.0.0") // https://github.com/google/dagger/issues/2601#issuecomment-1174506373 implementation("androidx.hilt:hilt-navigation-compose:1.0.0") diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 35f7584..4e6745c 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,10 +1,10 @@ [versions] # plugin androidGradlePlugin = "8.0.1" -hilt = "2.44.2" +hilt = "2.46" kotlin = "1.8.10" androidxBenchmark = "1.1.1" -androidxCore = "1.9.0" +androidxCore = "1.10.0" # sdk compileSdkVersion = "33" @@ -51,6 +51,8 @@ accompanist-systemuicontroller = { group = "com.google.accompanist", name = "acc compose-ui-test-junit4 = { group = "androidx.compose.ui", name = "ui-test-junit4", version.ref = "compose" } compose-ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling", version.ref = "compose" } compose-ui-test-manifest = { group = "androidx.compose.ui", name = "ui-test-manifest", version.ref = "compose" } +hilt-android = { group = "com.google.dagger", name = "hilt-android", version.ref = "hilt" } +hilt-compiler = { group = "com.google.dagger", name = "hilt-compiler", version.ref = "hilt" } [plugins] android-application = { id = "com.android.application", version.ref = "androidGradlePlugin" }