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:
Ahmad Ansori Palembani 2024-06-16 09:34:02 +07:00 committed by GitHub
parent 7e7a37bc53
commit 24ce2683d4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
109 changed files with 1146 additions and 308 deletions

2
i18n/.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
# Generated
locales_config.xml

43
i18n/build.gradle.kts Normal file
View 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",
)
}
}

View file

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest />

View 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>