From 1b73235d3aa5b64807b3750744fc0a35433c4af6 Mon Sep 17 00:00:00 2001 From: FourTOne5 <107297513+FourTOne5@users.noreply.github.com> Date: Wed, 21 May 2025 17:17:44 +0600 Subject: [PATCH] Merge :core and :utils (#8927) --- .../src/main/kotlin/lib-multisrc.gradle.kts | 2 +- common.gradle | 1 - core/build.gradle.kts | 18 +++++----- core/{ => src/main}/AndroidManifest.xml | 0 .../kotlin}/keiyoushi/utils/Collections.kt | 0 .../src/main/kotlin}/keiyoushi/utils/Date.kt | 0 .../src/main/kotlin}/keiyoushi/utils/Json.kt | 0 .../kotlin}/keiyoushi/utils/Preferences.kt | 0 .../main}/res/mipmap-hdpi/ic_launcher.png | Bin .../main}/res/mipmap-mdpi/ic_launcher.png | Bin .../main}/res/mipmap-xhdpi/ic_launcher.png | Bin .../main}/res/mipmap-xxhdpi/ic_launcher.png | Bin .../main}/res/mipmap-xxxhdpi/ic_launcher.png | Bin settings.gradle.kts | 1 - utils/build.gradle.kts | 33 ------------------ 15 files changed, 11 insertions(+), 44 deletions(-) rename core/{ => src/main}/AndroidManifest.xml (100%) rename {utils/src => core/src/main/kotlin}/keiyoushi/utils/Collections.kt (100%) rename {utils/src => core/src/main/kotlin}/keiyoushi/utils/Date.kt (100%) rename {utils/src => core/src/main/kotlin}/keiyoushi/utils/Json.kt (100%) rename {utils/src => core/src/main/kotlin}/keiyoushi/utils/Preferences.kt (100%) rename core/{ => src/main}/res/mipmap-hdpi/ic_launcher.png (100%) rename core/{ => src/main}/res/mipmap-mdpi/ic_launcher.png (100%) rename core/{ => src/main}/res/mipmap-xhdpi/ic_launcher.png (100%) rename core/{ => src/main}/res/mipmap-xxhdpi/ic_launcher.png (100%) rename core/{ => src/main}/res/mipmap-xxxhdpi/ic_launcher.png (100%) delete mode 100644 utils/build.gradle.kts diff --git a/buildSrc/src/main/kotlin/lib-multisrc.gradle.kts b/buildSrc/src/main/kotlin/lib-multisrc.gradle.kts index 16f51e489..850cdefba 100644 --- a/buildSrc/src/main/kotlin/lib-multisrc.gradle.kts +++ b/buildSrc/src/main/kotlin/lib-multisrc.gradle.kts @@ -38,7 +38,7 @@ kotlinter { dependencies { compileOnly(versionCatalogs.named("libs").findBundle("common").get()) - implementation(project(":utils")) + implementation(project(":core")) } tasks { diff --git a/common.gradle b/common.gradle index 95c5cf6d3..f916f509a 100644 --- a/common.gradle +++ b/common.gradle @@ -103,7 +103,6 @@ dependencies { if (theme != null) implementation(theme) // Overrides core launcher icons implementation(project(":core")) compileOnly(libs.bundles.common) - implementation(project(":utils")) } tasks.register("writeManifestFile") { diff --git a/core/build.gradle.kts b/core/build.gradle.kts index 459cc69e8..cdd4459bf 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -1,5 +1,6 @@ plugins { id("com.android.library") + kotlin("android") } android { @@ -9,17 +10,18 @@ android { minSdk = AndroidConfig.minSdk } - namespace = "eu.kanade.tachiyomi.extension.core" - - sourceSets { - named("main") { - manifest.srcFile("AndroidManifest.xml") - res.setSrcDirs(listOf("res")) - } - } + namespace = "keiyoushi.core" buildFeatures { resValues = false shaders = false } + + kotlinOptions { + freeCompilerArgs += "-opt-in=kotlinx.serialization.ExperimentalSerializationApi" + } +} + +dependencies { + compileOnly(versionCatalogs.named("libs").findBundle("common").get()) } diff --git a/core/AndroidManifest.xml b/core/src/main/AndroidManifest.xml similarity index 100% rename from core/AndroidManifest.xml rename to core/src/main/AndroidManifest.xml diff --git a/utils/src/keiyoushi/utils/Collections.kt b/core/src/main/kotlin/keiyoushi/utils/Collections.kt similarity index 100% rename from utils/src/keiyoushi/utils/Collections.kt rename to core/src/main/kotlin/keiyoushi/utils/Collections.kt diff --git a/utils/src/keiyoushi/utils/Date.kt b/core/src/main/kotlin/keiyoushi/utils/Date.kt similarity index 100% rename from utils/src/keiyoushi/utils/Date.kt rename to core/src/main/kotlin/keiyoushi/utils/Date.kt diff --git a/utils/src/keiyoushi/utils/Json.kt b/core/src/main/kotlin/keiyoushi/utils/Json.kt similarity index 100% rename from utils/src/keiyoushi/utils/Json.kt rename to core/src/main/kotlin/keiyoushi/utils/Json.kt diff --git a/utils/src/keiyoushi/utils/Preferences.kt b/core/src/main/kotlin/keiyoushi/utils/Preferences.kt similarity index 100% rename from utils/src/keiyoushi/utils/Preferences.kt rename to core/src/main/kotlin/keiyoushi/utils/Preferences.kt diff --git a/core/res/mipmap-hdpi/ic_launcher.png b/core/src/main/res/mipmap-hdpi/ic_launcher.png similarity index 100% rename from core/res/mipmap-hdpi/ic_launcher.png rename to core/src/main/res/mipmap-hdpi/ic_launcher.png diff --git a/core/res/mipmap-mdpi/ic_launcher.png b/core/src/main/res/mipmap-mdpi/ic_launcher.png similarity index 100% rename from core/res/mipmap-mdpi/ic_launcher.png rename to core/src/main/res/mipmap-mdpi/ic_launcher.png diff --git a/core/res/mipmap-xhdpi/ic_launcher.png b/core/src/main/res/mipmap-xhdpi/ic_launcher.png similarity index 100% rename from core/res/mipmap-xhdpi/ic_launcher.png rename to core/src/main/res/mipmap-xhdpi/ic_launcher.png diff --git a/core/res/mipmap-xxhdpi/ic_launcher.png b/core/src/main/res/mipmap-xxhdpi/ic_launcher.png similarity index 100% rename from core/res/mipmap-xxhdpi/ic_launcher.png rename to core/src/main/res/mipmap-xxhdpi/ic_launcher.png diff --git a/core/res/mipmap-xxxhdpi/ic_launcher.png b/core/src/main/res/mipmap-xxxhdpi/ic_launcher.png similarity index 100% rename from core/res/mipmap-xxxhdpi/ic_launcher.png rename to core/src/main/res/mipmap-xxxhdpi/ic_launcher.png diff --git a/settings.gradle.kts b/settings.gradle.kts index 9b77d054f..76b496451 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -8,7 +8,6 @@ loadAllIndividualExtensions() * ===================================== COMMON CONFIGURATION ====================================== */ include(":core") -include(":utils") // Load all modules under /lib File(rootDir, "lib").eachDir { include("lib:${it.name}") } diff --git a/utils/build.gradle.kts b/utils/build.gradle.kts deleted file mode 100644 index 81dd240c5..000000000 --- a/utils/build.gradle.kts +++ /dev/null @@ -1,33 +0,0 @@ -plugins { - id("com.android.library") - kotlin("android") -} - -android { - compileSdk = AndroidConfig.compileSdk - - defaultConfig { - minSdk = AndroidConfig.minSdk - } - - namespace = "keiyoushi.utils" - - sourceSets { - named("main") { - java.setSrcDirs(listOf("src")) - } - } - - buildFeatures { - resValues = false - shaders = false - } - - kotlinOptions { - freeCompilerArgs += "-opt-in=kotlinx.serialization.ExperimentalSerializationApi" - } -} - -dependencies { - compileOnly(versionCatalogs.named("libs").findBundle("common").get()) -}