Migrate to VersionCatalog (#504)

This commit is contained in:
LooKeR 2023-10-07 17:03:08 +05:30 committed by GitHub
parent 41e1b628d1
commit 5516a1c23b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
20 changed files with 228 additions and 281 deletions

View File

@ -1,6 +1,6 @@
plugins { plugins {
id("looker.android.application") alias(libs.plugins.looker.android.application)
id("looker.hilt.work") alias(libs.plugins.looker.hilt.work)
} }
android { android {
@ -105,7 +105,15 @@ android {
} }
packaging { packaging {
resources { resources {
excludes += Excludes.listExclude excludes += listOf(
"/DebugProbesKt.bin",
"/kotlin/**.kotlin_builtins",
"/kotlin/**.kotlin_metadata",
"/META-INF/**.kotlin_module",
"/META-INF/**.pro",
"/META-INF/**.version",
"/META-INF/versions/9/previous-**.bin"
)
} }
} }
buildFeatures { buildFeatures {
@ -124,20 +132,17 @@ dependencies {
Modules.installer Modules.installer
) )
implementation(Core.core) implementation(libs.android.material)
implementation(libs.androidx.core.ktx)
androidX() implementation(libs.androidx.activity.ktx)
coroutines() implementation(libs.androidx.appcompat)
desugar() implementation(libs.androidx.fragment.ktx)
lifecycle() implementation(libs.androidx.lifecycle.viewModel.ktx)
implementation(libs.androidx.recyclerview)
implementation(Coil.coil) implementation(libs.androidx.sqlite.ktx)
implementation(libs.coil.kt)
implementation(Jackson.core) implementation(libs.kotlinx.datetime)
implementation(libs.kotlinx.coroutines.android)
implementation(Kotlin.datetime) implementation(libs.jackson.core)
implementation(libs.zoomage)
implementation(Others.zoomage)
implementation(SQLite.ktx)
} }

View File

@ -3,6 +3,11 @@ dependencyResolutionManagement {
google() google()
mavenCentral() mavenCentral()
} }
versionCatalogs {
create("libs") {
from(files("../gradle/libs.versions.toml"))
}
}
} }
rootProject.name = "build-logic" rootProject.name = "build-logic"

View File

@ -1,4 +1,3 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins { plugins {
@ -18,9 +17,9 @@ tasks.withType<KotlinCompile>().configureEach {
} }
dependencies { dependencies {
compileOnly("com.android.tools.build:gradle:8.1.2") compileOnly(libs.android.gradlePlugin)
compileOnly("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.10") compileOnly(libs.kotlin.gradlePlugin)
compileOnly("com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin:1.9.10-1.0.13") compileOnly(libs.ksp.gradlePlugin)
} }
gradlePlugin { gradlePlugin {

View File

@ -1,5 +1,7 @@
import com.android.build.api.dsl.ApplicationExtension import com.android.build.api.dsl.ApplicationExtension
import com.looker.droidify.configureKotlinAndroid import com.looker.droidify.configureKotlinAndroid
import com.looker.droidify.getLibrary
import com.looker.droidify.libs
import org.gradle.api.Plugin import org.gradle.api.Plugin
import org.gradle.api.Project import org.gradle.api.Project
import org.gradle.kotlin.dsl.configure import org.gradle.kotlin.dsl.configure
@ -30,7 +32,7 @@ class AndroidApplicationPlugin : Plugin<Project> {
} }
} }
dependencies { dependencies {
add("implementation", platform("org.jetbrains.kotlin:kotlin-bom:1.9.10")) add("implementation", platform(libs.getLibrary("kotlin.bom")))
add("implementation", kotlin("stdlib")) add("implementation", kotlin("stdlib"))
add("implementation", kotlin("reflect")) add("implementation", kotlin("reflect"))
} }

View File

@ -1,3 +1,5 @@
import com.looker.droidify.getLibrary
import com.looker.droidify.libs
import org.gradle.api.Plugin import org.gradle.api.Plugin
import org.gradle.api.Project import org.gradle.api.Project
import org.gradle.kotlin.dsl.dependencies import org.gradle.kotlin.dsl.dependencies
@ -6,12 +8,13 @@ class AndroidHiltPlugin : Plugin<Project> {
override fun apply(target: Project) { override fun apply(target: Project) {
with(target) { with(target) {
with(pluginManager) { with(pluginManager) {
apply(Hilt.plugin) apply("com.google.dagger.hilt.android")
apply(Ksp.plugin) apply("com.google.devtools.ksp")
} }
dependencies { dependencies {
hilt(includeWork = false) add("implementation", libs.getLibrary("hilt.android"))
add("ksp", libs.getLibrary("hilt.compiler"))
} }
} }
} }

View File

@ -1,3 +1,5 @@
import com.looker.droidify.getLibrary
import com.looker.droidify.libs
import org.gradle.api.Plugin import org.gradle.api.Plugin
import org.gradle.api.Project import org.gradle.api.Project
import org.gradle.kotlin.dsl.dependencies import org.gradle.kotlin.dsl.dependencies
@ -6,13 +8,13 @@ class AndroidHiltWorkerPlugin : Plugin<Project> {
override fun apply(target: Project) { override fun apply(target: Project) {
with(target) { with(target) {
with(pluginManager) { with(pluginManager) {
apply(Hilt.plugin) apply("looker.hilt")
apply(Ksp.plugin)
} }
dependencies { dependencies {
hilt(includeWork = true) add("implementation", libs.getLibrary("androidx.work.ktx"))
add("implementation", Work.manager) add("implementation", libs.getLibrary("hilt.ext.work"))
add("ksp", libs.getLibrary("hilt.ext.compiler"))
} }
} }
} }

View File

@ -1,6 +1,8 @@
import com.android.build.api.variant.LibraryAndroidComponentsExtension import com.android.build.api.variant.LibraryAndroidComponentsExtension
import com.android.build.gradle.LibraryExtension import com.android.build.gradle.LibraryExtension
import com.looker.droidify.configureKotlinAndroid import com.looker.droidify.configureKotlinAndroid
import com.looker.droidify.getLibrary
import com.looker.droidify.libs
import org.gradle.api.Plugin import org.gradle.api.Plugin
import org.gradle.api.Project import org.gradle.api.Project
import org.gradle.kotlin.dsl.configure import org.gradle.kotlin.dsl.configure
@ -32,7 +34,7 @@ class AndroidLibraryPlugin : Plugin<Project> {
} }
} }
dependencies { dependencies {
add("implementation", platform("org.jetbrains.kotlin:kotlin-bom:1.9.10")) add("implementation", platform(libs.getLibrary("kotlin.bom")))
add("implementation", kotlin("stdlib")) add("implementation", kotlin("stdlib"))
add("implementation", kotlin("reflect")) add("implementation", kotlin("reflect"))
add("testImplementation", kotlin("test")) add("testImplementation", kotlin("test"))

View File

@ -1,4 +1,6 @@
import com.google.devtools.ksp.gradle.KspExtension import com.google.devtools.ksp.gradle.KspExtension
import com.looker.droidify.getLibrary
import com.looker.droidify.libs
import org.gradle.api.Plugin import org.gradle.api.Plugin
import org.gradle.api.Project import org.gradle.api.Project
import org.gradle.api.tasks.InputDirectory import org.gradle.api.tasks.InputDirectory
@ -13,7 +15,7 @@ class AndroidRoomPlugin : Plugin<Project> {
override fun apply(target: Project) { override fun apply(target: Project) {
with(target) { with(target) {
pluginManager.apply(Ksp.plugin) pluginManager.apply("com.google.devtools.ksp")
extensions.configure<KspExtension> { extensions.configure<KspExtension> {
// The schemas directory contains a schema file for each version of the Room database. // The schemas directory contains a schema file for each version of the Room database.
@ -23,7 +25,9 @@ class AndroidRoomPlugin : Plugin<Project> {
} }
dependencies { dependencies {
room() add("implementation", libs.getLibrary("room.ktx"))
add("implementation", libs.getLibrary("room.runtime"))
add("ksp", libs.getLibrary("room.compiler"))
} }
} }
} }

View File

@ -1,194 +0,0 @@
import org.gradle.kotlin.dsl.DependencyHandlerScope
object AndroidX {
const val appCompat = "androidx.appcompat:appcompat:1.6.1"
const val desugar = "com.android.tools:desugar_jdk_libs:2.0.3"
const val material = "com.google.android.material:material:1.10.0"
const val recyclerView = "androidx.recyclerview:recyclerview:1.3.1"
}
object Core {
private const val coreVersion = "1.12.0"
const val core = "androidx.core:core-ktx:$coreVersion"
}
object Coil {
private const val coilVersion = "2.4.0"
const val coil = "io.coil-kt:coil:$coilVersion"
}
private object Compose {
const val bom = "androidx.compose:compose-bom:2023.09.02"
const val animation = "androidx.compose.animation:animation"
const val ui = "androidx.compose.ui:ui"
const val tooling = "androidx.compose.ui:ui-tooling"
const val preview = "androidx.compose.ui:ui-tooling-preview"
const val foundation = "androidx.compose.foundation:foundation"
const val runtime = "androidx.compose.runtime:runtime"
const val material3 = "androidx.compose.material3:material3"
}
private object Coroutines {
private const val coroutinesVersion = "1.7.3"
const val core = "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion"
const val android = "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutinesVersion"
}
object Datastore {
private const val version = "1.0.0"
const val datastore = "androidx.datastore:datastore-preferences:$version"
}
object Excludes {
val listExclude: List<String> = listOf(
"/DebugProbesKt.bin",
"/kotlin/**.kotlin_builtins",
"/kotlin/**.kotlin_metadata",
"/META-INF/**.kotlin_module",
"/META-INF/**.pro",
"/META-INF/**.version",
"/META-INF/versions/9/previous-**.bin"
)
}
private object FDroid {
private const val indexVersion = "0.1.1"
const val download = "org.fdroid:download:$indexVersion"
const val index = "org.fdroid:index:$indexVersion"
}
object Hilt {
const val version = "2.48.1"
private const val androidXHilt = "1.1.0-beta01"
const val plugin = "com.google.dagger.hilt.android"
const val android = "com.google.dagger:hilt-android:$version"
const val compiler = "com.google.dagger:hilt-compiler:$version"
const val work = "androidx.hilt:hilt-work:$androidXHilt"
const val androidX = "androidx.hilt:hilt-compiler:$androidXHilt"
}
object Jackson {
const val core = "com.fasterxml.jackson.core:jackson-core:2.15.2"
}
object Kotlin {
const val serialization = "org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.0"
const val datetime = "org.jetbrains.kotlinx:kotlinx-datetime:0.4.1"
}
object Ksp {
const val plugin = "com.google.devtools.ksp"
}
private object Ktor {
private const val version = "2.3.5"
const val core = "io.ktor:ktor-client-core:$version"
const val okhttp = "io.ktor:ktor-client-okhttp:$version"
}
private object Lifecycle {
private const val version = "2.6.2"
const val viewmodel = "androidx.lifecycle:lifecycle-viewmodel-ktx:$version"
const val fragment = "androidx.fragment:fragment-ktx:1.6.1"
// TODO: Try ::enableEdgeToEdge function
const val activity = "androidx.activity:activity-ktx:1.8.0"
}
object Others {
const val libsu = "com.github.topjohnwu.libsu:core:5.2.1"
const val zoomage = "com.jsibbold:zoomage:1.3.1"
}
private object Room {
private const val roomVersion = "2.5.2"
const val runtime = "androidx.room:room-runtime:$roomVersion"
const val compiler = "androidx.room:room-compiler:$roomVersion"
const val ktx = "androidx.room:room-ktx:$roomVersion"
}
object Shizuku {
private const val version = "13.0.0"
const val api = "dev.rikka.shizuku:api:$version"
const val provider = "dev.rikka.shizuku:provider:$version"
}
object SQLite {
private const val version = "2.3.1"
const val ktx = "androidx.sqlite:sqlite-ktx:$version"
}
object Test {
const val jUnitRunner = "androidx.test.runner.AndroidJUnitRunner"
const val jUnit = "junit:junit:4.13.2"
const val androidJUnit = "androidx.test.ext:junit:1.1.5"
const val espresso = "androidx.test.espresso:espresso-core:3.5.1"
}
object Work {
private const val version = "2.8.1"
const val manager = "androidx.work:work-runtime-ktx:$version"
}
fun DependencyHandlerScope.androidX() {
add("implementation", AndroidX.appCompat)
add("implementation", AndroidX.material)
add("implementation", AndroidX.recyclerView)
}
fun DependencyHandlerScope.compose() {
add("implementation", platform(Compose.bom))
add("implementation", Compose.animation)
add("implementation", Compose.ui)
add("implementation", Compose.foundation)
add("implementation", Compose.runtime)
add("implementation", Compose.material3)
add("implementation", Compose.preview)
add("debugImplementation", Compose.tooling)
}
fun DependencyHandlerScope.coroutines() {
add("implementation", Coroutines.core)
add("implementation", Coroutines.android)
}
fun DependencyHandlerScope.desugar() {
add("coreLibraryDesugaring", AndroidX.desugar)
}
fun DependencyHandlerScope.fdroid() {
add("implementation", FDroid.index)
add("implementation", FDroid.download)
}
fun DependencyHandlerScope.hilt(includeWork: Boolean = false) {
add("implementation", Hilt.android)
add("ksp", Hilt.compiler)
if (includeWork) {
add("implementation", Hilt.work)
add("ksp", Hilt.androidX)
}
}
fun DependencyHandlerScope.ktor() {
add("implementation", Ktor.core)
add("implementation", Ktor.okhttp)
}
fun DependencyHandlerScope.lifecycle() {
add("implementation", Lifecycle.activity)
add("implementation", Lifecycle.fragment)
add("implementation", Lifecycle.viewmodel)
}
fun DependencyHandlerScope.recyclerView() {
add("implementation", AndroidX.recyclerView)
}
fun DependencyHandlerScope.room() {
add("implementation", Room.ktx)
add("implementation", Room.runtime)
add("ksp", Room.compiler)
}

View File

@ -1,9 +1,7 @@
package com.looker.droidify package com.looker.droidify
import DefaultConfig import DefaultConfig
import Test
import com.android.build.api.dsl.CommonExtension import com.android.build.api.dsl.CommonExtension
import desugar
import org.gradle.api.JavaVersion import org.gradle.api.JavaVersion
import org.gradle.api.Project import org.gradle.api.Project
import org.gradle.kotlin.dsl.dependencies import org.gradle.kotlin.dsl.dependencies
@ -24,7 +22,7 @@ internal fun Project.configureKotlinAndroid(
defaultConfig { defaultConfig {
minSdk = DefaultConfig.minSdk minSdk = DefaultConfig.minSdk
testInstrumentationRunner = Test.jUnitRunner testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
} }
compileOptions { compileOptions {
@ -39,7 +37,7 @@ internal fun Project.configureKotlinAndroid(
configureKotlin() configureKotlin()
dependencies { dependencies {
desugar() add("coreLibraryDesugaring", libs.getLibrary("android.desugarJdkLibs"))
} }
} }

View File

@ -0,0 +1,18 @@
package com.looker.droidify
import org.gradle.api.Project
import org.gradle.api.artifacts.MinimalExternalModuleDependency
import org.gradle.api.artifacts.VersionCatalog
import org.gradle.api.artifacts.VersionCatalogsExtension
import org.gradle.api.provider.Provider
import org.gradle.kotlin.dsl.getByType
import org.gradle.plugin.use.PluginDependency
val Project.libs
get(): VersionCatalog = extensions.getByType<VersionCatalogsExtension>().named("libs")
fun VersionCatalog.getPlugin(alias: String): Provider<PluginDependency> =
findPlugin(alias).get()
fun VersionCatalog.getLibrary(alias: String): Provider<MinimalExternalModuleDependency> =
findLibrary(alias).get()

View File

@ -1,8 +1,7 @@
plugins { plugins {
id("com.android.application") version "8.1.2" apply false alias(libs.plugins.android.application) apply false
id("com.android.library") version "8.1.2" apply false alias(libs.plugins.android.library) apply false
id("org.jetbrains.kotlin.android") version "1.9.10" apply false alias(libs.plugins.kotlin.jvm) apply false
kotlin("plugin.serialization") version "1.9.10" apply false alias(libs.plugins.ksp) apply false
id("com.google.devtools.ksp") version "1.9.10-1.0.13" apply false alias(libs.plugins.hilt) apply false
id("com.google.dagger.hilt.android") version "2.48.1" apply false
} }

View File

@ -1,7 +1,7 @@
import com.android.build.gradle.internal.tasks.factory.dependsOn import com.android.build.gradle.internal.tasks.factory.dependsOn
plugins { plugins {
id("looker.android.library") alias(libs.plugins.looker.android.library)
} }
android { android {
@ -26,17 +26,15 @@ android {
} }
dependencies { dependencies {
recyclerView() implementation(libs.kotlinx.coroutines.android)
coroutines() implementation(libs.android.material)
lifecycle() implementation(libs.androidx.activity.ktx)
implementation(libs.androidx.fragment.ktx)
implementation(AndroidX.material) implementation(libs.androidx.core.ktx)
implementation(libs.androidx.lifecycle.viewModel.ktx)
implementation(Core.core) implementation(libs.androidx.recyclerview)
implementation(libs.coil.kt)
implementation(Coil.coil) implementation(libs.jackson.core)
implementation(Jackson.core)
} }
// using a task as a preBuild dependency instead of a function that takes some time insures that it runs // using a task as a preBuild dependency instead of a function that takes some time insures that it runs

View File

@ -1,6 +1,6 @@
plugins { plugins {
id("looker.android.library") alias(libs.plugins.looker.android.library)
id("looker.hilt.work") alias(libs.plugins.looker.hilt.work)
} }
android { android {
@ -28,6 +28,7 @@ dependencies {
Modules.coreNetwork Modules.coreNetwork
) )
coroutines() implementation(libs.kotlinx.coroutines.android)
fdroid() implementation(libs.fdroid.index)
implementation(libs.fdroid.download)
} }

View File

@ -1,8 +1,8 @@
plugins { plugins {
id("looker.android.library") alias(libs.plugins.looker.android.library)
kotlin("plugin.serialization") alias(libs.plugins.looker.room)
id("looker.room") alias(libs.plugins.looker.hilt)
id("looker.hilt") alias(libs.plugins.kotlin.serialization)
} }
android { android {
@ -23,8 +23,7 @@ android {
dependencies { dependencies {
modules(Modules.coreCommon, Modules.coreModel) modules(Modules.coreCommon, Modules.coreModel)
coroutines() implementation(libs.kotlinx.coroutines.android)
implementation(libs.androidx.core.ktx)
implementation(Core.core) implementation(libs.kotlinx.serialization.json)
implementation(Kotlin.serialization)
} }

View File

@ -1,6 +1,6 @@
plugins { plugins {
id("looker.android.library") alias(libs.plugins.looker.android.library)
id("looker.hilt") alias(libs.plugins.looker.hilt)
} }
android { android {
@ -20,7 +20,7 @@ android {
dependencies { dependencies {
modules(Modules.coreCommon) modules(Modules.coreCommon)
coroutines() implementation(libs.kotlinx.coroutines.android)
implementation(Datastore.datastore) implementation(libs.androidx.dataStore.core)
implementation(Kotlin.datetime) implementation(libs.kotlinx.datetime)
} }

View File

@ -1,5 +1,5 @@
plugins { plugins {
id("looker.android.library") alias(libs.plugins.looker.android.library)
} }
android { android {

View File

@ -1,6 +1,6 @@
plugins { plugins {
id("looker.android.library") alias(libs.plugins.looker.android.library)
id("looker.hilt") alias(libs.plugins.looker.hilt)
} }
android { android {
@ -21,7 +21,7 @@ android {
dependencies { dependencies {
modules(Modules.coreCommon) modules(Modules.coreCommon)
coroutines() implementation(libs.kotlinx.coroutines.android)
desugar() implementation(libs.ktor.core)
ktor() implementation(libs.ktor.okhttp)
} }

107
gradle/libs.versions.toml Normal file
View File

@ -0,0 +1,107 @@
# Taken from NIA sample app by Google
[versions]
androidDesugarJdkLibs = "2.0.3"
androidGradlePlugin = "8.1.2"
androidMaterial = "1.10.0"
androidxActivity = "1.8.0"
androidxAppCompat = "1.6.1"
androidxCore = "1.12.0"
androidxDataStore = "1.0.0"
androidxFragment = "1.6.1"
androidxEspresso = "3.5.1"
androidxLifecycle = "2.6.2"
androidxNavigation = "2.7.4"
androidxRecyclerView = "1.3.1"
androidxSqlite = "2.3.1"
androidxTestCore = "1.5.0"
androidxTestExt = "1.1.5"
androidxTestRules = "1.5.0"
androidxTestRunner = "1.5.2"
androidxWork = "2.8.1"
coil = "2.4.0"
fdroid = "0.1.1"
hilt = "2.48.1"
hiltExt = "1.1.0-beta01"
junit4 = "4.13.2"
jackson = "2.15.2"
kotlin = "1.9.10"
kotlinxCoroutines = "1.7.3"
kotlinxDatetime = "0.4.1"
kotlinxSerializationJson = "1.6.0"
ksp = "1.9.10-1.0.13"
ktor = "2.3.5"
libsu = "5.2.1"
room = "2.5.2"
shizuku = "13.0.0"
zoomage = "1.3.1"
[libraries]
android-desugarJdkLibs = { group = "com.android.tools", name = "desugar_jdk_libs", version.ref = "androidDesugarJdkLibs" }
android-material = { group = "com.google.android.material", name = "material", version.ref = "androidMaterial" }
androidx-activity-ktx = { group = "androidx.activity", name = "activity-ktx", version.ref = "androidxActivity" }
androidx-fragment-ktx = { group = "androidx.fragment", name = "fragment-ktx", version.ref = "androidxFragment" }
androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "androidxAppCompat" }
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "androidxCore" }
androidx-dataStore-core = { group = "androidx.datastore", name = "datastore-preferences", version.ref = "androidxDataStore" }
androidx-lifecycle-livedata-ktx = { group = "androidx.lifecycle", name = "lifecycle-livedata-ktx", version.ref = "androidxLifecycle" }
androidx-lifecycle-runtime-ktx = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "androidxLifecycle" }
androidx-lifecycle-viewModel-ktx = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-ktx", version.ref = "androidxLifecycle" }
androidx-navigation-ktx = { group = "androidx.navigation", name = "navigation-ktx", version.ref = "androidxNavigation" }
androidx-navigation-testing = { group = "androidx.navigation", name = "navigation-testing", version.ref = "androidxNavigation" }
androidx-recyclerview = { group = "androidx.recyclerview", name = "recyclerview", version.ref = "androidxRecyclerView" }
androidx-sqlite-ktx = { group = "androidx.sqlite", name = "sqlite-ktx", version.ref = "androidxSqlite" }
androidx-test-core = { group = "androidx.test", name = "core", version.ref = "androidxTestCore" }
androidx-test-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "androidxEspresso" }
androidx-test-ext = { group = "androidx.test.ext", name = "junit-ktx", version.ref = "androidxTestExt" }
androidx-test-rules = { group = "androidx.test", name = "rules", version.ref = "androidxTestRules" }
androidx-test-runner = { group = "androidx.test", name = "runner", version.ref = "androidxTestRunner" }
androidx-work-ktx = { group = "androidx.work", name = "work-runtime-ktx", version.ref = "androidxWork" }
androidx-work-testing = { group = "androidx.work", name = "work-testing", version.ref = "androidxWork" }
coil-kt = { group = "io.coil-kt", name = "coil", version.ref = "coil" }
coil-kt-svg = { group = "io.coil-kt", name = "coil-svg", version.ref = "coil" }
fdroid-index = { group = "org.fdroid", name = "index", version.ref = "fdroid" }
fdroid-download = { group = "org.fdroid", name = "download", version.ref = "fdroid" }
hilt-android = { group = "com.google.dagger", name = "hilt-android", version.ref = "hilt" }
hilt-compiler = { group = "com.google.dagger", name = "hilt-android-compiler", version.ref = "hilt" }
hilt-ext-work = { group = "androidx.hilt", name = "hilt-work", version.ref = "hiltExt" }
hilt-ext-compiler = { group = "androidx.hilt", name = "hilt-compiler", version.ref = "hiltExt" }
hilt-android-testing = { group = "com.google.dagger", name = "hilt-android-testing", version.ref = "hilt" }
junit4 = { group = "junit", name = "junit", version.ref = "junit4" }
jackson-core = { group = "com.fasterxml.jackson.core", name = "jackson-core", version.ref = "jackson" }
kotlin-bom = { group = "org.jetbrains.kotlin", name = "kotlin-bom", version.ref = "kotlin" }
kotlinx-coroutines-android = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-android", version.ref = "kotlinxCoroutines" }
kotlinx-coroutines-guava = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-guava", version.ref = "kotlinxCoroutines" }
kotlinx-coroutines-test = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-test", version.ref = "kotlinxCoroutines" }
kotlinx-datetime = { group = "org.jetbrains.kotlinx", name = "kotlinx-datetime", version.ref = "kotlinxDatetime" }
kotlinx-serialization-json = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json", version.ref = "kotlinxSerializationJson" }
ktor-core = { group = "io.ktor", name = "ktor-client-core", version.ref = "ktor" }
ktor-okhttp = { group = "io.ktor", name = "ktor-client-okhttp", version.ref = "ktor" }
libsu-core = { group = "com.github.topjohnwu.libsu", name = "core", version.ref = "libsu" }
room-compiler = { group = "androidx.room", name = "room-compiler", version.ref = "room" }
room-ktx = { group = "androidx.room", name = "room-ktx", version.ref = "room" }
room-runtime = { group = "androidx.room", name = "room-runtime", version.ref = "room" }
shizuku-api = { group = "dev.rikka.shizuku", name = "api", version.ref = "shizuku" }
shizuku-provider = { group = "dev.rikka.shizuku", name = "provider", version.ref = "shizuku" }
zoomage = { group = "com.jsibbold", name = "zoomage", version.ref = "zoomage" }
# Dependencies of the included build-logic
android-gradlePlugin = { group = "com.android.tools.build", name = "gradle", version.ref = "androidGradlePlugin" }
kotlin-gradlePlugin = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin", version.ref = "kotlin" }
ksp-gradlePlugin = { group = "com.google.devtools.ksp", name = "com.google.devtools.ksp.gradle.plugin", version.ref = "ksp" }
[plugins]
android-application = { id = "com.android.application", version.ref = "androidGradlePlugin" }
android-library = { id = "com.android.library", version.ref = "androidGradlePlugin" }
android-test = { id = "com.android.test", version.ref = "androidGradlePlugin" }
hilt = { id = "com.google.dagger.hilt.android", version.ref = "hilt" }
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
# Plugins defined by this project
looker-android-application = { id = "looker.android.application", version = "unspecified" }
looker-android-library = { id = "looker.android.library", version = "unspecified" }
looker-hilt = { id = "looker.hilt", version = "unspecified" }
looker-hilt-work = { id = "looker.hilt.work", version = "unspecified" }
looker-room = { id = "looker.room", version = "unspecified" }

View File

@ -1,6 +1,6 @@
plugins { plugins {
id("looker.android.library") alias(libs.plugins.looker.android.library)
id("looker.hilt") alias(libs.plugins.looker.hilt)
} }
android { android {
@ -21,10 +21,9 @@ android {
dependencies { dependencies {
modules(Modules.coreCommon, Modules.coreDatastore) modules(Modules.coreCommon, Modules.coreDatastore)
coroutines() implementation(libs.kotlinx.coroutines.android)
implementation(libs.kotlinx.coroutines.guava)
implementation(Others.libsu) implementation(libs.libsu.core)
implementation(libs.shizuku.api)
implementation(Shizuku.api) api(libs.shizuku.provider)
api(Shizuku.provider)
} }