refactor: Migrate to gradle version catalog

This commit is contained in:
ziro 2024-01-10 12:10:43 +07:00
parent 71898809ba
commit 9a2815d277
Signed by: null2264
GPG key ID: BA64F8B60AF3EFB6
11 changed files with 297 additions and 209 deletions

View file

@ -12,7 +12,6 @@
<a href="/LICENSE"><img alt="License: Apache-2.0" src="https://img.shields.io/badge/license-Apache--2.0-blue.svg"></a> <a href="/LICENSE"><img alt="License: Apache-2.0" src="https://img.shields.io/badge/license-Apache--2.0-blue.svg"></a>
</p> </p>
## About ## About
Yōkai is a free and open source manga reader for Android 6.0 and above. Based on the original [Tachiyomi](https://github.com/tachiyomiorg/tachiyomi) and [TachiJ2K](https://github.com/jays2kings/tachiyomiJ2K) Yōkai is a free and open source manga reader for Android 6.0 and above. Based on the original [Tachiyomi](https://github.com/tachiyomiorg/tachiyomi) and [TachiJ2K](https://github.com/jays2kings/tachiyomiJ2K)

View file

@ -1,18 +1,20 @@
import com.android.build.gradle.internal.scope.ProjectInfo.Companion.getBaseName
import java.io.ByteArrayOutputStream import java.io.ByteArrayOutputStream
plugins { plugins {
id(Plugins.androidApplication) id("com.android.application")
kotlin(Plugins.kotlinAndroid) kotlin("android")
kotlin(Plugins.kapt) kotlin("kapt")
id(Plugins.kotlinParcelize) kotlin("plugin.serialization")
id(Plugins.kotlinSerialization) id("kotlin-parcelize")
id("com.google.android.gms.oss-licenses-plugin") id("com.google.android.gms.oss-licenses-plugin")
id(Plugins.googleServices) apply false id("com.google.gms.google-services") apply false
id("com.google.firebase.crashlytics") id("com.google.firebase.crashlytics") apply false
} }
if (gradle.startParameter.taskRequests.toString().contains("Standard")) { if (gradle.startParameter.taskRequests.toString().contains("Standard")) {
apply<com.google.gms.googleservices.GoogleServicesPlugin>() apply(mapOf("plugin" to "com.google.gms.google-services"))
apply(mapOf("plugin" to "com.google.firebase.crashlytics"))
} }
fun runCommand(command: String): String { fun runCommand(command: String): String {
@ -27,24 +29,23 @@ fun runCommand(command: String): String {
val supportedAbis = setOf("armeabi-v7a", "arm64-v8a", "x86", "x86_64") val supportedAbis = setOf("armeabi-v7a", "arm64-v8a", "x86", "x86_64")
android { android {
compileSdk = AndroidVersions.compileSdk compileSdk = AndroidConfig.compileSdk
ndkVersion = AndroidVersions.ndk ndkVersion = AndroidConfig.ndk
defaultConfig { defaultConfig {
minSdk = AndroidVersions.minSdk minSdk = AndroidConfig.minSdk
targetSdk = AndroidVersions.targetSdk targetSdk = AndroidConfig.targetSdk
applicationId = "eu.kanade.tachiyomi" applicationId = "eu.kanade.tachiyomi"
versionCode = AndroidVersions.versionCode versionCode = 111
versionName = AndroidVersions.versionName versionName = "1.7.4"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled = true multiDexEnabled = true
buildConfigField("String", "COMMIT_COUNT", "\"${getCommitCount()}\"") buildConfigField("String", "COMMIT_COUNT", "\"${getCommitCount()}\"")
buildConfigField("String", "BETA_COUNT", "\"${getBetaCount()}\"")
buildConfigField("String", "COMMIT_SHA", "\"${getGitSha()}\"") buildConfigField("String", "COMMIT_SHA", "\"${getGitSha()}\"")
buildConfigField("String", "BUILD_TIME", "\"${getBuildTime()}\"") buildConfigField("String", "BUILD_TIME", "\"${getBuildTime()}\"")
buildConfigField("Boolean", "INCLUDE_UPDATER", "false") buildConfigField("Boolean", "INCLUDE_UPDATER", "false")
buildConfigField("boolean", "BETA", "false") buildConfigField("Boolean", "BETA", "false")
ndk { ndk {
abiFilters += supportedAbis abiFilters += supportedAbis
@ -76,11 +77,6 @@ android {
isMinifyEnabled = true isMinifyEnabled = true
proguardFiles("proguard-android-optimize.txt", "proguard-rules.pro") proguardFiles("proguard-android-optimize.txt", "proguard-rules.pro")
} }
create("beta") {
initWith(getByName("release"))
buildConfigField("boolean", "BETA", "true")
versionNameSuffix = "-b${getBetaCount()}"
}
} }
buildFeatures { buildFeatures {
@ -127,174 +123,165 @@ android {
dependencies { dependencies {
// Compose // Compose
implementation("androidx.activity:activity-compose:1.7.2") implementation(androidx.activity.compose)
implementation("androidx.compose.foundation:foundation:1.5.1") implementation(compose.foundation)
implementation("androidx.compose.animation:animation:1.5.1") implementation(compose.animation)
implementation("androidx.compose.ui:ui:1.5.1") implementation(compose.ui)
implementation("androidx.compose.material:material:1.5.1") debugImplementation(compose.ui.tooling)
implementation("androidx.compose.material3:material3:1.1.2") implementation(compose.ui.tooling.preview)
implementation("com.google.android.material:compose-theme-adapter-3:1.1.1") implementation(compose.material)
implementation("androidx.compose.material:material-icons-extended:1.5.1") implementation(compose.material3)
implementation("androidx.compose.ui:ui-tooling-preview:1.5.1") implementation(libs.compose.theme.adapter3)
debugImplementation("androidx.compose.ui:ui-tooling:1.5.1") implementation(compose.icons)
implementation("com.google.accompanist:accompanist-webview:0.30.1") implementation(libs.accompanist.webview)
implementation("androidx.glance:glance-appwidget:1.0.0") implementation(androidx.glance.appwidget)
// Modified dependencies // Modified dependencies
implementation("com.github.jays2kings:subsampling-scale-image-view:756849e") { implementation(libs.subsampling.scale.image.view) {
exclude(module = "image-decoder") exclude(module = "image-decoder")
} }
implementation("com.github.tachiyomiorg:image-decoder:7879b45") implementation(libs.image.decoder)
// Android X libraries // Android X libraries
implementation("androidx.appcompat:appcompat:1.6.1") implementation(androidx.appcompat)
implementation("androidx.cardview:cardview:1.0.0") implementation(androidx.cardview)
implementation("com.google.android.material:material:1.10.0") implementation(libs.material)
implementation("androidx.webkit:webkit:1.8.0") implementation(androidx.webkit)
implementation("androidx.recyclerview:recyclerview:1.3.1") implementation(androidx.recyclerview)
implementation("androidx.preference:preference:1.2.1") implementation(androidx.preference)
implementation("androidx.annotation:annotation:1.7.0") implementation(androidx.annotation)
implementation("androidx.browser:browser:1.6.0") implementation(androidx.browser)
implementation("androidx.biometric:biometric:1.1.0") implementation(androidx.biometric)
implementation("androidx.palette:palette:1.0.0") implementation(androidx.palette)
implementation("androidx.activity:activity-ktx:1.8.0") implementation(androidx.activity)
implementation("androidx.core:core-ktx:1.12.0") implementation(androidx.core)
implementation("com.google.android.flexbox:flexbox:3.0.0") implementation(libs.flexbox)
implementation("androidx.window:window:1.1.0") implementation(androidx.window)
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.1.0") implementation(androidx.swiperefreshlayout)
implementation("androidx.constraintlayout:constraintlayout:2.1.4") implementation(androidx.constraintlayout)
implementation("androidx.multidex:multidex:2.0.1") implementation(androidx.multidex)
implementation(platform("com.google.firebase:firebase-bom:31.2.3")) implementation(platform(libs.firebase))
implementation("com.google.firebase:firebase-analytics-ktx") implementation(libs.firebase.analytics)
implementation("com.google.firebase:firebase-crashlytics-ktx") implementation(libs.firebase.crashlytics)
val lifecycleVersion = "2.6.2" implementation(androidx.lifecycle.viewmodel)
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycleVersion") implementation(androidx.lifecycle.livedata)
implementation("androidx.lifecycle:lifecycle-livedata-ktx:$lifecycleVersion") implementation(androidx.lifecycle.common)
implementation("androidx.lifecycle:lifecycle-common:$lifecycleVersion") implementation(androidx.lifecycle.process)
implementation("androidx.lifecycle:lifecycle-process:$lifecycleVersion") implementation(androidx.lifecycle.runtime)
implementation("androidx.lifecycle:lifecycle-runtime-ktx:$lifecycleVersion")
// ReactiveX // ReactiveX
implementation("io.reactivex:rxandroid:1.2.1") implementation(libs.rxandroid)
implementation("io.reactivex:rxjava:1.3.8") implementation(libs.rxjava)
implementation("com.jakewharton.rxrelay:rxrelay:1.2.0") implementation(libs.rxrelay)
// Coroutines // Coroutines
implementation("com.fredporciuncula:flow-preferences:1.6.0") implementation(libs.flow.preferences)
// Network client // Network client
val okhttpVersion = "5.0.0-alpha.11" implementation(libs.okhttp)
implementation("com.squareup.okhttp3:okhttp:$okhttpVersion") implementation(libs.okhttp.logging.interceptor)
implementation("com.squareup.okhttp3:logging-interceptor:$okhttpVersion") implementation(libs.okhttp.dnsoverhttps)
implementation("com.squareup.okhttp3:okhttp-dnsoverhttps:$okhttpVersion") implementation(libs.okhttp.brotli)
implementation("com.squareup.okhttp3:okhttp-brotli:$okhttpVersion") implementation(libs.okio)
implementation("com.squareup.okio:okio:3.4.0")
// Chucker // Chucker
val chuckerVersion = "3.5.2" debugImplementation(libs.chucker.library)
debugImplementation("com.github.ChuckerTeam.Chucker:library:$chuckerVersion") releaseImplementation(libs.chucker.library.no.op)
releaseImplementation("com.github.ChuckerTeam.Chucker:library-no-op:$chuckerVersion")
add("betaImplementation", "com.github.ChuckerTeam.Chucker:library-no-op:$chuckerVersion")
implementation(kotlin("reflect", version = AndroidVersions.kotlin)) implementation(kotlin("reflect", version = kotlinx.versions.kotlin.get()))
// JSON // JSON
val kotlinSerialization = "1.6.0" implementation(kotlinx.serialization.json)
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:${kotlinSerialization}") implementation(kotlinx.serialization.protobuf)
implementation("org.jetbrains.kotlinx:kotlinx-serialization-protobuf:${kotlinSerialization}") implementation(kotlinx.serialization.json.okio)
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json-okio:${kotlinSerialization}")
// JavaScript engine // JavaScript engine
implementation("app.cash.quickjs:quickjs-android:0.9.2") implementation(libs.quickjs.android)
// Disk // Disk
implementation("com.jakewharton:disklrucache:2.0.2") implementation(libs.disklrucache)
implementation("com.github.tachiyomiorg:unifile:17bec43") implementation(libs.unifile)
implementation("com.github.junrar:junrar:7.5.5") implementation(libs.junrar)
// HTML parser // HTML parser
implementation("org.jsoup:jsoup:1.16.1") implementation(libs.jsoup)
// Job scheduling // Job scheduling
implementation("androidx.work:work-runtime-ktx:2.8.1") implementation(androidx.work)
implementation("com.google.guava:guava:31.1-android") implementation(libs.guava)
implementation("com.google.android.gms:play-services-gcm:17.0.0") implementation(libs.play.services.gcm)
// Database // Database
implementation("androidx.sqlite:sqlite-ktx:2.3.1") implementation(androidx.sqlite)
implementation("com.github.requery:sqlite-android:3.39.2") implementation(libs.sqlite.android)
//noinspection UseTomlInstead
implementation("com.github.inorichi.storio:storio-common:8be19de@aar") implementation("com.github.inorichi.storio:storio-common:8be19de@aar")
//noinspection UseTomlInstead
implementation("com.github.inorichi.storio:storio-sqlite:8be19de@aar") implementation("com.github.inorichi.storio:storio-sqlite:8be19de@aar")
// Model View Presenter // Model View Presenter
val nucleusVersion = "3.0.0" implementation(libs.nucleus)
implementation("info.android15.nucleus:nucleus:$nucleusVersion") implementation(libs.nucleus.support.v7)
implementation("info.android15.nucleus:nucleus-support-v7:$nucleusVersion")
// Dependency injection // Dependency injection
implementation("com.github.inorichi.injekt:injekt-core:65b0440") implementation(libs.injekt.core)
// Image library // Image library
val coilVersion = "2.4.0" implementation(libs.coil)
implementation("io.coil-kt:coil:$coilVersion") implementation(libs.coil.gif)
implementation("io.coil-kt:coil-gif:$coilVersion") implementation(libs.coil.svg)
implementation("io.coil-kt:coil-svg:$coilVersion")
// Logging // Logging
implementation("com.jakewharton.timber:timber:4.7.1") implementation(libs.timber)
// Sort // Sort
implementation("com.github.gpanther:java-nat-sort:natural-comparator-1.1") implementation(libs.java.nat.sort)
// UI // UI
implementation("com.dmitrymalkovich.android:material-design-dimens:1.4") implementation(libs.material.design.dimens)
implementation("br.com.simplepass:loading-button-android:2.2.0") implementation(libs.loading.button)
val fastAdapterVersion = "5.6.0" implementation(libs.fastadapter)
implementation("com.mikepenz:fastadapter:$fastAdapterVersion") implementation(libs.fastadapter.extensions.binding)
implementation("com.mikepenz:fastadapter-extensions-binding:$fastAdapterVersion") implementation(libs.flexible.adapter)
implementation("com.github.arkon.FlexibleAdapter:flexible-adapter:c8013533") implementation(libs.flexible.adapter.ui)
implementation("com.github.arkon.FlexibleAdapter:flexible-adapter-ui:c8013533") implementation(libs.viewstatepageradapter)
implementation("com.nightlynexus.viewstatepageradapter:viewstatepageradapter:1.1.0") implementation(libs.slice)
implementation("com.github.mthli:Slice:v1.2") implementation(libs.markwon)
implementation("io.noties.markwon:core:4.6.2")
implementation("com.github.chrisbanes:PhotoView:2.3.0") implementation(libs.photoview)
implementation("com.github.tachiyomiorg:DirectionalViewPager:1.0.0") implementation(libs.directionalviewpager)
implementation("com.github.florent37:viewtooltip:1.2.2") implementation(libs.viewtooltip)
implementation("com.getkeepsafe.taptargetview:taptargetview:1.13.3") implementation(libs.taptargetview)
// Conductor // Conductor
val conductorVersion = "4.0.0-preview-3" implementation(libs.conductor)
implementation("com.bluelinelabs:conductor:$conductorVersion") implementation(libs.conductor.support.preference)
implementation("com.github.tachiyomiorg:conductor-support-preference:3.0.0")
// Shizuku // Shizuku
val shizukuVersion = "12.1.0" implementation(libs.shizuku.api)
implementation("dev.rikka.shizuku:api:$shizukuVersion") implementation(libs.shizuku.provider)
implementation("dev.rikka.shizuku:provider:$shizukuVersion")
implementation(kotlin("stdlib", org.jetbrains.kotlin.config.KotlinCompilerVersion.VERSION)) implementation(kotlin("stdlib", org.jetbrains.kotlin.config.KotlinCompilerVersion.VERSION))
val coroutines = "1.7.3" implementation(kotlinx.coroutines.core)
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines") implementation(kotlinx.coroutines.android)
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines")
// Text distance // Text distance
implementation("info.debatty:java-string-similarity:2.0.0") implementation(libs.java.string.similarity)
implementation("com.google.android.gms:play-services-oss-licenses:17.0.1") implementation(libs.play.services.oss.licenses)
// TLS 1.3 support for Android < 10 // TLS 1.3 support for Android < 10
implementation("org.conscrypt:conscrypt-android:2.5.2") implementation(libs.conscrypt)
// Android Chart // Android Chart
implementation("com.github.PhilJay:MPAndroidChart:v3.1.0") implementation(libs.mpandroidchart)
} }
tasks { tasks {
@ -326,12 +313,12 @@ tasks {
kotlinOptions.freeCompilerArgs += listOf( kotlinOptions.freeCompilerArgs += listOf(
"-P", "-P",
"plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=" + "plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=" +
project.buildDir.absolutePath + "/compose_metrics", (project.layout.buildDirectory.asFile.orNull?.absolutePath ?: "/tmp/yokai") + "/compose_metrics",
) )
kotlinOptions.freeCompilerArgs += listOf( kotlinOptions.freeCompilerArgs += listOf(
"-P", "-P",
"plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=" + "plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=" +
project.buildDir.absolutePath + "/compose_metrics", (project.layout.buildDirectory.asFile.orNull?.absolutePath ?: "/tmp/yokai") + "/compose_metrics",
) )
} }
} }
@ -344,6 +331,9 @@ tasks {
} }
preBuild { preBuild {
dependsOn(formatKotlin, copyHebrewStrings) dependsOn(
// formatKotlin,
copyHebrewStrings
)
} }
} }

View file

@ -1,36 +1,19 @@
import java.util.*
plugins { plugins {
id(Plugins.kotlinter.name) version Plugins.kotlinter.version alias(libs.plugins.kotlinter)
id(Plugins.gradleVersions.name) version Plugins.gradleVersions.version alias(libs.plugins.gradle.versions)
id(Plugins.jetbrainsKotlin) version AndroidVersions.kotlin apply false alias(kotlinx.plugins.android) apply false
}
allprojects {
repositories {
google()
mavenCentral()
maven { setUrl("https://jitpack.io") }
maven { setUrl("https://plugins.gradle.org/m2/") }
}
}
subprojects {
apply(plugin = Plugins.kotlinter.name)
kotlinter {
experimentalRules = true
// Doesn't play well with Android Studio
disabledRules = arrayOf("experimental:argument-list-wrapping")
}
} }
buildscript { buildscript {
dependencies { dependencies {
classpath("com.android.tools.build:gradle:8.1.2") classpath(libs.gradle)
classpath("com.google.gms:google-services:4.3.15") classpath(libs.google.services)
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${AndroidVersions.kotlin}") classpath(kotlinx.gradle)
classpath("com.google.android.gms:oss-licenses-plugin:0.10.6") classpath(libs.oss.licenses.plugin)
classpath("org.jetbrains.kotlin:kotlin-serialization:${AndroidVersions.kotlin}") classpath(kotlinx.serialization.gradle)
classpath("com.google.firebase:firebase-crashlytics-gradle:2.9.4") classpath(libs.firebase.crashlytics.gradle)
} }
repositories { repositories {
gradlePluginPortal() gradlePluginPortal()
@ -41,7 +24,10 @@ buildscript {
tasks.named("dependencyUpdates", com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask::class.java).configure { tasks.named("dependencyUpdates", com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask::class.java).configure {
rejectVersionIf { rejectVersionIf {
isNonStable(candidate.version) val stableKeyword = listOf("RELEASE", "FINAL", "GA").any { candidate.version.uppercase(Locale.ROOT).contains(it) }
val regex = "^[0-9,.v-]+(-r)?$".toRegex()
val isStable = stableKeyword || regex.matches(candidate.version)
isStable.not()
} }
// optional parameters // optional parameters
checkForGradleUpdate = true checkForGradleUpdate = true
@ -51,5 +37,5 @@ tasks.named("dependencyUpdates", com.github.benmanes.gradle.versions.updates.Dep
} }
tasks.register("clean", Delete::class) { tasks.register("clean", Delete::class) {
delete(rootProject.buildDir) delete(rootProject.layout.buildDirectory)
} }

View file

@ -0,0 +1,6 @@
object AndroidConfig {
const val compileSdk = 34
const val minSdk = 23
const val targetSdk = 34
const val ndk = "23.1.7779620"
}

View file

@ -11,18 +11,6 @@ fun Project.getCommitCount(): String {
// return "1" // return "1"
} }
fun Project.getBetaCount(): String {
val betaTags = runCommand("git tag -l --sort=refname v${AndroidVersions.versionName}-b*")
return String.format("%02d", if (betaTags.isNotEmpty()) {
val betaTag = betaTags.split("\n").last().substringAfter("-b").toIntOrNull()
((betaTag ?: 0) + 1)
} else {
1
})
// return "1"
}
fun Project.getGitSha(): String { fun Project.getGitSha(): String {
return runCommand("git rev-parse --short HEAD") return runCommand("git rev-parse --short HEAD")
// return "1" // return "1"

View file

@ -1,34 +0,0 @@
import java.util.Locale
object AndroidVersions {
const val compileSdk = 34
const val minSdk = 23
const val targetSdk = 34
const val versionCode = 111
const val versionName = "1.7.4"
const val ndk = "23.1.7779620"
const val kotlin = "1.9.10"
}
object Plugins {
const val androidApplication = "com.android.application"
const val googleServices = "com.google.gms.google-services"
const val kapt = "kapt"
const val kotlinParcelize = "kotlin-parcelize"
const val kotlinAndroid = "android"
const val jetbrainsKotlin = "org.jetbrains.kotlin.android"
const val kotlinSerialization = "org.jetbrains.kotlin.plugin.serialization"
val gradleVersions = PluginClass("com.github.ben-manes.versions", "0.42.0")
val kotlinter = PluginClass("org.jmailen.kotlinter", "3.12.0")
}
data class PluginClass(val name: String, val version: String) {
override fun toString() = "$name:$version"
}
fun isNonStable(version: String): Boolean {
val stableKeyword = listOf("RELEASE", "FINAL", "GA").any { version.toUpperCase(Locale.ROOT).contains(it) }
val regex = "^[0-9,.v-]+(-r)?$".toRegex()
val isStable = stableKeyword || regex.matches(version)
return isStable.not()
}

View file

@ -0,0 +1,29 @@
[versions]
activity = "1.8.0"
lifecycle = "2.6.2"
[libraries]
activity = { module = "androidx.activity:activity-ktx", version.ref = "activity" }
activity-compose = { module = "androidx.activity:activity-compose", version.ref = "activity" }
annotation = { module = "androidx.annotation:annotation", version = "1.7.0" }
appcompat = { module = "androidx.appcompat:appcompat", version = "1.6.1" }
browser = { module = "androidx.browser:browser", version = "1.6.0" }
biometric = { module = "androidx.biometric:biometric", version = "1.1.0" }
cardview = { module = "androidx.cardview:cardview", version = "1.0.0" }
core = { module = "androidx.core:core-ktx", version = "1.12.0" }
constraintlayout = { module = "androidx.constraintlayout:constraintlayout", version = "2.1.4" }
glance-appwidget = { module = "androidx.glance:glance-appwidget", version = "1.0.0" }
lifecycle-viewmodel = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "lifecycle" }
lifecycle-livedata = { module = "androidx.lifecycle:lifecycle-livedata-ktx", version.ref = "lifecycle" }
lifecycle-common = { module = "androidx.lifecycle:lifecycle-common", version.ref = "lifecycle" }
lifecycle-process = { module = "androidx.lifecycle:lifecycle-process", version.ref = "lifecycle" }
lifecycle-runtime = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "lifecycle" }
multidex = { module = "androidx.multidex:multidex", version = "2.0.1" }
palette = { module = "androidx.palette:palette", version = "1.0.0" }
preference = { module = "androidx.preference:preference", version = "1.2.1" }
recyclerview = { module = "androidx.recyclerview:recyclerview", version = "1.3.1" }
sqlite = { module = "androidx.sqlite:sqlite", version = "2.3.1" }
swiperefreshlayout = { module = "androidx.swiperefreshlayout:swiperefreshlayout", version = "1.1.0" }
webkit = { module = "androidx.webkit:webkit", version = "1.9.0" }
work = { module = "androidx.work:work-runtime-ktx", version = "2.8.1" }
window = { module = "androidx.window:window", version = "1.1.0" }

View file

@ -0,0 +1,12 @@
[versions]
compose = "1.5.1"
[libraries]
animation = { module = "androidx.compose.animation:animation", version.ref = "compose" }
foundation = { module = "androidx.compose.foundation:foundation", version.ref = "compose" }
material = { module = "androidx.compose.material:material", version.ref = "compose" }
material3 = { module = "androidx.compose.material3:material3", version = "1.1.2" }
ui = { module = "androidx.compose.ui:ui", version.ref = "compose" }
ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "compose" }
ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview", version.ref = "compose" }
icons = { module = "androidx.compose.material:material-icons-extended", version.ref = "compose" }

View file

@ -0,0 +1,16 @@
[versions]
kotlin = "1.9.20"
coroutines = "1.7.3"
serialization = "1.6.0"
[libraries]
gradle = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
serialization-gradle = { module = "org.jetbrains.kotlin:kotlin-serialization", version.ref = "kotlin" }
serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "serialization" }
serialization-json-okio = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json-okio", version.ref = "serialization" }
serialization-protobuf = { module = "org.jetbrains.kotlinx:kotlinx-serialization-protobuf", version.ref = "serialization" }
coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "coroutines" }
coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines" }
[plugins]
android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }

75
gradle/libs.versions.toml Normal file
View file

@ -0,0 +1,75 @@
[versions]
chucker = "3.5.2"
coil = "2.4.0"
flexible-adapter = "c8013533"
fast_adapter = "5.6.0"
nucleus = "3.0.0"
okhttp = "5.0.0-alpha.11"
shizuku = "12.1.0"
[libraries]
accompanist-webview = { module = "com.google.accompanist:accompanist-webview", version = "0.30.1" }
chucker-library-no-op = { module = "com.github.ChuckerTeam.Chucker:library-no-op", version.ref = "chucker" }
chucker-library = { module = "com.github.ChuckerTeam.Chucker:library", version.ref = "chucker" }
coil-svg = { module = "io.coil-kt:coil-svg", version.ref = "coil" }
coil-gif = { module = "io.coil-kt:coil-gif", version.ref = "coil" }
coil = { module = "io.coil-kt:coil", version.ref = "coil" }
compose-theme-adapter3 = { module = "com.google.android.material:compose-theme-adapter-3", version = "1.1.1" }
conductor = { module = "com.bluelinelabs:conductor", version = "4.0.0-preview-3" }
conductor-support-preference = { module = "com.github.tachiyomiorg:conductor-support-preference", version = "3.0.0" }
conscrypt = { module = "org.conscrypt:conscrypt-android", version = "2.5.2" }
directionalviewpager = { module = "com.github.tachiyomiorg:DirectionalViewPager", version = "1.0.0" }
disklrucache = { module = "com.jakewharton:disklrucache", version = "2.0.2" }
fastadapter-extensions-binding = { module = "com.mikepenz:fastadapter-extensions-binding", version.ref = "fast_adapter" }
fastadapter = { module = "com.mikepenz:fastadapter", version.ref = "fast_adapter" }
firebase-crashlytics-gradle = { module = "com.google.firebase:firebase-crashlytics-gradle", version = "2.9.4" }
flexbox = { module = "com.google.android.flexbox:flexbox", version = "3.0.0" }
flexible-adapter-ui = { module = "com.github.arkon.FlexibleAdapter:flexible-adapter-ui", version.ref = "flexible-adapter" }
flexible-adapter = { module = "com.github.arkon.FlexibleAdapter:flexible-adapter", version.ref = "flexible-adapter" }
flow-preferences = { module = "com.fredporciuncula:flow-preferences", version = "1.6.0" }
google-services = { module = "com.google.gms:google-services", version = "4.3.15" }
gradle = { module = "com.android.tools.build:gradle", version = "8.1.4" }
guava = { module = "com.google.guava:guava", version = "31.1-android" }
image-decoder = { module = "com.github.tachiyomiorg:image-decoder", version = "7879b45" }
injekt-core = { module = "com.github.inorichi.injekt:injekt-core", version = "65b0440" }
material = { module = "com.google.android.material:material", version = "1.11.0" }
material-design-dimens = { module = "com.dmitrymalkovich.android:material-design-dimens", version = "1.4" }
markwon = { module = "io.noties.markwon:core", version = "4.6.2" }
mpandroidchart = { module = "com.github.PhilJay:MPAndroidChart", version = "v3.1.0" }
nucleus-support-v7 = { module = "info.android15.nucleus:nucleus-support-v7", version.ref = "nucleus" }
nucleus = { module = "info.android15.nucleus:nucleus", version.ref = "nucleus" }
java-nat-sort = { module = "com.github.gpanther:java-nat-sort", version = "natural-comparator-1.1" }
java-string-similarity = { module = "info.debatty:java-string-similarity", version = "2.0.0" }
jsoup = { module = "org.jsoup:jsoup", version = "1.16.1" }
junrar = { module = "com.github.junrar:junrar", version = "7.5.5" }
loading-button = { module = "br.com.simplepass:loading-button-android", version = "2.2.0" }
okio = { module = "com.squareup.okio:okio", version = "3.6.0" }
okhttp-brotli = { module = "com.squareup.okhttp3:okhttp-brotli", version.ref = "okhttp" }
okhttp-dnsoverhttps = { module = "com.squareup.okhttp3:okhttp-dnsoverhttps", version.ref = "okhttp" }
okhttp-logging-interceptor = { module = "com.squareup.okhttp3:logging-interceptor", version.ref = "okhttp" }
okhttp = { module = "com.squareup.okhttp3:okhttp", version = "5.0.0-alpha.11" }
play-services-gcm = { module = "com.google.android.gms:play-services-gcm", version = "17.0.0" }
play-services-oss-licenses = { module = "com.google.android.gms:play-services-oss-licenses", version = "17.0.1" }
photoview = { module = "com.github.chrisbanes:PhotoView", version = "2.3.0" }
quickjs-android = { module = "app.cash.quickjs:quickjs-android", version = "0.9.2" }
rxrelay = { module = "com.jakewharton.rxrelay:rxrelay", version = "1.2.0" }
rxjava = { module = "io.reactivex:rxjava", version = "1.3.8" }
rxandroid = { module = "io.reactivex:rxandroid", version = "1.2.1" }
slice = { module = "com.github.mthli:Slice", version = "v1.2" }
sqlite-android = { module = "com.github.requery:sqlite-android", version = "3.39.2" }
subsampling-scale-image-view = { module = "com.github.jays2kings:subsampling-scale-image-view", version = "756849e" }
shizuku-api = { module = "dev.rikka.shizuku:api", version.ref = "shizuku" }
shizuku-provider = { module = "dev.rikka.shizuku:provider", version.ref = "shizuku" }
taptargetview = { module = "com.getkeepsafe.taptargetview:taptargetview", version = "1.13.3" }
timber = { module = "com.jakewharton.timber:timber", version = "4.7.1" }
oss-licenses-plugin = { module = "com.google.android.gms:oss-licenses-plugin", version = "0.10.6" }
firebase = { module = "com.google.firebase:firebase-bom", version = "32.7.0" }
firebase-analytics = { module = "com.google.firebase:firebase-analytics-ktx" }
firebase-crashlytics = { module = "com.google.firebase:firebase-crashlytics-ktx" }
unifile = { module = "com.github.tachiyomiorg:unifile", version = "17bec43" }
viewstatepageradapter = { module = "com.nightlynexus.viewstatepageradapter:viewstatepageradapter", version = "1.1.0" }
viewtooltip = { module = "com.github.florent37:viewtooltip", version = "1.2.2" }
[plugins]
kotlinter = { id = "org.jmailen.kotlinter", version = "4.1.1" }
gradle-versions = { id = "com.github.ben-manes.versions", version = "0.42.0" }

View file

@ -6,5 +6,26 @@ pluginManagement {
} }
} }
dependencyResolutionManagement {
versionCatalogs {
create("androidx") {
from(files("gradle/androidx.versions.toml"))
}
create("compose") {
from(files("gradle/compose.versions.toml"))
}
create("kotlinx") {
from(files("gradle/kotlinx.versions.toml"))
}
}
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
google()
maven { setUrl("https://jitpack.io") }
maven { setUrl("https://plugins.gradle.org/m2/") }
}
}
rootProject.name = "Yokai" rootProject.name = "Yokai"
include(":app") include(":app")