mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 02:34:39 +00:00
refactor: Migrate to gradle version catalog
This commit is contained in:
parent
71898809ba
commit
9a2815d277
11 changed files with 297 additions and 209 deletions
|
@ -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>
|
||||
</p>
|
||||
|
||||
|
||||
## 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)
|
||||
|
||||
|
@ -109,4 +108,4 @@ You can also reach out to us on [Discord](https://discord.gg/tachiyomi).
|
|||
|
||||
### Disclaimer
|
||||
|
||||
The developer of this application does not have any affiliation with the content providers available.
|
||||
The developer of this application does not have any affiliation with the content providers available.
|
|
@ -1,18 +1,20 @@
|
|||
import com.android.build.gradle.internal.scope.ProjectInfo.Companion.getBaseName
|
||||
import java.io.ByteArrayOutputStream
|
||||
|
||||
plugins {
|
||||
id(Plugins.androidApplication)
|
||||
kotlin(Plugins.kotlinAndroid)
|
||||
kotlin(Plugins.kapt)
|
||||
id(Plugins.kotlinParcelize)
|
||||
id(Plugins.kotlinSerialization)
|
||||
id("com.android.application")
|
||||
kotlin("android")
|
||||
kotlin("kapt")
|
||||
kotlin("plugin.serialization")
|
||||
id("kotlin-parcelize")
|
||||
id("com.google.android.gms.oss-licenses-plugin")
|
||||
id(Plugins.googleServices) apply false
|
||||
id("com.google.firebase.crashlytics")
|
||||
id("com.google.gms.google-services") apply false
|
||||
id("com.google.firebase.crashlytics") apply false
|
||||
}
|
||||
|
||||
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 {
|
||||
|
@ -27,24 +29,23 @@ fun runCommand(command: String): String {
|
|||
val supportedAbis = setOf("armeabi-v7a", "arm64-v8a", "x86", "x86_64")
|
||||
|
||||
android {
|
||||
compileSdk = AndroidVersions.compileSdk
|
||||
ndkVersion = AndroidVersions.ndk
|
||||
compileSdk = AndroidConfig.compileSdk
|
||||
ndkVersion = AndroidConfig.ndk
|
||||
|
||||
defaultConfig {
|
||||
minSdk = AndroidVersions.minSdk
|
||||
targetSdk = AndroidVersions.targetSdk
|
||||
minSdk = AndroidConfig.minSdk
|
||||
targetSdk = AndroidConfig.targetSdk
|
||||
applicationId = "eu.kanade.tachiyomi"
|
||||
versionCode = AndroidVersions.versionCode
|
||||
versionName = AndroidVersions.versionName
|
||||
versionCode = 111
|
||||
versionName = "1.7.4"
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
multiDexEnabled = true
|
||||
|
||||
buildConfigField("String", "COMMIT_COUNT", "\"${getCommitCount()}\"")
|
||||
buildConfigField("String", "BETA_COUNT", "\"${getBetaCount()}\"")
|
||||
buildConfigField("String", "COMMIT_SHA", "\"${getGitSha()}\"")
|
||||
buildConfigField("String", "BUILD_TIME", "\"${getBuildTime()}\"")
|
||||
buildConfigField("Boolean", "INCLUDE_UPDATER", "false")
|
||||
buildConfigField("boolean", "BETA", "false")
|
||||
buildConfigField("Boolean", "BETA", "false")
|
||||
|
||||
ndk {
|
||||
abiFilters += supportedAbis
|
||||
|
@ -76,11 +77,6 @@ android {
|
|||
isMinifyEnabled = true
|
||||
proguardFiles("proguard-android-optimize.txt", "proguard-rules.pro")
|
||||
}
|
||||
create("beta") {
|
||||
initWith(getByName("release"))
|
||||
buildConfigField("boolean", "BETA", "true")
|
||||
versionNameSuffix = "-b${getBetaCount()}"
|
||||
}
|
||||
}
|
||||
|
||||
buildFeatures {
|
||||
|
@ -127,174 +123,165 @@ android {
|
|||
|
||||
dependencies {
|
||||
// Compose
|
||||
implementation("androidx.activity:activity-compose:1.7.2")
|
||||
implementation("androidx.compose.foundation:foundation:1.5.1")
|
||||
implementation("androidx.compose.animation:animation:1.5.1")
|
||||
implementation("androidx.compose.ui:ui:1.5.1")
|
||||
implementation("androidx.compose.material:material:1.5.1")
|
||||
implementation("androidx.compose.material3:material3:1.1.2")
|
||||
implementation("com.google.android.material:compose-theme-adapter-3:1.1.1")
|
||||
implementation("androidx.compose.material:material-icons-extended:1.5.1")
|
||||
implementation("androidx.compose.ui:ui-tooling-preview:1.5.1")
|
||||
debugImplementation("androidx.compose.ui:ui-tooling:1.5.1")
|
||||
implementation("com.google.accompanist:accompanist-webview:0.30.1")
|
||||
implementation("androidx.glance:glance-appwidget:1.0.0")
|
||||
implementation(androidx.activity.compose)
|
||||
implementation(compose.foundation)
|
||||
implementation(compose.animation)
|
||||
implementation(compose.ui)
|
||||
debugImplementation(compose.ui.tooling)
|
||||
implementation(compose.ui.tooling.preview)
|
||||
implementation(compose.material)
|
||||
implementation(compose.material3)
|
||||
implementation(libs.compose.theme.adapter3)
|
||||
implementation(compose.icons)
|
||||
implementation(libs.accompanist.webview)
|
||||
implementation(androidx.glance.appwidget)
|
||||
|
||||
// Modified dependencies
|
||||
implementation("com.github.jays2kings:subsampling-scale-image-view:756849e") {
|
||||
implementation(libs.subsampling.scale.image.view) {
|
||||
exclude(module = "image-decoder")
|
||||
}
|
||||
implementation("com.github.tachiyomiorg:image-decoder:7879b45")
|
||||
implementation(libs.image.decoder)
|
||||
|
||||
// Android X libraries
|
||||
implementation("androidx.appcompat:appcompat:1.6.1")
|
||||
implementation("androidx.cardview:cardview:1.0.0")
|
||||
implementation("com.google.android.material:material:1.10.0")
|
||||
implementation("androidx.webkit:webkit:1.8.0")
|
||||
implementation("androidx.recyclerview:recyclerview:1.3.1")
|
||||
implementation("androidx.preference:preference:1.2.1")
|
||||
implementation("androidx.annotation:annotation:1.7.0")
|
||||
implementation("androidx.browser:browser:1.6.0")
|
||||
implementation("androidx.biometric:biometric:1.1.0")
|
||||
implementation("androidx.palette:palette:1.0.0")
|
||||
implementation("androidx.activity:activity-ktx:1.8.0")
|
||||
implementation("androidx.core:core-ktx:1.12.0")
|
||||
implementation("com.google.android.flexbox:flexbox:3.0.0")
|
||||
implementation("androidx.window:window:1.1.0")
|
||||
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.1.0")
|
||||
implementation(androidx.appcompat)
|
||||
implementation(androidx.cardview)
|
||||
implementation(libs.material)
|
||||
implementation(androidx.webkit)
|
||||
implementation(androidx.recyclerview)
|
||||
implementation(androidx.preference)
|
||||
implementation(androidx.annotation)
|
||||
implementation(androidx.browser)
|
||||
implementation(androidx.biometric)
|
||||
implementation(androidx.palette)
|
||||
implementation(androidx.activity)
|
||||
implementation(androidx.core)
|
||||
implementation(libs.flexbox)
|
||||
implementation(androidx.window)
|
||||
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("com.google.firebase:firebase-crashlytics-ktx")
|
||||
implementation(libs.firebase.analytics)
|
||||
implementation(libs.firebase.crashlytics)
|
||||
|
||||
val lifecycleVersion = "2.6.2"
|
||||
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycleVersion")
|
||||
implementation("androidx.lifecycle:lifecycle-livedata-ktx:$lifecycleVersion")
|
||||
implementation("androidx.lifecycle:lifecycle-common:$lifecycleVersion")
|
||||
implementation("androidx.lifecycle:lifecycle-process:$lifecycleVersion")
|
||||
implementation("androidx.lifecycle:lifecycle-runtime-ktx:$lifecycleVersion")
|
||||
implementation(androidx.lifecycle.viewmodel)
|
||||
implementation(androidx.lifecycle.livedata)
|
||||
implementation(androidx.lifecycle.common)
|
||||
implementation(androidx.lifecycle.process)
|
||||
implementation(androidx.lifecycle.runtime)
|
||||
|
||||
// ReactiveX
|
||||
implementation("io.reactivex:rxandroid:1.2.1")
|
||||
implementation("io.reactivex:rxjava:1.3.8")
|
||||
implementation("com.jakewharton.rxrelay:rxrelay:1.2.0")
|
||||
implementation(libs.rxandroid)
|
||||
implementation(libs.rxjava)
|
||||
implementation(libs.rxrelay)
|
||||
|
||||
// Coroutines
|
||||
implementation("com.fredporciuncula:flow-preferences:1.6.0")
|
||||
implementation(libs.flow.preferences)
|
||||
|
||||
// Network client
|
||||
val okhttpVersion = "5.0.0-alpha.11"
|
||||
implementation("com.squareup.okhttp3:okhttp:$okhttpVersion")
|
||||
implementation("com.squareup.okhttp3:logging-interceptor:$okhttpVersion")
|
||||
implementation("com.squareup.okhttp3:okhttp-dnsoverhttps:$okhttpVersion")
|
||||
implementation("com.squareup.okhttp3:okhttp-brotli:$okhttpVersion")
|
||||
implementation("com.squareup.okio:okio:3.4.0")
|
||||
implementation(libs.okhttp)
|
||||
implementation(libs.okhttp.logging.interceptor)
|
||||
implementation(libs.okhttp.dnsoverhttps)
|
||||
implementation(libs.okhttp.brotli)
|
||||
implementation(libs.okio)
|
||||
|
||||
// Chucker
|
||||
val chuckerVersion = "3.5.2"
|
||||
debugImplementation("com.github.ChuckerTeam.Chucker:library:$chuckerVersion")
|
||||
releaseImplementation("com.github.ChuckerTeam.Chucker:library-no-op:$chuckerVersion")
|
||||
add("betaImplementation", "com.github.ChuckerTeam.Chucker:library-no-op:$chuckerVersion")
|
||||
debugImplementation(libs.chucker.library)
|
||||
releaseImplementation(libs.chucker.library.no.op)
|
||||
|
||||
implementation(kotlin("reflect", version = AndroidVersions.kotlin))
|
||||
implementation(kotlin("reflect", version = kotlinx.versions.kotlin.get()))
|
||||
|
||||
// JSON
|
||||
val kotlinSerialization = "1.6.0"
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:${kotlinSerialization}")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-serialization-protobuf:${kotlinSerialization}")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json-okio:${kotlinSerialization}")
|
||||
implementation(kotlinx.serialization.json)
|
||||
implementation(kotlinx.serialization.protobuf)
|
||||
implementation(kotlinx.serialization.json.okio)
|
||||
|
||||
// JavaScript engine
|
||||
implementation("app.cash.quickjs:quickjs-android:0.9.2")
|
||||
implementation(libs.quickjs.android)
|
||||
|
||||
// Disk
|
||||
implementation("com.jakewharton:disklrucache:2.0.2")
|
||||
implementation("com.github.tachiyomiorg:unifile:17bec43")
|
||||
implementation("com.github.junrar:junrar:7.5.5")
|
||||
implementation(libs.disklrucache)
|
||||
implementation(libs.unifile)
|
||||
implementation(libs.junrar)
|
||||
|
||||
// HTML parser
|
||||
implementation("org.jsoup:jsoup:1.16.1")
|
||||
implementation(libs.jsoup)
|
||||
|
||||
// Job scheduling
|
||||
implementation("androidx.work:work-runtime-ktx:2.8.1")
|
||||
implementation("com.google.guava:guava:31.1-android")
|
||||
implementation(androidx.work)
|
||||
implementation(libs.guava)
|
||||
|
||||
implementation("com.google.android.gms:play-services-gcm:17.0.0")
|
||||
implementation(libs.play.services.gcm)
|
||||
|
||||
// Database
|
||||
implementation("androidx.sqlite:sqlite-ktx:2.3.1")
|
||||
implementation("com.github.requery:sqlite-android:3.39.2")
|
||||
implementation(androidx.sqlite)
|
||||
implementation(libs.sqlite.android)
|
||||
//noinspection UseTomlInstead
|
||||
implementation("com.github.inorichi.storio:storio-common:8be19de@aar")
|
||||
//noinspection UseTomlInstead
|
||||
implementation("com.github.inorichi.storio:storio-sqlite:8be19de@aar")
|
||||
|
||||
// Model View Presenter
|
||||
val nucleusVersion = "3.0.0"
|
||||
implementation("info.android15.nucleus:nucleus:$nucleusVersion")
|
||||
implementation("info.android15.nucleus:nucleus-support-v7:$nucleusVersion")
|
||||
implementation(libs.nucleus)
|
||||
implementation(libs.nucleus.support.v7)
|
||||
|
||||
// Dependency injection
|
||||
implementation("com.github.inorichi.injekt:injekt-core:65b0440")
|
||||
implementation(libs.injekt.core)
|
||||
|
||||
// Image library
|
||||
val coilVersion = "2.4.0"
|
||||
implementation("io.coil-kt:coil:$coilVersion")
|
||||
implementation("io.coil-kt:coil-gif:$coilVersion")
|
||||
implementation("io.coil-kt:coil-svg:$coilVersion")
|
||||
implementation(libs.coil)
|
||||
implementation(libs.coil.gif)
|
||||
implementation(libs.coil.svg)
|
||||
|
||||
// Logging
|
||||
implementation("com.jakewharton.timber:timber:4.7.1")
|
||||
implementation(libs.timber)
|
||||
|
||||
// Sort
|
||||
implementation("com.github.gpanther:java-nat-sort:natural-comparator-1.1")
|
||||
implementation(libs.java.nat.sort)
|
||||
|
||||
// UI
|
||||
implementation("com.dmitrymalkovich.android:material-design-dimens:1.4")
|
||||
implementation("br.com.simplepass:loading-button-android:2.2.0")
|
||||
val fastAdapterVersion = "5.6.0"
|
||||
implementation("com.mikepenz:fastadapter:$fastAdapterVersion")
|
||||
implementation("com.mikepenz:fastadapter-extensions-binding:$fastAdapterVersion")
|
||||
implementation("com.github.arkon.FlexibleAdapter:flexible-adapter:c8013533")
|
||||
implementation("com.github.arkon.FlexibleAdapter:flexible-adapter-ui:c8013533")
|
||||
implementation("com.nightlynexus.viewstatepageradapter:viewstatepageradapter:1.1.0")
|
||||
implementation("com.github.mthli:Slice:v1.2")
|
||||
implementation("io.noties.markwon:core:4.6.2")
|
||||
implementation(libs.material.design.dimens)
|
||||
implementation(libs.loading.button)
|
||||
implementation(libs.fastadapter)
|
||||
implementation(libs.fastadapter.extensions.binding)
|
||||
implementation(libs.flexible.adapter)
|
||||
implementation(libs.flexible.adapter.ui)
|
||||
implementation(libs.viewstatepageradapter)
|
||||
implementation(libs.slice)
|
||||
implementation(libs.markwon)
|
||||
|
||||
implementation("com.github.chrisbanes:PhotoView:2.3.0")
|
||||
implementation("com.github.tachiyomiorg:DirectionalViewPager:1.0.0")
|
||||
implementation("com.github.florent37:viewtooltip:1.2.2")
|
||||
implementation("com.getkeepsafe.taptargetview:taptargetview:1.13.3")
|
||||
implementation(libs.photoview)
|
||||
implementation(libs.directionalviewpager)
|
||||
implementation(libs.viewtooltip)
|
||||
implementation(libs.taptargetview)
|
||||
|
||||
// Conductor
|
||||
val conductorVersion = "4.0.0-preview-3"
|
||||
implementation("com.bluelinelabs:conductor:$conductorVersion")
|
||||
implementation("com.github.tachiyomiorg:conductor-support-preference:3.0.0")
|
||||
implementation(libs.conductor)
|
||||
implementation(libs.conductor.support.preference)
|
||||
|
||||
// Shizuku
|
||||
val shizukuVersion = "12.1.0"
|
||||
implementation("dev.rikka.shizuku:api:$shizukuVersion")
|
||||
implementation("dev.rikka.shizuku:provider:$shizukuVersion")
|
||||
implementation(libs.shizuku.api)
|
||||
implementation(libs.shizuku.provider)
|
||||
|
||||
implementation(kotlin("stdlib", org.jetbrains.kotlin.config.KotlinCompilerVersion.VERSION))
|
||||
|
||||
val coroutines = "1.7.3"
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines")
|
||||
implementation(kotlinx.coroutines.core)
|
||||
implementation(kotlinx.coroutines.android)
|
||||
|
||||
// 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
|
||||
implementation("org.conscrypt:conscrypt-android:2.5.2")
|
||||
implementation(libs.conscrypt)
|
||||
|
||||
// Android Chart
|
||||
implementation("com.github.PhilJay:MPAndroidChart:v3.1.0")
|
||||
implementation(libs.mpandroidchart)
|
||||
}
|
||||
|
||||
tasks {
|
||||
|
@ -326,12 +313,12 @@ tasks {
|
|||
kotlinOptions.freeCompilerArgs += listOf(
|
||||
"-P",
|
||||
"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(
|
||||
"-P",
|
||||
"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 {
|
||||
dependsOn(formatKotlin, copyHebrewStrings)
|
||||
dependsOn(
|
||||
// formatKotlin,
|
||||
copyHebrewStrings
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,36 +1,19 @@
|
|||
import java.util.*
|
||||
|
||||
plugins {
|
||||
id(Plugins.kotlinter.name) version Plugins.kotlinter.version
|
||||
id(Plugins.gradleVersions.name) version Plugins.gradleVersions.version
|
||||
id(Plugins.jetbrainsKotlin) version AndroidVersions.kotlin 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")
|
||||
}
|
||||
alias(libs.plugins.kotlinter)
|
||||
alias(libs.plugins.gradle.versions)
|
||||
alias(kotlinx.plugins.android) apply false
|
||||
}
|
||||
|
||||
buildscript {
|
||||
dependencies {
|
||||
classpath("com.android.tools.build:gradle:8.1.2")
|
||||
classpath("com.google.gms:google-services:4.3.15")
|
||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${AndroidVersions.kotlin}")
|
||||
classpath("com.google.android.gms:oss-licenses-plugin:0.10.6")
|
||||
classpath("org.jetbrains.kotlin:kotlin-serialization:${AndroidVersions.kotlin}")
|
||||
classpath("com.google.firebase:firebase-crashlytics-gradle:2.9.4")
|
||||
classpath(libs.gradle)
|
||||
classpath(libs.google.services)
|
||||
classpath(kotlinx.gradle)
|
||||
classpath(libs.oss.licenses.plugin)
|
||||
classpath(kotlinx.serialization.gradle)
|
||||
classpath(libs.firebase.crashlytics.gradle)
|
||||
}
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
|
@ -41,7 +24,10 @@ buildscript {
|
|||
|
||||
tasks.named("dependencyUpdates", com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask::class.java).configure {
|
||||
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
|
||||
checkForGradleUpdate = true
|
||||
|
@ -51,5 +37,5 @@ tasks.named("dependencyUpdates", com.github.benmanes.gradle.versions.updates.Dep
|
|||
}
|
||||
|
||||
tasks.register("clean", Delete::class) {
|
||||
delete(rootProject.buildDir)
|
||||
delete(rootProject.layout.buildDirectory)
|
||||
}
|
||||
|
|
6
buildSrc/src/main/kotlin/AndroidConfig.kt
Normal file
6
buildSrc/src/main/kotlin/AndroidConfig.kt
Normal 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"
|
||||
}
|
|
@ -11,18 +11,6 @@ fun Project.getCommitCount(): String {
|
|||
// 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 {
|
||||
return runCommand("git rev-parse --short HEAD")
|
||||
// return "1"
|
||||
|
@ -41,4 +29,4 @@ fun Project.runCommand(command: String): String {
|
|||
standardOutput = byteOut
|
||||
}
|
||||
return String(byteOut.toByteArray()).trim()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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()
|
||||
}
|
29
gradle/androidx.versions.toml
Normal file
29
gradle/androidx.versions.toml
Normal 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" }
|
12
gradle/compose.versions.toml
Normal file
12
gradle/compose.versions.toml
Normal 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" }
|
16
gradle/kotlinx.versions.toml
Normal file
16
gradle/kotlinx.versions.toml
Normal 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
75
gradle/libs.versions.toml
Normal 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" }
|
|
@ -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"
|
||||
include(":app")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue