Cleanup and rework build logic (#3113)
# Conflicts: # app/build.gradle.kts # app/shortcuts.xml # app/src/main/res/xml/shortcuts.xml # app/src/main/shortcuts.xml # build.gradle.kts # buildSrc/src/main/kotlin/mihon/buildlogic/AndroidConfig.kt # core/archive/build.gradle.kts # core/common/build.gradle.kts # gradle/build-logic/src/main/kotlin/mihon/gradle/BuildConfig.kt # settings.gradle.kts # source-api/build.gradle.kts # source-local/build.gradle.kts # telemetry/build.gradle.kts
This commit is contained in:
+58
-38
@@ -1,16 +1,19 @@
|
||||
@file:Suppress("ChromeOsAbiSupport")
|
||||
|
||||
import mihon.buildlogic.getBuildTime
|
||||
import mihon.buildlogic.getCommitCount
|
||||
import mihon.buildlogic.getGitSha
|
||||
import mihon.gradle.getBuildTime
|
||||
import mihon.gradle.getLatestCommitCount
|
||||
import mihon.gradle.getLatestCommitSha
|
||||
import mihon.gradle.tasks.ReplaceShortcutsPlaceholderTask
|
||||
|
||||
plugins {
|
||||
id("mihon.android.application")
|
||||
id("mihon.android.application.compose")
|
||||
alias(mihonx.plugins.android.application)
|
||||
alias(mihonx.plugins.compose)
|
||||
alias(mihonx.plugins.spotless)
|
||||
|
||||
kotlin("plugin.parcelize")
|
||||
kotlin("plugin.serialization")
|
||||
// id("com.github.zellius.shortcut-helper")
|
||||
|
||||
alias(libs.plugins.aboutLibraries)
|
||||
alias(libs.plugins.kotlin.serialization)
|
||||
|
||||
id("com.github.ben-manes.versions")
|
||||
}
|
||||
|
||||
@@ -21,10 +24,6 @@ if (gradle.startParameter.taskRequests.toString().contains("Standard")) {
|
||||
}
|
||||
}
|
||||
|
||||
// shortcutHelper.setFilePath("./shortcuts.xml")
|
||||
|
||||
val supportedAbis = setOf("armeabi-v7a", "arm64-v8a", "x86", "x86_64")
|
||||
|
||||
android {
|
||||
namespace = "eu.kanade.tachiyomi"
|
||||
|
||||
@@ -34,29 +33,17 @@ android {
|
||||
versionCode = 77
|
||||
versionName = "1.12.0"
|
||||
|
||||
buildConfigField("String", "COMMIT_COUNT", "\"${getCommitCount()}\"")
|
||||
buildConfigField("String", "COMMIT_SHA", "\"${getGitSha()}\"")
|
||||
buildConfigField("String", "BUILD_TIME", "\"${getBuildTime(useLastCommitTime = false)}\"")
|
||||
buildConfigField("String", "COMMIT_COUNT", "\"${getLatestCommitCount()}\"")
|
||||
buildConfigField("String", "COMMIT_SHA", "\"${getLatestCommitSha()}\"")
|
||||
buildConfigField("String", "BUILD_TIME", "\"${getBuildTime(useLatestCommitTime = false)}\"")
|
||||
buildConfigField("boolean", "INCLUDE_UPDATER", "false")
|
||||
|
||||
ndk {
|
||||
abiFilters += supportedAbis
|
||||
}
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
splits {
|
||||
abi {
|
||||
isEnable = true
|
||||
reset()
|
||||
include(*supportedAbis.toTypedArray())
|
||||
isUniversalApk = true
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
named("debug") {
|
||||
versionNameSuffix = "-${getCommitCount()}"
|
||||
versionNameSuffix = "-${getLatestCommitCount()}"
|
||||
applicationIdSuffix = ".debug"
|
||||
isPseudoLocalesEnabled = true
|
||||
}
|
||||
@@ -72,7 +59,7 @@ android {
|
||||
isShrinkResources = true
|
||||
setProguardFiles(listOf(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"))
|
||||
|
||||
buildConfigField("String", "BUILD_TIME", "\"${getBuildTime(useLastCommitTime = true)}\"")
|
||||
buildConfigField("String", "BUILD_TIME", "\"${getBuildTime(useLatestCommitTime = true)}\"")
|
||||
}
|
||||
create("benchmark") {
|
||||
initWith(getByName("release"))
|
||||
@@ -90,6 +77,15 @@ android {
|
||||
getByName("benchmark").res.srcDirs("src/debug/res")
|
||||
}
|
||||
|
||||
splits {
|
||||
abi {
|
||||
isEnable = true
|
||||
isUniversalApk = true
|
||||
reset()
|
||||
include("armeabi-v7a", "arm64-v8a", "x86", "x86_64")
|
||||
}
|
||||
}
|
||||
|
||||
flavorDimensions.add("default")
|
||||
|
||||
productFlavors {
|
||||
@@ -106,20 +102,31 @@ android {
|
||||
}
|
||||
|
||||
packaging {
|
||||
resources.excludes.addAll(
|
||||
listOf(
|
||||
jniLibs {
|
||||
keepDebugSymbols += listOf(
|
||||
"libandroidx.graphics.path",
|
||||
"libarchive-jni",
|
||||
"libconscrypt_jni",
|
||||
"libimagedecoder",
|
||||
"libquickjs",
|
||||
"libsqlite3x",
|
||||
)
|
||||
.map { "**/$it.so" }
|
||||
}
|
||||
resources {
|
||||
excludes += setOf(
|
||||
"kotlin-tooling-metadata.json",
|
||||
"META-INF/DEPENDENCIES",
|
||||
"LICENSE.txt",
|
||||
"META-INF/LICENSE",
|
||||
"META-INF/**/*.properties",
|
||||
"META-INF/**/LICENSE.txt",
|
||||
"META-INF/*.properties",
|
||||
"META-INF/**/*.properties",
|
||||
"META-INF/README.md",
|
||||
"META-INF/NOTICE",
|
||||
"META-INF/*.version",
|
||||
),
|
||||
)
|
||||
"META-INF/DEPENDENCIES",
|
||||
"META-INF/LICENSE",
|
||||
"META-INF/NOTICE",
|
||||
"META-INF/README.md",
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
dependenciesInfo {
|
||||
@@ -318,6 +325,19 @@ dependencies {
|
||||
}
|
||||
|
||||
androidComponents {
|
||||
onVariants { variant ->
|
||||
val resSource = variant.sources.res ?: return@onVariants
|
||||
|
||||
val variantName = variant.name.replaceFirstChar { it.uppercase() }
|
||||
val replaceShortcutsPlaceholderTask = tasks.register<ReplaceShortcutsPlaceholderTask>(
|
||||
"replace${variantName}ShortcutPlaceholder",
|
||||
) {
|
||||
applicationId.set(variant.applicationId)
|
||||
shortcutsFile.set(projectDir.resolve("src/main/shortcuts.xml"))
|
||||
}
|
||||
resSource.addGeneratedSourceDirectory(replaceShortcutsPlaceholderTask) { it.outputDir }
|
||||
}
|
||||
|
||||
onVariants(selector().withFlavor("default" to "standard")) {
|
||||
// Only excluding in standard flavor because this breaks
|
||||
// Layout Inspector's Compose tree
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
android:shortcutShortLabel="@string/label_library">
|
||||
<intent
|
||||
android:action="eu.kanade.tachiyomi.SHOW_LIBRARY"
|
||||
android:targetPackage="eu.kanade.tachiyomi.sy"
|
||||
android:targetClass="eu.kanade.tachiyomi.ui.main.MainActivity" />
|
||||
android:targetClass="eu.kanade.tachiyomi.ui.main.MainActivity"
|
||||
android:targetPackage="${applicationId}" />
|
||||
</shortcut>
|
||||
<shortcut
|
||||
android:enabled="true"
|
||||
@@ -20,8 +20,8 @@
|
||||
android:shortcutShortLabel="@string/label_recent_updates">
|
||||
<intent
|
||||
android:action="eu.kanade.tachiyomi.SHOW_RECENTLY_UPDATED"
|
||||
android:targetPackage="eu.kanade.tachiyomi.sy"
|
||||
android:targetClass="eu.kanade.tachiyomi.ui.main.MainActivity" />
|
||||
android:targetClass="eu.kanade.tachiyomi.ui.main.MainActivity"
|
||||
android:targetPackage="${applicationId}" />
|
||||
</shortcut>
|
||||
<shortcut
|
||||
android:enabled="true"
|
||||
@@ -32,8 +32,8 @@
|
||||
android:shortcutShortLabel="@string/label_recent_manga">
|
||||
<intent
|
||||
android:action="eu.kanade.tachiyomi.SHOW_RECENTLY_READ"
|
||||
android:targetPackage="eu.kanade.tachiyomi.sy"
|
||||
android:targetClass="eu.kanade.tachiyomi.ui.main.MainActivity" />
|
||||
android:targetClass="eu.kanade.tachiyomi.ui.main.MainActivity"
|
||||
android:targetPackage="${applicationId}" />
|
||||
</shortcut>
|
||||
<shortcut
|
||||
android:enabled="true"
|
||||
@@ -44,7 +44,7 @@
|
||||
android:shortcutShortLabel="@string/browse">
|
||||
<intent
|
||||
android:action="eu.kanade.tachiyomi.SHOW_CATALOGUES"
|
||||
android:targetPackage="eu.kanade.tachiyomi.sy"
|
||||
android:targetClass="eu.kanade.tachiyomi.ui.main.MainActivity" />
|
||||
android:targetClass="eu.kanade.tachiyomi.ui.main.MainActivity"
|
||||
android:targetPackage="${applicationId}" />
|
||||
</shortcut>
|
||||
</shortcuts>
|
||||
+14
-4
@@ -1,19 +1,29 @@
|
||||
buildscript {
|
||||
dependencies {
|
||||
// classpath(libs.android.shortcut.gradle)
|
||||
classpath(sylibs.versionsx)
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.serialization) apply false
|
||||
alias(libs.plugins.aboutLibraries) apply false
|
||||
alias(libs.plugins.android.application) apply false
|
||||
alias(libs.plugins.android.library) apply false
|
||||
alias(libs.plugins.android.test) apply false
|
||||
alias(libs.plugins.firebase.crashlytics) apply false
|
||||
alias(libs.plugins.google.services) apply false
|
||||
alias(libs.plugins.kotlin.compose.compiler) apply false
|
||||
alias(libs.plugins.kotlin.serialization) apply false
|
||||
alias(libs.plugins.moko.resources) apply false
|
||||
alias(libs.plugins.sqldelight) apply false
|
||||
|
||||
alias(mihonx.plugins.spotless)
|
||||
}
|
||||
|
||||
tasks.register<Delete>("clean") {
|
||||
delete(rootProject.layout.buildDirectory)
|
||||
val buildLogic: IncludedBuild = gradle.includedBuild("build-logic")
|
||||
tasks {
|
||||
listOf("clean", "spotlessApply", "spotlessCheck").forEach { task ->
|
||||
named(task) {
|
||||
dependsOn(buildLogic.task(":$task"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
plugins {
|
||||
`kotlin-dsl`
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(libs.android.gradle)
|
||||
implementation(libs.kotlin.gradle)
|
||||
implementation(libs.kotlin.compose.compiler.gradle)
|
||||
implementation(libs.spotless.gradle)
|
||||
implementation(gradleApi())
|
||||
|
||||
implementation(files(libs.javaClass.superclass.protectionDomain.codeSource.location))
|
||||
}
|
||||
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
mavenCentral()
|
||||
google()
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
dependencyResolutionManagement {
|
||||
versionCatalogs {
|
||||
create("libs") {
|
||||
from(files("../gradle/libs.versions.toml"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.name = "mihon-buildSrc"
|
||||
@@ -1,12 +0,0 @@
|
||||
import mihon.buildlogic.configureCompose
|
||||
|
||||
plugins {
|
||||
id("com.android.application")
|
||||
kotlin("android")
|
||||
|
||||
id("mihon.code.lint")
|
||||
}
|
||||
|
||||
android {
|
||||
configureCompose(this)
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
import mihon.buildlogic.AndroidConfig
|
||||
import mihon.buildlogic.configureAndroid
|
||||
import mihon.buildlogic.configureTest
|
||||
|
||||
plugins {
|
||||
id("com.android.application")
|
||||
kotlin("android")
|
||||
|
||||
id("mihon.code.lint")
|
||||
}
|
||||
|
||||
android {
|
||||
defaultConfig {
|
||||
targetSdk = AndroidConfig.TARGET_SDK
|
||||
}
|
||||
configureAndroid(this)
|
||||
configureTest()
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
import mihon.buildlogic.configureAndroid
|
||||
import mihon.buildlogic.configureTest
|
||||
|
||||
plugins {
|
||||
id("com.android.test")
|
||||
kotlin("android")
|
||||
|
||||
id("mihon.code.lint")
|
||||
}
|
||||
|
||||
android {
|
||||
configureAndroid(this)
|
||||
configureTest()
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
import org.gradle.accessors.dm.LibrariesForLibs
|
||||
|
||||
plugins {
|
||||
id("com.diffplug.spotless")
|
||||
}
|
||||
|
||||
val libs = the<LibrariesForLibs>()
|
||||
|
||||
val xmlFormatExclude = buildList(2) {
|
||||
add("**/build/**/*.xml")
|
||||
|
||||
projectDir
|
||||
.resolve("src/commonMain/moko-resources")
|
||||
.takeIf { it.isDirectory }
|
||||
?.let(::fileTree)
|
||||
?.matching { exclude("/base/**") }
|
||||
?.let(::add)
|
||||
}
|
||||
.toTypedArray()
|
||||
|
||||
spotless {
|
||||
kotlin {
|
||||
target("**/*.kt", "**/*.kts")
|
||||
targetExclude("**/build/**/*.kt")
|
||||
ktlint(libs.ktlint.bom.get().version)
|
||||
trimTrailingWhitespace()
|
||||
endWithNewline()
|
||||
}
|
||||
format("xml") {
|
||||
target("**/*.xml")
|
||||
targetExclude(*xmlFormatExclude)
|
||||
trimTrailingWhitespace()
|
||||
endWithNewline()
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
import mihon.buildlogic.configureCompose
|
||||
|
||||
plugins {
|
||||
id("com.android.library")
|
||||
|
||||
id("mihon.code.lint")
|
||||
}
|
||||
|
||||
android {
|
||||
configureCompose(this)
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
import mihon.buildlogic.configureAndroid
|
||||
import mihon.buildlogic.configureTest
|
||||
|
||||
plugins {
|
||||
id("com.android.library")
|
||||
|
||||
id("mihon.code.lint")
|
||||
}
|
||||
|
||||
android {
|
||||
configureAndroid(this)
|
||||
configureTest()
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
package mihon.buildlogic
|
||||
|
||||
import org.gradle.api.JavaVersion as GradleJavaVersion
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget as KotlinJvmTarget
|
||||
|
||||
object AndroidConfig {
|
||||
const val COMPILE_SDK = 36
|
||||
const val TARGET_SDK = 36
|
||||
const val MIN_SDK = 23
|
||||
|
||||
// https://youtrack.jetbrains.com/issue/KT-66995/JvmTarget-and-JavaVersion-compatibility-for-easier-JVM-version-setup
|
||||
val JavaVersion = GradleJavaVersion.VERSION_17
|
||||
val JvmTarget = KotlinJvmTarget.JVM_17
|
||||
}
|
||||
@@ -1,95 +0,0 @@
|
||||
package mihon.buildlogic
|
||||
|
||||
import com.android.build.api.dsl.CommonExtension
|
||||
import org.gradle.accessors.dm.LibrariesForLibs
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.tasks.testing.Test
|
||||
import org.gradle.api.tasks.testing.logging.TestLogEvent
|
||||
import org.gradle.kotlin.dsl.configure
|
||||
import org.gradle.kotlin.dsl.dependencies
|
||||
import org.gradle.kotlin.dsl.provideDelegate
|
||||
import org.gradle.kotlin.dsl.the
|
||||
import org.gradle.kotlin.dsl.withType
|
||||
import org.jetbrains.kotlin.compose.compiler.gradle.ComposeCompilerGradlePluginExtension
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
import java.io.File
|
||||
|
||||
val Project.libs get() = the<LibrariesForLibs>()
|
||||
|
||||
internal fun Project.configureAndroid(commonExtension: CommonExtension<*, *, *, *, *, *>) {
|
||||
commonExtension.apply {
|
||||
compileSdk = AndroidConfig.COMPILE_SDK
|
||||
|
||||
defaultConfig {
|
||||
minSdk = AndroidConfig.MIN_SDK
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = AndroidConfig.JavaVersion
|
||||
targetCompatibility = AndroidConfig.JavaVersion
|
||||
isCoreLibraryDesugaringEnabled = true
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType<KotlinCompile>().configureEach {
|
||||
compilerOptions {
|
||||
jvmTarget.set(AndroidConfig.JvmTarget)
|
||||
freeCompilerArgs.addAll(
|
||||
"-Xcontext-parameters",
|
||||
"-opt-in=kotlin.RequiresOptIn",
|
||||
)
|
||||
|
||||
// Treat all Kotlin warnings as errors (disabled by default)
|
||||
// Override by setting warningsAsErrors=true in your ~/.gradle/gradle.properties
|
||||
val warningsAsErrors: String? by project
|
||||
allWarningsAsErrors.set(warningsAsErrors.toBoolean())
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
"coreLibraryDesugaring"(libs.android.desugar)
|
||||
}
|
||||
}
|
||||
|
||||
internal fun Project.configureCompose(commonExtension: CommonExtension<*, *, *, *, *, *>) {
|
||||
pluginManager.apply(libs.plugins.kotlin.compose.compiler.get().pluginId)
|
||||
|
||||
commonExtension.apply {
|
||||
buildFeatures {
|
||||
compose = true
|
||||
}
|
||||
|
||||
dependencies {
|
||||
"implementation"(platform(libs.androidx.compose.bom))
|
||||
}
|
||||
}
|
||||
|
||||
extensions.configure<ComposeCompilerGradlePluginExtension> {
|
||||
val enableMetrics = project.providers.gradleProperty("enableComposeCompilerMetrics").orNull.toBoolean()
|
||||
val enableReports = project.providers.gradleProperty("enableComposeCompilerReports").orNull.toBoolean()
|
||||
|
||||
val rootBuildDir = rootProject.layout.buildDirectory.asFile.get()
|
||||
val relativePath = projectDir.relativeTo(rootDir)
|
||||
|
||||
if (enableMetrics) {
|
||||
rootBuildDir.resolve("compose-metrics").resolve(relativePath).let(metricsDestination::set)
|
||||
}
|
||||
|
||||
if (enableReports) {
|
||||
rootBuildDir.resolve("compose-reports").resolve(relativePath).let(reportsDestination::set)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
internal fun Project.configureTest() {
|
||||
tasks.withType<Test> {
|
||||
useJUnitPlatform()
|
||||
testLogging {
|
||||
events(TestLogEvent.PASSED, TestLogEvent.SKIPPED, TestLogEvent.FAILED)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val Project.generatedBuildDir: File get() = project.layout.buildDirectory.asFile.get().resolve("generated/mihon")
|
||||
@@ -1,36 +0,0 @@
|
||||
package mihon.buildlogic.tasks
|
||||
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.Task
|
||||
import org.gradle.api.tasks.TaskProvider
|
||||
import java.io.File
|
||||
|
||||
private val emptyResourcesElement = "<resources>\\s*</resources>|<resources\\s*/>".toRegex()
|
||||
|
||||
fun Project.getLocalesConfigTask(outputResourceDir: File): TaskProvider<Task> {
|
||||
return tasks.register("generateLocalesConfig") {
|
||||
val locales = fileTree("$projectDir/src/commonMain/moko-resources/")
|
||||
.matching { include("**/strings.xml") }
|
||||
.filterNot { it.readText().contains(emptyResourcesElement) }
|
||||
.map {
|
||||
it.parentFile.name
|
||||
.replace("base", "en")
|
||||
.replace("-r", "-")
|
||||
.replace("+", "-")
|
||||
}
|
||||
.sorted()
|
||||
.joinToString("\n") { "| <locale android:name=\"$it\"/>" }
|
||||
|
||||
val content = """
|
||||
|<?xml version="1.0" encoding="utf-8"?>
|
||||
|<locale-config xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
$locales
|
||||
|</locale-config>
|
||||
""".trimMargin()
|
||||
|
||||
outputResourceDir.resolve("xml/locales_config.xml").apply {
|
||||
parentFile.mkdirs()
|
||||
writeText(content)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,16 +1,12 @@
|
||||
plugins {
|
||||
id("mihon.library")
|
||||
kotlin("android")
|
||||
kotlin("plugin.serialization")
|
||||
alias(mihonx.plugins.android.library)
|
||||
alias(mihonx.plugins.spotless)
|
||||
|
||||
alias(libs.plugins.kotlin.serialization)
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "tachiyomi.core.metadata"
|
||||
|
||||
defaultConfig {
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
consumerProguardFiles("consumer-rules.pro")
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
Vendored
-21
@@ -1,21 +0,0 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
@@ -1,7 +1,9 @@
|
||||
plugins {
|
||||
id("mihon.library")
|
||||
kotlin("android")
|
||||
kotlin("plugin.serialization")
|
||||
alias(mihonx.plugins.android.library)
|
||||
alias(mihonx.plugins.spotless)
|
||||
|
||||
alias(libs.plugins.kotlin.serialization)
|
||||
|
||||
id("com.github.ben-manes.versions")
|
||||
}
|
||||
|
||||
|
||||
@@ -1,17 +1,14 @@
|
||||
plugins {
|
||||
id("mihon.library")
|
||||
kotlin("android")
|
||||
kotlin("plugin.serialization")
|
||||
alias(mihonx.plugins.android.library)
|
||||
alias(mihonx.plugins.spotless)
|
||||
|
||||
alias(libs.plugins.kotlin.serialization)
|
||||
alias(libs.plugins.sqldelight)
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "tachiyomi.data"
|
||||
|
||||
defaultConfig {
|
||||
consumerProguardFiles("consumer-rules.pro")
|
||||
}
|
||||
|
||||
sqldelight {
|
||||
databases {
|
||||
create("Database") {
|
||||
|
||||
Vendored
-21
@@ -1,21 +0,0 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
@@ -1,16 +1,12 @@
|
||||
plugins {
|
||||
id("mihon.library")
|
||||
kotlin("android")
|
||||
kotlin("plugin.serialization")
|
||||
alias(mihonx.plugins.android.library)
|
||||
alias(mihonx.plugins.spotless)
|
||||
|
||||
alias(libs.plugins.kotlin.serialization)
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "tachiyomi.domain"
|
||||
|
||||
defaultConfig {
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
consumerProguardFiles("consumer-rules.pro")
|
||||
}
|
||||
}
|
||||
|
||||
kotlin {
|
||||
|
||||
Vendored
-21
@@ -1,21 +0,0 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
@@ -0,0 +1,75 @@
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.jvm)
|
||||
alias(libs.plugins.kotlin.samWithReceiver)
|
||||
alias(libs.plugins.spotless)
|
||||
`java-gradle-plugin`
|
||||
}
|
||||
|
||||
// Configuration should be synced with [/gradle/build-logic/src/main/kotlin/PluginSpotless.kt]
|
||||
val ktlintVersion = libs.ktlint.bom.get().version
|
||||
val editorConfigFile = rootProject.file("../../.editorconfig")
|
||||
spotless {
|
||||
kotlin {
|
||||
target("src/**/*.kt")
|
||||
ktlint(ktlintVersion).setEditorConfigPath(editorConfigFile)
|
||||
trimTrailingWhitespace()
|
||||
endWithNewline()
|
||||
}
|
||||
|
||||
kotlinGradle {
|
||||
target("*.kts")
|
||||
ktlint(ktlintVersion).setEditorConfigPath(editorConfigFile)
|
||||
trimTrailingWhitespace()
|
||||
endWithNewline()
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly(gradleKotlinDsl())
|
||||
compileOnly(libs.android.gradle)
|
||||
compileOnly(libs.kotlin.compose.compiler.gradle)
|
||||
compileOnly(libs.kotlin.gradle)
|
||||
implementation(libs.spotless.gradle)
|
||||
implementation(libs.tapmoc.gradle)
|
||||
|
||||
// These allow us to reference the dependency catalog inside our compiled plugins
|
||||
compileOnly(files(libs::class.java.superclass.protectionDomain.codeSource.location))
|
||||
compileOnly(files(mihonx::class.java.superclass.protectionDomain.codeSource.location))
|
||||
}
|
||||
|
||||
samWithReceiver {
|
||||
annotation("org.gradle.api.HasImplicitReceiver")
|
||||
}
|
||||
|
||||
gradlePlugin {
|
||||
plugins {
|
||||
register("android-application") {
|
||||
id = mihonx.plugins.android.application.get().pluginId
|
||||
implementationClass = "PluginAndroidApplication"
|
||||
}
|
||||
register("android-base") {
|
||||
id = mihonx.plugins.android.base.get().pluginId
|
||||
implementationClass = "PluginAndroidBase"
|
||||
}
|
||||
register("android-library") {
|
||||
id = mihonx.plugins.android.library.get().pluginId
|
||||
implementationClass = "PluginAndroidLibrary"
|
||||
}
|
||||
register("android-test") {
|
||||
id = mihonx.plugins.android.test.get().pluginId
|
||||
implementationClass = "PluginAndroidTest"
|
||||
}
|
||||
register("compose-android") {
|
||||
id = mihonx.plugins.compose.get().pluginId
|
||||
implementationClass = "PluginComposeAndroid"
|
||||
}
|
||||
register("kotlin-multiplatform") {
|
||||
id = mihonx.plugins.kotlin.multiplatform.get().pluginId
|
||||
implementationClass = "PluginKotlinMultiplatform"
|
||||
}
|
||||
register("spotless") {
|
||||
id = mihonx.plugins.spotless.get().pluginId
|
||||
implementationClass = "PluginSpotless"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
dependencyResolutionManagement {
|
||||
@Suppress("UnstableApiUsage")
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
}
|
||||
versionCatalogs {
|
||||
create("libs") {
|
||||
from(files("../libs.versions.toml"))
|
||||
}
|
||||
create("mihonx") {
|
||||
from(files("../mihon.versions.toml"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.name = "build-logic"
|
||||
@@ -0,0 +1,16 @@
|
||||
import mihon.gradle.extensions.alias
|
||||
import mihon.gradle.extensions.libs
|
||||
import mihon.gradle.extensions.mihonx
|
||||
import mihon.gradle.extensions.plugins
|
||||
import org.gradle.api.Plugin
|
||||
import org.gradle.api.Project
|
||||
|
||||
@Suppress("UNUSED")
|
||||
class PluginAndroidApplication : Plugin<Project> {
|
||||
override fun apply(target: Project): Unit = with(target) {
|
||||
plugins {
|
||||
alias(libs.plugins.android.application)
|
||||
alias(mihonx.plugins.android.base)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
import mihon.gradle.configurations.configureAndroid
|
||||
import mihon.gradle.configurations.configureKotlin
|
||||
import mihon.gradle.extensions.alias
|
||||
import mihon.gradle.extensions.configureTest
|
||||
import mihon.gradle.extensions.libs
|
||||
import mihon.gradle.extensions.plugins
|
||||
import org.gradle.api.Plugin
|
||||
import org.gradle.api.Project
|
||||
|
||||
@Suppress("UNUSED")
|
||||
class PluginAndroidBase : Plugin<Project> {
|
||||
override fun apply(target: Project): Unit = with(target) {
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.android)
|
||||
}
|
||||
|
||||
configureKotlin()
|
||||
configureTest()
|
||||
configureAndroid()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
import mihon.gradle.extensions.alias
|
||||
import mihon.gradle.extensions.libs
|
||||
import mihon.gradle.extensions.mihonx
|
||||
import mihon.gradle.extensions.plugins
|
||||
import org.gradle.api.Plugin
|
||||
import org.gradle.api.Project
|
||||
|
||||
@Suppress("UNUSED")
|
||||
class PluginAndroidLibrary : Plugin<Project> {
|
||||
override fun apply(target: Project): Unit = with(target) {
|
||||
plugins {
|
||||
alias(libs.plugins.android.library)
|
||||
alias(mihonx.plugins.android.base)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
import mihon.gradle.extensions.alias
|
||||
import mihon.gradle.extensions.libs
|
||||
import mihon.gradle.extensions.mihonx
|
||||
import mihon.gradle.extensions.plugins
|
||||
import org.gradle.api.Plugin
|
||||
import org.gradle.api.Project
|
||||
|
||||
@Suppress("UNUSED")
|
||||
class PluginAndroidTest : Plugin<Project> {
|
||||
override fun apply(target: Project): Unit = with(target) {
|
||||
plugins {
|
||||
alias(libs.plugins.android.test)
|
||||
alias(mihonx.plugins.android.base)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
import mihon.gradle.extensions.alias
|
||||
import mihon.gradle.extensions.android
|
||||
import mihon.gradle.extensions.api
|
||||
import mihon.gradle.extensions.debugApi
|
||||
import mihon.gradle.extensions.implementation
|
||||
import mihon.gradle.extensions.libs
|
||||
import mihon.gradle.extensions.plugins
|
||||
import org.gradle.api.Plugin
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.kotlin.dsl.dependencies
|
||||
|
||||
@Suppress("UNUSED")
|
||||
class PluginComposeAndroid : Plugin<Project> {
|
||||
override fun apply(target: Project): Unit = with(target) {
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.compose.compiler)
|
||||
}
|
||||
|
||||
android {
|
||||
buildFeatures {
|
||||
compose = true
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(platform(libs.androidx.compose.bom))
|
||||
|
||||
// Compose @Preview tooling
|
||||
api(libs.androidx.compose.uiToolingPreview)
|
||||
debugApi(libs.androidx.compose.uiTooling)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
import mihon.gradle.configurations.configureAndroid
|
||||
import mihon.gradle.configurations.configureKotlin
|
||||
import mihon.gradle.extensions.alias
|
||||
import mihon.gradle.extensions.configureTest
|
||||
import mihon.gradle.extensions.libs
|
||||
import mihon.gradle.extensions.plugins
|
||||
import org.gradle.api.Plugin
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.kotlin.dsl.configure
|
||||
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
|
||||
import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension
|
||||
|
||||
@Suppress("UNUSED")
|
||||
class PluginKotlinMultiplatform : Plugin<Project> {
|
||||
override fun apply(target: Project): Unit = with(target) {
|
||||
plugins {
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.kotlin.multiplatform)
|
||||
}
|
||||
|
||||
configureKotlin()
|
||||
configureTest()
|
||||
configureAndroid()
|
||||
|
||||
kotlin {
|
||||
@OptIn(ExperimentalKotlinGradlePluginApi::class)
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
androidTarget()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun Project.kotlin(block: KotlinMultiplatformExtension.() -> Unit) {
|
||||
extensions.configure(block)
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
import com.diffplug.gradle.spotless.SpotlessExtension
|
||||
import mihon.gradle.extensions.alias
|
||||
import mihon.gradle.extensions.libs
|
||||
import mihon.gradle.extensions.plugins
|
||||
import org.gradle.api.Plugin
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.kotlin.dsl.configure
|
||||
|
||||
@Suppress("UNUSED")
|
||||
class PluginSpotless : Plugin<Project> {
|
||||
override fun apply(target: Project): Unit = with(target) {
|
||||
plugins {
|
||||
alias(libs.plugins.spotless)
|
||||
}
|
||||
|
||||
// Configuration should be synced with [/gradle/build-logic/build.gradle.kts]
|
||||
val ktlintVersion = libs.ktlint.bom.get().version
|
||||
spotless {
|
||||
kotlin {
|
||||
target("src/**/*.kt")
|
||||
ktlint(ktlintVersion)
|
||||
trimTrailingWhitespace()
|
||||
endWithNewline()
|
||||
}
|
||||
|
||||
kotlinGradle {
|
||||
target("*.kts")
|
||||
ktlint(ktlintVersion)
|
||||
trimTrailingWhitespace()
|
||||
endWithNewline()
|
||||
}
|
||||
|
||||
format("xml") {
|
||||
target("src/**/*.xml")
|
||||
trimTrailingWhitespace()
|
||||
endWithNewline()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun Project.spotless(block: SpotlessExtension.() -> Unit) {
|
||||
extensions.configure(block)
|
||||
}
|
||||
+10
-10
@@ -1,4 +1,4 @@
|
||||
package mihon.buildlogic
|
||||
package mihon.gradle
|
||||
|
||||
import org.gradle.api.Project
|
||||
import java.time.Instant
|
||||
@@ -8,33 +8,33 @@ import java.time.format.DateTimeFormatter
|
||||
|
||||
// Git is needed in your system PATH for these commands to work.
|
||||
// If it's not installed, you can return a random value as a workaround
|
||||
fun Project.getCommitCount(): String {
|
||||
return runCommand("git rev-list --count HEAD")
|
||||
fun Project.getLatestCommitCount(): String {
|
||||
return exec("git rev-list --count HEAD")
|
||||
// return "1"
|
||||
}
|
||||
|
||||
fun Project.getGitSha(): String {
|
||||
return runCommand("git rev-parse --short HEAD")
|
||||
fun Project.getLatestCommitSha(): String {
|
||||
return exec("git rev-parse --short HEAD")
|
||||
// return "1"
|
||||
}
|
||||
|
||||
private val BUILD_TIME_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss'Z'")
|
||||
|
||||
/**
|
||||
* @param useLastCommitTime If `true`, the build time is based on the timestamp of the last Git commit;
|
||||
* @param useLatestCommitTime If `true`, the build time is based on the timestamp of the last Git commit;
|
||||
* otherwise, the current time is used. Both are in UTC.
|
||||
* @return A formatted string representing the build time. The format used is defined by [BUILD_TIME_FORMATTER].
|
||||
*/
|
||||
fun Project.getBuildTime(useLastCommitTime: Boolean): String {
|
||||
return if (useLastCommitTime) {
|
||||
val epoch = runCommand("git log -1 --format=%ct").toLong()
|
||||
fun Project.getBuildTime(useLatestCommitTime: Boolean): String {
|
||||
return if (useLatestCommitTime) {
|
||||
val epoch = exec("git log -1 --format=%ct").toLong()
|
||||
Instant.ofEpochSecond(epoch).atOffset(ZoneOffset.UTC).format(BUILD_TIME_FORMATTER)
|
||||
} else {
|
||||
LocalDateTime.now(ZoneOffset.UTC).format(BUILD_TIME_FORMATTER)
|
||||
}
|
||||
}
|
||||
|
||||
private fun Project.runCommand(command: String): String {
|
||||
fun Project.exec(command: String): String {
|
||||
return providers.exec {
|
||||
commandLine = command.split(" ")
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package mihon.gradle.configurations
|
||||
|
||||
import com.android.build.api.dsl.ApplicationDefaultConfig
|
||||
import mihon.gradle.extensions.android
|
||||
import mihon.gradle.extensions.coreLibraryDesugaring
|
||||
import mihon.gradle.extensions.libs
|
||||
import mihon.gradle.extensions.mihonx
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.kotlin.dsl.dependencies
|
||||
|
||||
fun Project.configureAndroid() {
|
||||
android {
|
||||
defaultConfig {
|
||||
minSdk = mihonx.versions.android.sdk.min.get().toInt()
|
||||
if (this is ApplicationDefaultConfig) {
|
||||
targetSdk = mihonx.versions.android.sdk.target.get().toInt()
|
||||
}
|
||||
|
||||
ndkVersion = mihonx.versions.android.ndk.get()
|
||||
}
|
||||
|
||||
compileSdk = mihonx.versions.android.sdk.compile.get().toInt()
|
||||
|
||||
compileOptions {
|
||||
isCoreLibraryDesugaringEnabled = true
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
coreLibraryDesugaring(libs.android.desugar)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package mihon.gradle.configurations
|
||||
|
||||
import mihon.gradle.extensions.mihonx
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.kotlin.dsl.configure
|
||||
import org.jetbrains.kotlin.gradle.dsl.HasConfigurableKotlinCompilerOptions
|
||||
import org.jetbrains.kotlin.gradle.dsl.KotlinBaseExtension
|
||||
import org.jetbrains.kotlin.gradle.dsl.KotlinCommonCompilerOptions
|
||||
import tapmoc.configureJavaCompatibility
|
||||
|
||||
fun Project.configureKotlin() {
|
||||
configureJavaCompatibility(mihonx.versions.java.get().toInt())
|
||||
|
||||
kotlin {
|
||||
compilerOptions {
|
||||
freeCompilerArgs.add("-Xcontext-parameters")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun Project.kotlin(block: KotlinBaseExtension.() -> Unit) {
|
||||
extensions.configure(block)
|
||||
}
|
||||
|
||||
private fun KotlinBaseExtension.compilerOptions(block: KotlinCommonCompilerOptions.() -> Unit) {
|
||||
if (this is HasConfigurableKotlinCompilerOptions<*>) compilerOptions(block)
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package mihon.gradle.extensions
|
||||
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.artifacts.ExternalModuleDependencyBundle
|
||||
import org.gradle.api.artifacts.MinimalExternalModuleDependency
|
||||
import org.gradle.api.provider.Provider
|
||||
import org.gradle.kotlin.dsl.DependencyHandlerScope
|
||||
|
||||
fun DependencyHandlerScope.api(dependencyNotation: Provider<MinimalExternalModuleDependency>) {
|
||||
add("api", dependencyNotation)
|
||||
}
|
||||
|
||||
fun DependencyHandlerScope.coreLibraryDesugaring(dependencyNotation: Provider<MinimalExternalModuleDependency>) {
|
||||
add("coreLibraryDesugaring", dependencyNotation)
|
||||
}
|
||||
|
||||
fun DependencyHandlerScope.debugApi(dependencyNotation: Provider<MinimalExternalModuleDependency>) {
|
||||
add("debugApi", dependencyNotation)
|
||||
}
|
||||
|
||||
@JvmName("implementationBundle")
|
||||
fun DependencyHandlerScope.implementation(dependencyNotation: Provider<ExternalModuleDependencyBundle>) {
|
||||
add("implementation", dependencyNotation)
|
||||
}
|
||||
|
||||
fun DependencyHandlerScope.implementation(dependencyNotation: Provider<MinimalExternalModuleDependency>) {
|
||||
add("implementation", dependencyNotation)
|
||||
}
|
||||
|
||||
fun DependencyHandlerScope.implementation(dependencyNotation: Project) {
|
||||
add("implementation", dependencyNotation)
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package mihon.gradle.extensions
|
||||
|
||||
import org.gradle.api.plugins.PluginManager
|
||||
import org.gradle.api.provider.Provider
|
||||
import org.gradle.plugin.use.PluginDependency
|
||||
|
||||
fun PluginManager.alias(notation: Provider<PluginDependency>) {
|
||||
apply(notation.get().pluginId)
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package mihon.gradle.extensions
|
||||
|
||||
import com.android.build.api.dsl.CommonExtension
|
||||
import com.android.build.gradle.BaseExtension
|
||||
import org.gradle.accessors.dm.LibrariesForLibs
|
||||
import org.gradle.accessors.dm.LibrariesForMihonx
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.plugins.PluginManager
|
||||
import org.gradle.api.tasks.testing.Test
|
||||
import org.gradle.api.tasks.testing.logging.TestLogEvent
|
||||
import org.gradle.kotlin.dsl.configure
|
||||
import org.gradle.kotlin.dsl.the
|
||||
import org.gradle.kotlin.dsl.withType
|
||||
|
||||
internal val Project.libs get() = the<LibrariesForLibs>()
|
||||
internal val Project.mihonx get() = the<LibrariesForMihonx>()
|
||||
|
||||
internal fun Project.plugins(block: PluginManager.() -> Unit) {
|
||||
pluginManager.apply(block)
|
||||
}
|
||||
|
||||
internal fun Project.android(block: CommonExtension<*, *, *, *, *, *>.() -> Unit) {
|
||||
extensions.configure<BaseExtension> {
|
||||
if (this is CommonExtension<*, *, *, *, *, *>) apply(block)
|
||||
}
|
||||
}
|
||||
|
||||
fun Project.configureTest() {
|
||||
tasks.withType<Test> {
|
||||
useJUnitPlatform()
|
||||
testLogging {
|
||||
events(TestLogEvent.PASSED, TestLogEvent.SKIPPED, TestLogEvent.FAILED)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package mihon.gradle.tasks
|
||||
|
||||
import org.gradle.api.DefaultTask
|
||||
import org.gradle.api.file.DirectoryProperty
|
||||
import org.gradle.api.tasks.OutputDirectory
|
||||
import org.gradle.api.tasks.TaskAction
|
||||
|
||||
abstract class GenerateLocalesConfigTask : DefaultTask() {
|
||||
|
||||
@get:OutputDirectory
|
||||
abstract val outputDir: DirectoryProperty
|
||||
|
||||
@TaskAction
|
||||
fun action() {
|
||||
val locales = project.fileTree("src/commonMain/moko-resources") {
|
||||
matching { include("**/strings.xml") }
|
||||
}
|
||||
.asSequence()
|
||||
.filterNot { it.readText().contains(emptyResourcesElement) }
|
||||
.map {
|
||||
it.parentFile.name
|
||||
.replace("base", "en")
|
||||
.replace("-r", "-")
|
||||
.replace("+", "-")
|
||||
}
|
||||
.distinct()
|
||||
.sorted()
|
||||
.joinToString("\n") { "| <locale android:name=\"$it\"/>" }
|
||||
|
||||
val content = """
|
||||
|<?xml version="1.0" encoding="utf-8"?>
|
||||
|<locale-config xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
$locales
|
||||
|</locale-config>
|
||||
""".trimMargin()
|
||||
|
||||
outputDir.get().file("xml/locales_config.xml").asFile.apply {
|
||||
parentFile.mkdirs()
|
||||
writeText(content)
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
private val emptyResourcesElement = "<resources>\\s*</resources>|<resources\\s*/>".toRegex()
|
||||
}
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
package mihon.gradle.tasks
|
||||
|
||||
import org.gradle.api.DefaultTask
|
||||
import org.gradle.api.file.DirectoryProperty
|
||||
import org.gradle.api.file.RegularFileProperty
|
||||
import org.gradle.api.provider.Property
|
||||
import org.gradle.api.tasks.Input
|
||||
import org.gradle.api.tasks.InputFile
|
||||
import org.gradle.api.tasks.OutputDirectory
|
||||
import org.gradle.api.tasks.TaskAction
|
||||
|
||||
abstract class ReplaceShortcutsPlaceholderTask : DefaultTask() {
|
||||
|
||||
@get:Input
|
||||
abstract val applicationId: Property<String>
|
||||
|
||||
@get:InputFile
|
||||
abstract val shortcutsFile: RegularFileProperty
|
||||
|
||||
@get:OutputDirectory
|
||||
abstract val outputDir: DirectoryProperty
|
||||
|
||||
@TaskAction
|
||||
fun action() {
|
||||
val content = shortcutsFile.asFile.get()
|
||||
.readText()
|
||||
.replace($$"${applicationId}", applicationId.get())
|
||||
|
||||
outputDir.get().file("xml/shortcuts.xml").asFile.apply {
|
||||
parentFile.mkdirs()
|
||||
writeText(content)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,6 @@
|
||||
aboutLibraries = "13.2.1"
|
||||
android-desugar = "2.1.5"
|
||||
android-gradle = "8.13.2"
|
||||
android-shortcut = "0.1.2"
|
||||
androidx-activity-compose = "1.13.0"
|
||||
androidx-annotation = "1.9.1"
|
||||
androidx-appCompat = "1.7.1"
|
||||
@@ -68,6 +67,7 @@ sqldelight-androidx-driver = "0.0.17"
|
||||
stringSimilarity = "0.1.0"
|
||||
subsamplingScaleImageView = "66e0db195d"
|
||||
swipe = "1.3.0"
|
||||
tapmoc = "0.4.0"
|
||||
unifile = "e0def6b3dc"
|
||||
voyager = "1.1.0-beta03"
|
||||
xmlutil = "0.91.3"
|
||||
@@ -76,7 +76,6 @@ xmlutil = "0.91.3"
|
||||
aboutLibraries-compose = { module = "com.mikepenz:aboutlibraries-compose-m3", version.ref = "aboutLibraries" }
|
||||
android-desugar = { module = "com.android.tools:desugar_jdk_libs", version.ref = "android-desugar" }
|
||||
android-gradle = { module = "com.android.tools.build:gradle", version.ref = "android-gradle" }
|
||||
android-shortcut-gradle = { module = "com.github.zellius:android-shortcut-gradle-plugin", version.ref = "android-shortcut" }
|
||||
androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "androidx-activity-compose" }
|
||||
androidx-annotation = { module = "androidx.annotation:annotation", version.ref = "androidx-annotation" }
|
||||
androidx-appCompat = { module = "androidx.appcompat:appcompat", version.ref = "androidx-appCompat" }
|
||||
@@ -176,6 +175,7 @@ sqldelight-sqliteDialect338 = { module = "app.cash.sqldelight:sqlite-3-38-dialec
|
||||
stringSimilarity = { module = "com.aallam.similarity:string-similarity-kotlin", version.ref = "stringSimilarity" }
|
||||
subsamplingScaleImageView = { module = "com.github.tachiyomiorg:subsampling-scale-image-view", version.ref = "subsamplingScaleImageView" }
|
||||
swipe = { module = "me.saket.swipe:swipe", version.ref = "swipe" }
|
||||
tapmoc-gradle = { module = "com.gradleup.tapmoc:tapmoc-gradle-plugin", version.ref = "tapmoc" }
|
||||
unifile = { module = "com.github.tachiyomiorg:unifile", version.ref = "unifile" }
|
||||
voyager-navigator = { module = "cafe.adriel.voyager:voyager-navigator", version.ref = "voyager" }
|
||||
voyager-screenModel = { module = "cafe.adriel.voyager:voyager-screenmodel", version.ref = "voyager" }
|
||||
@@ -186,12 +186,19 @@ xmlutil-serialization = { module = "io.github.pdvrieze.xmlutil:serialization", v
|
||||
|
||||
[plugins]
|
||||
aboutLibraries = { id = "com.mikepenz.aboutlibraries.plugin.android", version.ref = "aboutLibraries" }
|
||||
android-application = { id = "com.android.application", version.ref = "android-gradle" }
|
||||
android-library = { id = "com.android.library", version.ref = "android-gradle" }
|
||||
android-test = { id = "com.android.test", version.ref = "android-gradle" }
|
||||
firebase-crashlytics = { id = "com.google.firebase.crashlytics", version.ref = "firebase-crashlytics" }
|
||||
google-services = { id = "com.google.gms.google-services", version.ref = "google-services" }
|
||||
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin-gradle" }
|
||||
kotlin-compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin-gradle" }
|
||||
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin-gradle" }
|
||||
kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin-gradle" }
|
||||
kotlin-samWithReceiver = { id = "org.jetbrains.kotlin.plugin.sam.with.receiver", version.ref = "kotlin-gradle" }
|
||||
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin-gradle" }
|
||||
moko-resources = { id = "dev.icerock.mobile.multiplatform-resources", version.ref = "moko-resources" }
|
||||
spotless = { id = "com.diffplug.spotless", version.ref = "spotless" }
|
||||
sqldelight = { id = "app.cash.sqldelight", version.ref = "sqldelight" }
|
||||
|
||||
[bundles]
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
[versions]
|
||||
# Used in [/gradle/build-config/src/main/kotlin/PluginKotlinMultiplatform.kt]
|
||||
android-sdk-min = "23"
|
||||
android-sdk-compile = "36"
|
||||
android-sdk-target = "36"
|
||||
android-ndk = "29.0.14206865"
|
||||
java = "17"
|
||||
|
||||
[plugins]
|
||||
android-application = { id = "mihon.plugins.android.application" }
|
||||
android-base = { id = "mihon.plugins.android.base" }
|
||||
android-library = { id = "mihon.plugins.android.library" }
|
||||
android-test = { id = "mihon.plugins.android.test" }
|
||||
compose = { id = "mihon.plugins.compose.android" }
|
||||
kotlin-multiplatform = { id = "mihon.plugins.kotlin.multiplatform" }
|
||||
spotless = { id = "mihon.plugins.spotless" }
|
||||
+23
-26
@@ -1,35 +1,38 @@
|
||||
import mihon.gradle.tasks.GenerateLocalesConfigTask
|
||||
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
|
||||
|
||||
plugins {
|
||||
id("mihon.library")
|
||||
kotlin("multiplatform")
|
||||
alias(mihonx.plugins.kotlin.multiplatform)
|
||||
alias(mihonx.plugins.spotless)
|
||||
|
||||
alias(libs.plugins.moko.resources)
|
||||
id("com.github.ben-manes.versions")
|
||||
}
|
||||
|
||||
kotlin {
|
||||
androidTarget()
|
||||
android {
|
||||
namespace = "tachiyomi.i18n.sy"
|
||||
}
|
||||
|
||||
applyDefaultHierarchyTemplate()
|
||||
@OptIn(ExperimentalKotlinGradlePluginApi::class)
|
||||
@Suppress("UnstableApiUsage")
|
||||
dependencies {
|
||||
api(libs.moko.resources)
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
commonMain {
|
||||
dependencies {
|
||||
api(libs.moko.resources)
|
||||
}
|
||||
}
|
||||
@OptIn(ExperimentalKotlinGradlePluginApi::class)
|
||||
compilerOptions {
|
||||
freeCompilerArgs.add("-Xexpect-actual-classes")
|
||||
}
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "tachiyomi.i18n.sy"
|
||||
androidComponents {
|
||||
onVariants { variant ->
|
||||
val resSource = variant.sources.res ?: return@onVariants
|
||||
|
||||
sourceSets {
|
||||
named("main") {
|
||||
res.srcDir("src/commonMain/resources")
|
||||
}
|
||||
}
|
||||
|
||||
lint {
|
||||
disable.addAll(listOf("MissingTranslation", "ExtraTranslation"))
|
||||
val variantName = variant.name.replaceFirstChar { it.uppercase() }
|
||||
val task = tasks.register<GenerateLocalesConfigTask>("generate${variantName}LocalesConfig")
|
||||
resSource.addGeneratedSourceDirectory(task) { it.outputDir }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,9 +40,3 @@ multiplatformResources {
|
||||
resourcesClassName.set("SYMR")
|
||||
resourcesPackage.set("tachiyomi.i18n.sy")
|
||||
}
|
||||
|
||||
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
|
||||
compilerOptions.freeCompilerArgs.addAll(
|
||||
"-Xexpect-actual-classes",
|
||||
)
|
||||
}
|
||||
|
||||
+17
-34
@@ -1,25 +1,23 @@
|
||||
import mihon.buildlogic.generatedBuildDir
|
||||
import mihon.buildlogic.tasks.getLocalesConfigTask
|
||||
import mihon.gradle.tasks.GenerateLocalesConfigTask
|
||||
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
|
||||
|
||||
plugins {
|
||||
id("mihon.library")
|
||||
kotlin("multiplatform")
|
||||
alias(mihonx.plugins.kotlin.multiplatform)
|
||||
alias(mihonx.plugins.spotless)
|
||||
|
||||
alias(libs.plugins.moko.resources)
|
||||
id("com.github.ben-manes.versions")
|
||||
}
|
||||
|
||||
kotlin {
|
||||
androidTarget()
|
||||
android {
|
||||
namespace = "tachiyomi.i18n"
|
||||
}
|
||||
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
sourceSets {
|
||||
commonMain {
|
||||
dependencies {
|
||||
api(libs.moko.resources)
|
||||
}
|
||||
}
|
||||
@OptIn(ExperimentalKotlinGradlePluginApi::class)
|
||||
@Suppress("UnstableApiUsage")
|
||||
dependencies {
|
||||
api(libs.moko.resources)
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalKotlinGradlePluginApi::class)
|
||||
@@ -28,31 +26,16 @@ kotlin {
|
||||
}
|
||||
}
|
||||
|
||||
val generatedAndroidResourceDir = generatedBuildDir.resolve("android/res")
|
||||
androidComponents {
|
||||
onVariants { variant ->
|
||||
val resSource = variant.sources.res ?: return@onVariants
|
||||
|
||||
android {
|
||||
namespace = "tachiyomi.i18n"
|
||||
|
||||
sourceSets {
|
||||
val main by getting
|
||||
main.res.srcDirs(
|
||||
"src/commonMain/resources",
|
||||
generatedAndroidResourceDir,
|
||||
)
|
||||
}
|
||||
|
||||
lint {
|
||||
disable.addAll(listOf("MissingTranslation", "ExtraTranslation"))
|
||||
val variantName = variant.name.replaceFirstChar { it.uppercase() }
|
||||
val task = tasks.register<GenerateLocalesConfigTask>("generate${variantName}LocalesConfig")
|
||||
resSource.addGeneratedSourceDirectory(task) { it.outputDir }
|
||||
}
|
||||
}
|
||||
|
||||
multiplatformResources {
|
||||
resourcesPackage.set("tachiyomi.i18n")
|
||||
}
|
||||
|
||||
tasks {
|
||||
val localesConfigTask = project.getLocalesConfigTask(generatedAndroidResourceDir)
|
||||
preBuild {
|
||||
dependsOn(localesConfigTask)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,4 +101,4 @@
|
||||
<item quantity="two">מחרותיים</item>
|
||||
<item quantity="other">בעוד %1$d ימים</item>
|
||||
</plurals>
|
||||
</resources>
|
||||
</resources>
|
||||
|
||||
@@ -64,4 +64,4 @@
|
||||
<item quantity="one">Ертең</item>
|
||||
<item quantity="other">%1$d күнде</item>
|
||||
</plurals>
|
||||
</resources>
|
||||
</resources>
|
||||
|
||||
@@ -114,4 +114,4 @@
|
||||
<item quantity="many">%1$s stron</item>
|
||||
<item quantity="other">%1$s stron</item>
|
||||
</plurals>
|
||||
</resources>
|
||||
</resources>
|
||||
|
||||
@@ -76,4 +76,4 @@
|
||||
<item quantity="one">%1$s अध्यायः नास्ति</item>
|
||||
<item quantity="other">%1$s अध्यायाः न सन्ति</item>
|
||||
</plurals>
|
||||
</resources>
|
||||
</resources>
|
||||
|
||||
@@ -76,4 +76,4 @@
|
||||
<item quantity="one">1 pàgina</item>
|
||||
<item quantity="other">%1$s pàginas</item>
|
||||
</plurals>
|
||||
</resources>
|
||||
</resources>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
</resources>
|
||||
</resources>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id("mihon.benchmark")
|
||||
alias(mihonx.plugins.android.test)
|
||||
}
|
||||
|
||||
android {
|
||||
|
||||
@@ -1,16 +1,12 @@
|
||||
plugins {
|
||||
id("mihon.library")
|
||||
id("mihon.library.compose")
|
||||
kotlin("android")
|
||||
alias(mihonx.plugins.android.library)
|
||||
alias(mihonx.plugins.compose)
|
||||
|
||||
alias(mihonx.plugins.spotless)
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "tachiyomi.presentation.core"
|
||||
|
||||
defaultConfig {
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
consumerProguardFiles("consumer-rules.pro")
|
||||
}
|
||||
}
|
||||
|
||||
kotlin {
|
||||
|
||||
Vendored
-21
@@ -1,21 +0,0 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
@@ -1,16 +1,12 @@
|
||||
plugins {
|
||||
id("mihon.library")
|
||||
id("mihon.library.compose")
|
||||
kotlin("android")
|
||||
alias(mihonx.plugins.android.library)
|
||||
alias(mihonx.plugins.compose)
|
||||
|
||||
alias(mihonx.plugins.spotless)
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "tachiyomi.presentation.widget"
|
||||
|
||||
defaultConfig {
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
consumerProguardFiles("consumer-rules.pro")
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
-21
@@ -1,21 +0,0 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
+6
-10
@@ -1,30 +1,26 @@
|
||||
pluginManagement {
|
||||
resolutionStrategy {
|
||||
eachPlugin {
|
||||
val regex = "com.android.(library|application)".toRegex()
|
||||
if (regex matches requested.id.id) {
|
||||
useModule("com.android.tools.build:gradle:${requested.version}")
|
||||
}
|
||||
}
|
||||
}
|
||||
includeBuild("gradle/build-logic")
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
google()
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
maven(url = "https://www.jitpack.io")
|
||||
}
|
||||
}
|
||||
|
||||
dependencyResolutionManagement {
|
||||
versionCatalogs {
|
||||
create("mihonx") {
|
||||
from(files("gradle/mihon.versions.toml"))
|
||||
}
|
||||
create("sylibs") {
|
||||
from(files("gradle/sy.versions.toml"))
|
||||
}
|
||||
}
|
||||
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
||||
repositories {
|
||||
mavenCentral()
|
||||
google()
|
||||
mavenCentral()
|
||||
maven(url = "https://www.jitpack.io")
|
||||
}
|
||||
}
|
||||
|
||||
+31
-32
@@ -1,39 +1,46 @@
|
||||
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
|
||||
|
||||
plugins {
|
||||
id("mihon.library")
|
||||
kotlin("multiplatform")
|
||||
kotlin("plugin.serialization")
|
||||
alias(mihonx.plugins.kotlin.multiplatform)
|
||||
alias(mihonx.plugins.spotless)
|
||||
|
||||
alias(libs.plugins.kotlin.serialization)
|
||||
|
||||
id("com.github.ben-manes.versions")
|
||||
}
|
||||
|
||||
kotlin {
|
||||
androidTarget()
|
||||
sourceSets {
|
||||
val commonMain by getting {
|
||||
dependencies {
|
||||
api(libs.kotlinx.serialization.json)
|
||||
api(libs.injekt)
|
||||
api(libs.rxJava)
|
||||
api(libs.jsoup)
|
||||
android {
|
||||
namespace = "eu.kanade.tachiyomi.source"
|
||||
|
||||
implementation(project.dependencies.platform(libs.androidx.compose.bom))
|
||||
implementation(libs.androidx.compose.runtime)
|
||||
|
||||
// SY -->
|
||||
api(projects.i18n)
|
||||
api(projects.i18nSy)
|
||||
api(libs.kotlin.reflect)
|
||||
// SY <--
|
||||
}
|
||||
defaultConfig {
|
||||
consumerProguardFile("consumer-proguard.pro")
|
||||
}
|
||||
val androidMain by getting {
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalKotlinGradlePluginApi::class)
|
||||
@Suppress("UnstableApiUsage")
|
||||
dependencies {
|
||||
api(libs.kotlinx.serialization.json)
|
||||
api(libs.injekt)
|
||||
api(libs.rxJava)
|
||||
api(libs.jsoup)
|
||||
|
||||
implementation(platform(libs.androidx.compose.bom))
|
||||
implementation(libs.androidx.compose.runtime)
|
||||
|
||||
// SY -->
|
||||
api(projects.i18n)
|
||||
api(projects.i18nSy)
|
||||
api(libs.kotlin.reflect)
|
||||
// SY <--
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
androidMain {
|
||||
dependencies {
|
||||
implementation(projects.core.common)
|
||||
api(libs.androidx.preference)
|
||||
|
||||
// Workaround for https://youtrack.jetbrains.com/issue/KT-57605
|
||||
implementation(libs.kotlinx.coroutines.android)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -43,11 +50,3 @@ kotlin {
|
||||
freeCompilerArgs.add("-Xexpect-actual-classes")
|
||||
}
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "eu.kanade.tachiyomi.source"
|
||||
|
||||
defaultConfig {
|
||||
consumerProguardFile("consumer-proguard.pro")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,25 +1,29 @@
|
||||
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
|
||||
|
||||
plugins {
|
||||
id("mihon.library")
|
||||
kotlin("multiplatform")
|
||||
alias(mihonx.plugins.kotlin.multiplatform)
|
||||
alias(mihonx.plugins.spotless)
|
||||
}
|
||||
|
||||
kotlin {
|
||||
androidTarget()
|
||||
sourceSets {
|
||||
val commonMain by getting {
|
||||
dependencies {
|
||||
implementation(projects.sourceApi)
|
||||
api(projects.i18n)
|
||||
// SY -->
|
||||
api(projects.i18nSy)
|
||||
// SY <--
|
||||
android {
|
||||
namespace = "tachiyomi.source.local"
|
||||
}
|
||||
|
||||
implementation(libs.unifile)
|
||||
}
|
||||
}
|
||||
val androidMain by getting {
|
||||
@OptIn(ExperimentalKotlinGradlePluginApi::class)
|
||||
@Suppress("UnstableApiUsage")
|
||||
dependencies {
|
||||
implementation(projects.sourceApi)
|
||||
api(projects.i18n)
|
||||
// SY -->
|
||||
api(projects.i18nSy)
|
||||
// SY <--
|
||||
|
||||
implementation(libs.unifile)
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
androidMain {
|
||||
dependencies {
|
||||
implementation(projects.core.common)
|
||||
implementation(projects.coreMetadata)
|
||||
@@ -40,12 +44,3 @@ kotlin {
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "tachiyomi.source.local"
|
||||
|
||||
defaultConfig {
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
consumerProguardFiles("consumer-rules.pro")
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
-21
@@ -1,21 +0,0 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
Reference in New Issue
Block a user