Migrate some classpaths to gradle plugins

This commit is contained in:
AntsyLich 2024-09-03 14:09:12 +06:00
parent abfb72c89c
commit fc1c804bfd
No known key found for this signature in database
5 changed files with 14 additions and 12 deletions

View File

@ -6,13 +6,13 @@ 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)
}
if (gradle.startParameter.taskRequests.toString().contains("Standard")) {
apply<com.google.gms.googleservices.GoogleServicesPlugin>()
pluginManager.apply(libs.plugins.google.services.get().pluginId)
}
shortcutHelper.setFilePath("./shortcuts.xml")

View File

@ -1,15 +1,15 @@
buildscript {
dependencies {
classpath(libs.android.shortcut.gradle)
classpath(libs.google.services.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.google.services) apply false
alias(libs.plugins.moko) apply false
alias(libs.plugins.sqldelight) apply false
}
tasks.register<Delete>("clean") {

View File

@ -1,8 +1,8 @@
plugins {
id("mihon.library")
id("app.cash.sqldelight")
kotlin("android")
kotlin("plugin.serialization")
alias(libs.plugins.sqldelight)
}
android {

View File

@ -14,7 +14,6 @@ ktlint-core = "1.3.1"
[libraries]
desugar = "com.android.tools:desugar_jdk_libs:2.1.1"
android-shortcut-gradle = "com.github.zellius:android-shortcut-gradle-plugin:0.1.2"
google-services-gradle = "com.google.gms:google-services:4.4.2"
rxjava = "io.reactivex:rxjava:1.3.8"
@ -69,13 +68,11 @@ 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"
firebase-analytics = "com.google.firebase:firebase-analytics:22.1.0"
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" }
@ -88,7 +85,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"
@ -102,6 +98,12 @@ voyager-transitions = { module = "cafe.adriel.voyager:voyager-transitions", vers
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]
google-services = { id = "com.google.gms.google-services", version = "4.4.2" }
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"]

View File

@ -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 {