mirror of
https://github.com/null2264/yokai.git
synced 2025-06-20 18:24:42 +00:00
refactor: Modularize the project (#97)
* refactor: Modularize the project * chore: Move okhttp stuff back to androidMain OkHttp decided to cancel multiplatform plan on 5.0 REF: https://square.github.io/okhttp/changelogs/changelog/#version-500-alpha13 * feat: Start using moko for i18n * fix: Solve some errors * chore: Remove manga from domain module We'll do this later * fix: Duplicate error * fix: Conflict function name error * fix: Target SManga * fix: Breaking changes after the split * fix: Not enough heap memory * chore: Update proguard rules Sorta similar to upstream * refactor: Fix namespace
This commit is contained in:
parent
7e7a37bc53
commit
24ce2683d4
109 changed files with 1146 additions and 308 deletions
2
i18n/.gitignore
vendored
Normal file
2
i18n/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
# Generated
|
||||
locales_config.xml
|
43
i18n/build.gradle.kts
Normal file
43
i18n/build.gradle.kts
Normal file
|
@ -0,0 +1,43 @@
|
|||
plugins {
|
||||
kotlin("multiplatform")
|
||||
id("com.android.library")
|
||||
id("dev.icerock.mobile.multiplatform-resources")
|
||||
}
|
||||
|
||||
kotlin {
|
||||
androidTarget()
|
||||
|
||||
applyDefaultHierarchyTemplate()
|
||||
|
||||
sourceSets {
|
||||
val commonMain by getting {
|
||||
dependencies {
|
||||
api(libs.moko.resources)
|
||||
}
|
||||
}
|
||||
val androidMain by getting {
|
||||
dependsOn(commonMain)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "yokai.i18n"
|
||||
}
|
||||
|
||||
multiplatformResources {
|
||||
resourcesPackage.set("yokai.i18n")
|
||||
}
|
||||
|
||||
tasks {
|
||||
val localesConfigTask = registerLocalesConfigTask(project)
|
||||
preBuild {
|
||||
dependsOn(localesConfigTask)
|
||||
}
|
||||
|
||||
withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
|
||||
kotlinOptions.freeCompilerArgs += listOf(
|
||||
"-Xexpect-actual-classes",
|
||||
)
|
||||
}
|
||||
}
|
2
i18n/src/androidMain/AndroidManifest.xml
Normal file
2
i18n/src/androidMain/AndroidManifest.xml
Normal file
|
@ -0,0 +1,2 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest />
|
8
i18n/src/commonMain/moko-resources/base/strings.xml
Normal file
8
i18n/src/commonMain/moko-resources/base/strings.xml
Normal file
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- WebView -->
|
||||
<string name="failed_to_bypass_cloudflare">Failed to bypass Cloudflare</string>
|
||||
<!-- Do not translate "WebView" -->
|
||||
<string name="please_update_webview">Please update the WebView app for better compatibility</string>
|
||||
<string name="webview_is_required">WebView is required for Tachiyomi</string>
|
||||
</resources>
|
Loading…
Add table
Add a link
Reference in a new issue