From 32ce7e4407c1e9d329c2cd8f5034fac432de5783 Mon Sep 17 00:00:00 2001 From: Secozzi Date: Tue, 29 Oct 2024 23:07:16 +0100 Subject: [PATCH] Migrate some classpaths to gradle plugins Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com> --- app/build.gradle.kts | 2 +- build.gradle.kts | 6 +++--- data/build.gradle.kts | 2 +- gradle/libs.versions.toml | 9 +++++---- i18n/build.gradle.kts | 2 +- 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index da2f746f4..fb4e49f29 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -6,9 +6,9 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { id("mihon.android.application") id("mihon.android.application.compose") - id("com.mikepenz.aboutlibraries.plugin") id("com.github.zellius.shortcut-helper") kotlin("plugin.serialization") + alias(libs.plugins.aboutLibraries) } shortcutHelper.setFilePath("./shortcuts.xml") diff --git a/build.gradle.kts b/build.gradle.kts index ea6a7b9c4..a13d3fb00 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,14 +1,14 @@ buildscript { dependencies { classpath(libs.android.shortcut.gradle) - classpath(libs.aboutLibraries.gradle) - classpath(libs.sqldelight.gradle) - classpath(libs.moko.gradle) } } plugins { alias(kotlinx.plugins.serialization) apply false + alias(libs.plugins.aboutLibraries) apply false + alias(libs.plugins.moko) apply false + alias(libs.plugins.sqldelight) apply false } tasks.register("clean") { diff --git a/data/build.gradle.kts b/data/build.gradle.kts index 8d33c0212..6d2603190 100644 --- a/data/build.gradle.kts +++ b/data/build.gradle.kts @@ -1,8 +1,8 @@ plugins { id("mihon.library") - id("app.cash.sqldelight") kotlin("android") kotlin("plugin.serialization") + alias(libs.plugins.sqldelight) } android { diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 9d8450dc9..f7992e18b 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -68,12 +68,9 @@ compose-stablemarker = "com.github.skydoves:compose-stable-marker:1.0.5" swipe = "me.saket.swipe:swipe:1.3.0" moko-core = { module = "dev.icerock.moko:resources", version.ref = "moko" } -moko-gradle = { module = "dev.icerock.moko:resources-generator", version.ref = "moko" } logcat = "com.squareup.logcat:logcat:0.1" -aboutLibraries-core = { module = "com.mikepenz:aboutlibraries-core", version.ref = "aboutlib_version" } -aboutLibraries-gradle = { module = "com.mikepenz.aboutlibraries.plugin:aboutlibraries-plugin", version.ref = "aboutlib_version" } aboutLibraries-compose = { module = "com.mikepenz:aboutlibraries-compose-m3", version.ref = "aboutlib_version" } shizuku-api = { module = "dev.rikka.shizuku:api", version.ref = "shizuku_version" } @@ -86,7 +83,6 @@ sqldelight-android-driver = { module = "app.cash.sqldelight:android-driver", ver sqldelight-coroutines = { module = "app.cash.sqldelight:coroutines-extensions-jvm", version.ref = "sqldelight" } sqldelight-android-paging = { module = "app.cash.sqldelight:androidx-paging3-extensions", version.ref = "sqldelight" } sqldelight-dialects-sql = { module = "app.cash.sqldelight:sqlite-3-38-dialect", version.ref = "sqldelight" } -sqldelight-gradle = { module = "app.cash.sqldelight:gradle-plugin", version.ref = "sqldelight" } junit = "org.junit.jupiter:junit-jupiter:5.11.0" kotest-assertions = "io.kotest:kotest-assertions-core:5.9.1" @@ -108,6 +104,11 @@ truetypeparser = "io.github.yubyf:truetypeparser-light:2.1.4" spotless-gradle = { group = "com.diffplug.spotless", name = "spotless-plugin-gradle", version.ref = "spotless" } ktlint-core = { module = "com.pinterest.ktlint:ktlint-cli", version.ref = "ktlint-core" } +[plugins] +aboutLibraries = { id = "com.mikepenz.aboutlibraries.plugin", version.ref = "aboutlib_version" } +sqldelight = { id = "app.cash.sqldelight", version.ref = "sqldelight" } +moko = { id = "dev.icerock.mobile.multiplatform-resources", version.ref = "moko" } + [bundles] okhttp = ["okhttp-core", "okhttp-logging", "okhttp-brotli", "okhttp-dnsoverhttps"] js-engine = ["quickjs-android"] diff --git a/i18n/build.gradle.kts b/i18n/build.gradle.kts index 2754143d6..09dff6452 100644 --- a/i18n/build.gradle.kts +++ b/i18n/build.gradle.kts @@ -4,8 +4,8 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { id("mihon.library") - id("dev.icerock.mobile.multiplatform-resources") kotlin("multiplatform") + alias(libs.plugins.moko) } kotlin {