From ca5663ff3a8fd6474bb814d030c79dd394ecda9a Mon Sep 17 00:00:00 2001 From: Aria Moradi Date: Fri, 12 Feb 2021 07:27:38 -0800 Subject: [PATCH] split paprika (#5798) --- .../default_res}/mipmap-hdpi/ic_launcher.png | Bin .../default_res}/mipmap-mdpi/ic_launcher.png | Bin .../default_res}/mipmap-xhdpi/ic_launcher.png | Bin .../mipmap-xxhdpi/ic_launcher.png | Bin .../mipmap-xxxhdpi/ic_launcher.png | Bin .../paprika/default_res}/web_hi_res_512.png | Bin .../tachiyomi/multisrc}/paprika/Paprika.kt | 2 +- .../tachiyomi/multisrc}/paprika/PaprikaAlt.kt | 2 +- .../multisrc/paprika/PaprikaAltGenerator.kt | 27 +++++++++++++++ .../multisrc/paprika/PaprikaGenerator.kt | 32 ++++++++++++++++++ src/all/paprika/AndroidManifest.xml | 2 -- src/all/paprika/build.gradle | 12 ------- .../extension/all/paprika/PaprikaFactory.kt | 26 -------------- 13 files changed, 61 insertions(+), 42 deletions(-) rename {src/all/paprika/res => multisrc/overrides/paprika/default_res}/mipmap-hdpi/ic_launcher.png (100%) rename {src/all/paprika/res => multisrc/overrides/paprika/default_res}/mipmap-mdpi/ic_launcher.png (100%) rename {src/all/paprika/res => multisrc/overrides/paprika/default_res}/mipmap-xhdpi/ic_launcher.png (100%) rename {src/all/paprika/res => multisrc/overrides/paprika/default_res}/mipmap-xxhdpi/ic_launcher.png (100%) rename {src/all/paprika/res => multisrc/overrides/paprika/default_res}/mipmap-xxxhdpi/ic_launcher.png (100%) rename {src/all/paprika/res => multisrc/overrides/paprika/default_res}/web_hi_res_512.png (100%) rename {src/all/paprika/src/eu/kanade/tachiyomi/extension/all => multisrc/src/main/java/eu/kanade/tachiyomi/multisrc}/paprika/Paprika.kt (99%) rename {src/all/paprika/src/eu/kanade/tachiyomi/extension/all => multisrc/src/main/java/eu/kanade/tachiyomi/multisrc}/paprika/PaprikaAlt.kt (98%) create mode 100644 multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/paprika/PaprikaAltGenerator.kt create mode 100644 multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/paprika/PaprikaGenerator.kt delete mode 100644 src/all/paprika/AndroidManifest.xml delete mode 100644 src/all/paprika/build.gradle delete mode 100644 src/all/paprika/src/eu/kanade/tachiyomi/extension/all/paprika/PaprikaFactory.kt diff --git a/src/all/paprika/res/mipmap-hdpi/ic_launcher.png b/multisrc/overrides/paprika/default_res/mipmap-hdpi/ic_launcher.png similarity index 100% rename from src/all/paprika/res/mipmap-hdpi/ic_launcher.png rename to multisrc/overrides/paprika/default_res/mipmap-hdpi/ic_launcher.png diff --git a/src/all/paprika/res/mipmap-mdpi/ic_launcher.png b/multisrc/overrides/paprika/default_res/mipmap-mdpi/ic_launcher.png similarity index 100% rename from src/all/paprika/res/mipmap-mdpi/ic_launcher.png rename to multisrc/overrides/paprika/default_res/mipmap-mdpi/ic_launcher.png diff --git a/src/all/paprika/res/mipmap-xhdpi/ic_launcher.png b/multisrc/overrides/paprika/default_res/mipmap-xhdpi/ic_launcher.png similarity index 100% rename from src/all/paprika/res/mipmap-xhdpi/ic_launcher.png rename to multisrc/overrides/paprika/default_res/mipmap-xhdpi/ic_launcher.png diff --git a/src/all/paprika/res/mipmap-xxhdpi/ic_launcher.png b/multisrc/overrides/paprika/default_res/mipmap-xxhdpi/ic_launcher.png similarity index 100% rename from src/all/paprika/res/mipmap-xxhdpi/ic_launcher.png rename to multisrc/overrides/paprika/default_res/mipmap-xxhdpi/ic_launcher.png diff --git a/src/all/paprika/res/mipmap-xxxhdpi/ic_launcher.png b/multisrc/overrides/paprika/default_res/mipmap-xxxhdpi/ic_launcher.png similarity index 100% rename from src/all/paprika/res/mipmap-xxxhdpi/ic_launcher.png rename to multisrc/overrides/paprika/default_res/mipmap-xxxhdpi/ic_launcher.png diff --git a/src/all/paprika/res/web_hi_res_512.png b/multisrc/overrides/paprika/default_res/web_hi_res_512.png similarity index 100% rename from src/all/paprika/res/web_hi_res_512.png rename to multisrc/overrides/paprika/default_res/web_hi_res_512.png diff --git a/src/all/paprika/src/eu/kanade/tachiyomi/extension/all/paprika/Paprika.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/paprika/Paprika.kt similarity index 99% rename from src/all/paprika/src/eu/kanade/tachiyomi/extension/all/paprika/Paprika.kt rename to multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/paprika/Paprika.kt index a26d56419..b3f995da9 100644 --- a/src/all/paprika/src/eu/kanade/tachiyomi/extension/all/paprika/Paprika.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/paprika/Paprika.kt @@ -1,4 +1,4 @@ -package eu.kanade.tachiyomi.extension.all.paprika +package eu.kanade.tachiyomi.multisrc.paprika import eu.kanade.tachiyomi.network.GET import eu.kanade.tachiyomi.source.model.Filter diff --git a/src/all/paprika/src/eu/kanade/tachiyomi/extension/all/paprika/PaprikaAlt.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/paprika/PaprikaAlt.kt similarity index 98% rename from src/all/paprika/src/eu/kanade/tachiyomi/extension/all/paprika/PaprikaAlt.kt rename to multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/paprika/PaprikaAlt.kt index 6a1c2a792..d5f3c158b 100644 --- a/src/all/paprika/src/eu/kanade/tachiyomi/extension/all/paprika/PaprikaAlt.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/paprika/PaprikaAlt.kt @@ -1,4 +1,4 @@ -package eu.kanade.tachiyomi.extension.all.paprika +package eu.kanade.tachiyomi.multisrc.paprika import eu.kanade.tachiyomi.network.GET import eu.kanade.tachiyomi.source.model.FilterList diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/paprika/PaprikaAltGenerator.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/paprika/PaprikaAltGenerator.kt new file mode 100644 index 000000000..7febc5846 --- /dev/null +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/paprika/PaprikaAltGenerator.kt @@ -0,0 +1,27 @@ +package eu.kanade.tachiyomi.multisrc.paprika + +import eu.kanade.tachiyomi.multisrc.ThemeSourceData.SingleLang +import eu.kanade.tachiyomi.multisrc.ThemeSourceGenerator +import eu.kanade.tachiyomi.source.Source +import eu.kanade.tachiyomi.source.SourceFactory + + +class PaprikaAltGenerator : ThemeSourceGenerator { + + override val themePkg = "paprika" + + override val themeClass = "PaprikaAlt" + + override val baseVersionCode: Int = 1 + + override val sources = listOf( + SingleLang("MangaReader.cc", "http://mangareader.cc/", "en", className = "MangaReaderCC") // more sites in the future might use MangaReader.cc 's overrides as they did in the past + ) + + companion object { + @JvmStatic + fun main(args: Array) { + PaprikaAltGenerator().createAll() + } + } +} diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/paprika/PaprikaGenerator.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/paprika/PaprikaGenerator.kt new file mode 100644 index 000000000..78b412645 --- /dev/null +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/paprika/PaprikaGenerator.kt @@ -0,0 +1,32 @@ +package eu.kanade.tachiyomi.multisrc.paprika + +import eu.kanade.tachiyomi.multisrc.ThemeSourceData.SingleLang +import eu.kanade.tachiyomi.multisrc.ThemeSourceGenerator +import eu.kanade.tachiyomi.source.Source +import eu.kanade.tachiyomi.source.SourceFactory + + +class PaprikaGenerator : ThemeSourceGenerator { + + override val themePkg = "paprika" + + override val themeClass = "Paprika" + + override val baseVersionCode: Int = 1 + + override val sources = listOf( + SingleLang("MangaStream.xyz", "http://mangastream.xyz", "en", className = "MangaStreamXYZ"), + SingleLang("ReadMangaFox", "http://readmangafox.xyz", "en"), +// SingleLang("MangaZuki.xyz", "http://mangazuki.xyz", "en", className = "MangaZuki"), +// SingleLang("MangaTensei", "http://www.mangatensei.com", "en"), + SingleLang("MangaNelos.com", "http://manganelos.com", "en", className = "MangaNelosCom"), + SingleLang("MangaDogs.fun", "http://mangadogs.fun", "en", className = "MangaDogsFun"), + ) + + companion object { + @JvmStatic + fun main(args: Array) { + PaprikaGenerator().createAll() + } + } +} diff --git a/src/all/paprika/AndroidManifest.xml b/src/all/paprika/AndroidManifest.xml deleted file mode 100644 index 30deb7f79..000000000 --- a/src/all/paprika/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/src/all/paprika/build.gradle b/src/all/paprika/build.gradle deleted file mode 100644 index 0f4c05ddd..000000000 --- a/src/all/paprika/build.gradle +++ /dev/null @@ -1,12 +0,0 @@ -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' - -ext { - extName = 'Paprika' - pkgNameSuffix = 'all.paprika' - extClass = '.PaprikaFactory' - extVersionCode = 7 - libVersion = '1.2' -} - -apply from: "$rootDir/common.gradle" diff --git a/src/all/paprika/src/eu/kanade/tachiyomi/extension/all/paprika/PaprikaFactory.kt b/src/all/paprika/src/eu/kanade/tachiyomi/extension/all/paprika/PaprikaFactory.kt deleted file mode 100644 index 9b4eda011..000000000 --- a/src/all/paprika/src/eu/kanade/tachiyomi/extension/all/paprika/PaprikaFactory.kt +++ /dev/null @@ -1,26 +0,0 @@ -package eu.kanade.tachiyomi.extension.all.paprika - -import eu.kanade.tachiyomi.source.Source -import eu.kanade.tachiyomi.source.SourceFactory - -class PaprikaFactory : SourceFactory { - override fun createSources(): List = listOf( - MangazukiXyz(), - MangaTensei(), - MangaNelo(), - // MangaWindowClub(), - MangaDogs(), - ReadMangaFox(), - MangaStreamXyz(), - MangaReader() - ) -} - -class MangaStreamXyz : Paprika("MangaStream.xyz", "http://mangastream.xyz", "en") -class ReadMangaFox : Paprika("ReadMangaFox", "http://readmangafox.xyz", "en") -class MangazukiXyz : Paprika("MangaZuki.xyz", "http://mangazuki.xyz", "en") -class MangaTensei : Paprika("MangaTensei", "https://www.mangatensei.com", "en") -class MangaNelo : Paprika("MangaNelos.com", "http://manganelos.com", "en") -// class MangaWindowClub : PaprikaAlt("MangaWindow.club", "https://mangawindow.club", "en") -class MangaDogs : Paprika("MangaDogs.fun", "http://mangadogs.fun", "en") -class MangaReader : PaprikaAlt("MangaReader.cc", "http://mangareader.cc/", "en")