build: update android gradle plugin and gradle
authorDa Risk <da_risk@geekorum.com>
Mon, 17 Feb 2025 19:05:08 -0400
changeset 76 39513540ae52
parent 75 534a19e25217
child 77 05d65b432655
build: update android gradle plugin and gradle
buildSrc/build.gradle.kts
buildSrc/settings.gradle.kts
gradle/libs.versions.toml
gradle/wrapper/gradle-wrapper.properties
--- a/buildSrc/build.gradle.kts	Mon Feb 17 18:52:41 2025 -0400
+++ b/buildSrc/build.gradle.kts	Mon Feb 17 19:05:08 2025 -0400
@@ -55,8 +55,16 @@
     gradlePluginPortal()
 }
 
+// see https://github.com/gradle/gradle/issues/17963
+fun Provider<PluginDependency>.gav(): String {
+    val t = get()
+    val id = t.pluginId
+    val version = t.version
+    return "$id:$id.gradle.plugin:$version"
+}
+
 dependencies {
-    implementation("com.android.tools.build:gradle:8.3.1")
+    implementation(libs.plugins.android.application.gav())
     implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.23")
     implementation("gradle.plugin.com.hierynomus.gradle.plugins:license-gradle-plugin:0.16.1")
     implementation("com.github.triplet.gradle:play-publisher:3.7.0")
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/buildSrc/settings.gradle.kts	Mon Feb 17 19:05:08 2025 -0400
@@ -0,0 +1,34 @@
+/*
+ * Geekdroid is a utility library for development on the Android
+ * Platform.
+ *
+ * Copyright (C) 2017-2025 by Frederic-Charles Barthelery.
+ *
+ * This file is part of Geekdroid.
+ *
+ * Geekdroid is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Geekdroid is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Geekdroid.  If not, see <http://www.gnu.org/licenses/>.
+ */
+dependencyResolutionManagement {
+    repositories {
+        gradlePluginPortal()
+        mavenCentral()
+        google()
+    }
+
+    versionCatalogs {
+        create("libs") {
+            from(files("../gradle/libs.versions.toml"))
+        }
+    }
+}
\ No newline at end of file
--- a/gradle/libs.versions.toml	Mon Feb 17 18:52:41 2025 -0400
+++ b/gradle/libs.versions.toml	Mon Feb 17 19:05:08 2025 -0400
@@ -1,4 +1,5 @@
 [versions]
+android-gradle-plugin = "8.8.1"
 annotation = "1.7.1"
 androidx-activity = "1.8.2"
 androidx-compose-bom = "2024.03.00"
@@ -25,6 +26,8 @@
 workmanager = "2.9.0"
 
 [plugins]
+android-application = { id = "com.android.application", version.ref = "android-gradle-plugin" }
+
 
 [libraries]
 annotation = { module = "androidx.annotation:annotation", version.ref = "annotation" }
--- a/gradle/wrapper/gradle-wrapper.properties	Mon Feb 17 18:52:41 2025 -0400
+++ b/gradle/wrapper/gradle-wrapper.properties	Mon Feb 17 19:05:08 2025 -0400
@@ -1,6 +1,6 @@
 #Sat May 06 19:25:31 AST 2023
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists