From 4e75ec46fcda6555aac28097871cdfd0b4e42291 Mon Sep 17 00:00:00 2001 From: greenart7c3 Date: Mon, 19 Aug 2024 08:12:34 -0300 Subject: [PATCH] update kotlin and ksp. fix gradle deprecation warnings --- .idea/kotlinc.xml | 4 ++-- build.gradle | 23 +++++++++++++++-------- gradle/libs.versions.toml | 4 ++-- 3 files changed, 19 insertions(+), 12 deletions(-) diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml index f8de4019..5815a4a6 100644 --- a/.idea/kotlinc.xml +++ b/.idea/kotlinc.xml @@ -1,6 +1,6 @@ - - + \ No newline at end of file diff --git a/build.gradle b/build.gradle index ef659a48..406fbf1c 100644 --- a/build.gradle +++ b/build.gradle @@ -15,27 +15,34 @@ tasks.register('installGitHook', Copy) { from new File(rootProject.rootDir, 'git-hooks/pre-commit') from new File(rootProject.rootDir, 'git-hooks/pre-push') into { new File(rootProject.rootDir, '.git/hooks') } - fileMode 0777 + filePermissions { + unix(0b111_111_111) + } } -tasks.getByPath(':app:preBuild').dependsOn installGitHook +project(":app") { + tasks.matching { it.name == "preBuild" }.configureEach { + dependsOn(rootProject.tasks.named("installGitHook")) + } +} subprojects { tasks.withType(KotlinCompile).configureEach { kotlinOptions { + var buildDirPath = project.layout.buildDirectory.get().asFile.absolutePath if (project.findProperty("composeCompilerReports") == "true") { - freeCompilerArgs += [ + freeCompilerArgs += listOf( "-P", "plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=" + - project.buildDir.absolutePath + "/compose_compiler" - ] + buildDirPath + "/compose_compiler" + ) } if (project.findProperty("composeCompilerMetrics") == "true") { - freeCompilerArgs += [ + freeCompilerArgs += listOf( "-P", "plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=" + - project.buildDir.absolutePath + "/compose_compiler" - ] + buildDirPath + "/compose_compiler" + ) } } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 6e0b8fdf..8628b260 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -24,12 +24,12 @@ roomKtx = "2.6.1" securityCryptoKtx = "1.1.0-alpha06" zxingAndroidEmbedded = "4.3.0" okhttp = "5.0.0-alpha.14" -kotlin = "2.0.0" +kotlin = "2.0.10" workRuntimeKtx = "2.9.1" agp = "8.5.2" ktlint = "12.1.1" gms = "4.4.2" -ksp = "2.0.0-1.0.22" +ksp = "2.0.10-1.0.24" [libraries] activity-compose = { module = "androidx.activity:activity-compose", version.ref = "activityCompose" }