Migrate to VersionCatalog (#504)
This commit is contained in:
parent
41e1b628d1
commit
5516a1c23b
@ -1,6 +1,6 @@
|
||||
plugins {
|
||||
id("looker.android.application")
|
||||
id("looker.hilt.work")
|
||||
alias(libs.plugins.looker.android.application)
|
||||
alias(libs.plugins.looker.hilt.work)
|
||||
}
|
||||
|
||||
android {
|
||||
@ -105,7 +105,15 @@ android {
|
||||
}
|
||||
packaging {
|
||||
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 {
|
||||
@ -124,20 +132,17 @@ dependencies {
|
||||
Modules.installer
|
||||
)
|
||||
|
||||
implementation(Core.core)
|
||||
|
||||
androidX()
|
||||
coroutines()
|
||||
desugar()
|
||||
lifecycle()
|
||||
|
||||
implementation(Coil.coil)
|
||||
|
||||
implementation(Jackson.core)
|
||||
|
||||
implementation(Kotlin.datetime)
|
||||
|
||||
implementation(Others.zoomage)
|
||||
|
||||
implementation(SQLite.ktx)
|
||||
implementation(libs.android.material)
|
||||
implementation(libs.androidx.core.ktx)
|
||||
implementation(libs.androidx.activity.ktx)
|
||||
implementation(libs.androidx.appcompat)
|
||||
implementation(libs.androidx.fragment.ktx)
|
||||
implementation(libs.androidx.lifecycle.viewModel.ktx)
|
||||
implementation(libs.androidx.recyclerview)
|
||||
implementation(libs.androidx.sqlite.ktx)
|
||||
implementation(libs.coil.kt)
|
||||
implementation(libs.kotlinx.datetime)
|
||||
implementation(libs.kotlinx.coroutines.android)
|
||||
implementation(libs.jackson.core)
|
||||
implementation(libs.zoomage)
|
||||
}
|
||||
|
@ -3,6 +3,11 @@ dependencyResolutionManagement {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
versionCatalogs {
|
||||
create("libs") {
|
||||
from(files("../gradle/libs.versions.toml"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.name = "build-logic"
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
plugins {
|
||||
@ -18,9 +17,9 @@ tasks.withType<KotlinCompile>().configureEach {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly("com.android.tools.build:gradle:8.1.2")
|
||||
compileOnly("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.10")
|
||||
compileOnly("com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin:1.9.10-1.0.13")
|
||||
compileOnly(libs.android.gradlePlugin)
|
||||
compileOnly(libs.kotlin.gradlePlugin)
|
||||
compileOnly(libs.ksp.gradlePlugin)
|
||||
}
|
||||
|
||||
gradlePlugin {
|
||||
|
@ -1,5 +1,7 @@
|
||||
import com.android.build.api.dsl.ApplicationExtension
|
||||
import com.looker.droidify.configureKotlinAndroid
|
||||
import com.looker.droidify.getLibrary
|
||||
import com.looker.droidify.libs
|
||||
import org.gradle.api.Plugin
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.kotlin.dsl.configure
|
||||
@ -30,7 +32,7 @@ class AndroidApplicationPlugin : Plugin<Project> {
|
||||
}
|
||||
}
|
||||
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("reflect"))
|
||||
}
|
||||
|
@ -1,3 +1,5 @@
|
||||
import com.looker.droidify.getLibrary
|
||||
import com.looker.droidify.libs
|
||||
import org.gradle.api.Plugin
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.kotlin.dsl.dependencies
|
||||
@ -6,12 +8,13 @@ class AndroidHiltPlugin : Plugin<Project> {
|
||||
override fun apply(target: Project) {
|
||||
with(target) {
|
||||
with(pluginManager) {
|
||||
apply(Hilt.plugin)
|
||||
apply(Ksp.plugin)
|
||||
apply("com.google.dagger.hilt.android")
|
||||
apply("com.google.devtools.ksp")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
hilt(includeWork = false)
|
||||
add("implementation", libs.getLibrary("hilt.android"))
|
||||
add("ksp", libs.getLibrary("hilt.compiler"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,5 @@
|
||||
import com.looker.droidify.getLibrary
|
||||
import com.looker.droidify.libs
|
||||
import org.gradle.api.Plugin
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.kotlin.dsl.dependencies
|
||||
@ -6,13 +8,13 @@ class AndroidHiltWorkerPlugin : Plugin<Project> {
|
||||
override fun apply(target: Project) {
|
||||
with(target) {
|
||||
with(pluginManager) {
|
||||
apply(Hilt.plugin)
|
||||
apply(Ksp.plugin)
|
||||
apply("looker.hilt")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
hilt(includeWork = true)
|
||||
add("implementation", Work.manager)
|
||||
add("implementation", libs.getLibrary("androidx.work.ktx"))
|
||||
add("implementation", libs.getLibrary("hilt.ext.work"))
|
||||
add("ksp", libs.getLibrary("hilt.ext.compiler"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,8 @@
|
||||
import com.android.build.api.variant.LibraryAndroidComponentsExtension
|
||||
import com.android.build.gradle.LibraryExtension
|
||||
import com.looker.droidify.configureKotlinAndroid
|
||||
import com.looker.droidify.getLibrary
|
||||
import com.looker.droidify.libs
|
||||
import org.gradle.api.Plugin
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.kotlin.dsl.configure
|
||||
@ -32,7 +34,7 @@ class AndroidLibraryPlugin : Plugin<Project> {
|
||||
}
|
||||
}
|
||||
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("reflect"))
|
||||
add("testImplementation", kotlin("test"))
|
||||
|
@ -1,4 +1,6 @@
|
||||
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.Project
|
||||
import org.gradle.api.tasks.InputDirectory
|
||||
@ -13,7 +15,7 @@ class AndroidRoomPlugin : Plugin<Project> {
|
||||
|
||||
override fun apply(target: Project) {
|
||||
with(target) {
|
||||
pluginManager.apply(Ksp.plugin)
|
||||
pluginManager.apply("com.google.devtools.ksp")
|
||||
|
||||
extensions.configure<KspExtension> {
|
||||
// The schemas directory contains a schema file for each version of the Room database.
|
||||
@ -23,7 +25,9 @@ class AndroidRoomPlugin : Plugin<Project> {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
room()
|
||||
add("implementation", libs.getLibrary("room.ktx"))
|
||||
add("implementation", libs.getLibrary("room.runtime"))
|
||||
add("ksp", libs.getLibrary("room.compiler"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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)
|
||||
}
|
@ -1,9 +1,7 @@
|
||||
package com.looker.droidify
|
||||
|
||||
import DefaultConfig
|
||||
import Test
|
||||
import com.android.build.api.dsl.CommonExtension
|
||||
import desugar
|
||||
import org.gradle.api.JavaVersion
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.kotlin.dsl.dependencies
|
||||
@ -24,7 +22,7 @@ internal fun Project.configureKotlinAndroid(
|
||||
|
||||
defaultConfig {
|
||||
minSdk = DefaultConfig.minSdk
|
||||
testInstrumentationRunner = Test.jUnitRunner
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
@ -39,7 +37,7 @@ internal fun Project.configureKotlinAndroid(
|
||||
configureKotlin()
|
||||
|
||||
dependencies {
|
||||
desugar()
|
||||
add("coreLibraryDesugaring", libs.getLibrary("android.desugarJdkLibs"))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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()
|
@ -1,8 +1,7 @@
|
||||
plugins {
|
||||
id("com.android.application") version "8.1.2" apply false
|
||||
id("com.android.library") version "8.1.2" apply false
|
||||
id("org.jetbrains.kotlin.android") version "1.9.10" apply false
|
||||
kotlin("plugin.serialization") version "1.9.10" apply false
|
||||
id("com.google.devtools.ksp") version "1.9.10-1.0.13" apply false
|
||||
id("com.google.dagger.hilt.android") version "2.48.1" apply false
|
||||
alias(libs.plugins.android.application) apply false
|
||||
alias(libs.plugins.android.library) apply false
|
||||
alias(libs.plugins.kotlin.jvm) apply false
|
||||
alias(libs.plugins.ksp) apply false
|
||||
alias(libs.plugins.hilt) apply false
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
import com.android.build.gradle.internal.tasks.factory.dependsOn
|
||||
|
||||
plugins {
|
||||
id("looker.android.library")
|
||||
alias(libs.plugins.looker.android.library)
|
||||
}
|
||||
|
||||
android {
|
||||
@ -26,17 +26,15 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
recyclerView()
|
||||
coroutines()
|
||||
lifecycle()
|
||||
|
||||
implementation(AndroidX.material)
|
||||
|
||||
implementation(Core.core)
|
||||
|
||||
implementation(Coil.coil)
|
||||
|
||||
implementation(Jackson.core)
|
||||
implementation(libs.kotlinx.coroutines.android)
|
||||
implementation(libs.android.material)
|
||||
implementation(libs.androidx.activity.ktx)
|
||||
implementation(libs.androidx.fragment.ktx)
|
||||
implementation(libs.androidx.core.ktx)
|
||||
implementation(libs.androidx.lifecycle.viewModel.ktx)
|
||||
implementation(libs.androidx.recyclerview)
|
||||
implementation(libs.coil.kt)
|
||||
implementation(libs.jackson.core)
|
||||
}
|
||||
|
||||
// using a task as a preBuild dependency instead of a function that takes some time insures that it runs
|
||||
|
@ -1,6 +1,6 @@
|
||||
plugins {
|
||||
id("looker.android.library")
|
||||
id("looker.hilt.work")
|
||||
alias(libs.plugins.looker.android.library)
|
||||
alias(libs.plugins.looker.hilt.work)
|
||||
}
|
||||
|
||||
android {
|
||||
@ -28,6 +28,7 @@ dependencies {
|
||||
Modules.coreNetwork
|
||||
)
|
||||
|
||||
coroutines()
|
||||
fdroid()
|
||||
implementation(libs.kotlinx.coroutines.android)
|
||||
implementation(libs.fdroid.index)
|
||||
implementation(libs.fdroid.download)
|
||||
}
|
@ -1,8 +1,8 @@
|
||||
plugins {
|
||||
id("looker.android.library")
|
||||
kotlin("plugin.serialization")
|
||||
id("looker.room")
|
||||
id("looker.hilt")
|
||||
alias(libs.plugins.looker.android.library)
|
||||
alias(libs.plugins.looker.room)
|
||||
alias(libs.plugins.looker.hilt)
|
||||
alias(libs.plugins.kotlin.serialization)
|
||||
}
|
||||
|
||||
android {
|
||||
@ -23,8 +23,7 @@ android {
|
||||
dependencies {
|
||||
modules(Modules.coreCommon, Modules.coreModel)
|
||||
|
||||
coroutines()
|
||||
|
||||
implementation(Core.core)
|
||||
implementation(Kotlin.serialization)
|
||||
implementation(libs.kotlinx.coroutines.android)
|
||||
implementation(libs.androidx.core.ktx)
|
||||
implementation(libs.kotlinx.serialization.json)
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
plugins {
|
||||
id("looker.android.library")
|
||||
id("looker.hilt")
|
||||
alias(libs.plugins.looker.android.library)
|
||||
alias(libs.plugins.looker.hilt)
|
||||
}
|
||||
|
||||
android {
|
||||
@ -20,7 +20,7 @@ android {
|
||||
|
||||
dependencies {
|
||||
modules(Modules.coreCommon)
|
||||
coroutines()
|
||||
implementation(Datastore.datastore)
|
||||
implementation(Kotlin.datetime)
|
||||
implementation(libs.kotlinx.coroutines.android)
|
||||
implementation(libs.androidx.dataStore.core)
|
||||
implementation(libs.kotlinx.datetime)
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id("looker.android.library")
|
||||
alias(libs.plugins.looker.android.library)
|
||||
}
|
||||
|
||||
android {
|
||||
|
@ -1,6 +1,6 @@
|
||||
plugins {
|
||||
id("looker.android.library")
|
||||
id("looker.hilt")
|
||||
alias(libs.plugins.looker.android.library)
|
||||
alias(libs.plugins.looker.hilt)
|
||||
}
|
||||
|
||||
android {
|
||||
@ -21,7 +21,7 @@ android {
|
||||
dependencies {
|
||||
modules(Modules.coreCommon)
|
||||
|
||||
coroutines()
|
||||
desugar()
|
||||
ktor()
|
||||
implementation(libs.kotlinx.coroutines.android)
|
||||
implementation(libs.ktor.core)
|
||||
implementation(libs.ktor.okhttp)
|
||||
}
|
107
gradle/libs.versions.toml
Normal file
107
gradle/libs.versions.toml
Normal 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" }
|
||||
|
@ -1,6 +1,6 @@
|
||||
plugins {
|
||||
id("looker.android.library")
|
||||
id("looker.hilt")
|
||||
alias(libs.plugins.looker.android.library)
|
||||
alias(libs.plugins.looker.hilt)
|
||||
}
|
||||
|
||||
android {
|
||||
@ -21,10 +21,9 @@ android {
|
||||
dependencies {
|
||||
modules(Modules.coreCommon, Modules.coreDatastore)
|
||||
|
||||
coroutines()
|
||||
|
||||
implementation(Others.libsu)
|
||||
|
||||
implementation(Shizuku.api)
|
||||
api(Shizuku.provider)
|
||||
implementation(libs.kotlinx.coroutines.android)
|
||||
implementation(libs.kotlinx.coroutines.guava)
|
||||
implementation(libs.libsu.core)
|
||||
implementation(libs.shizuku.api)
|
||||
api(libs.shizuku.provider)
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user