Separate out generator logic from the multisrc boilerplate itself

This commit is contained in:
arkon 2021-03-09 18:02:17 -05:00
parent 8e977fec59
commit 580754e668
19 changed files with 120 additions and 97 deletions

View File

@ -41,7 +41,7 @@ jobs:
env:
CI_MULTISRC: "true"
with:
arguments: :multisrc:multisrcGenerators
arguments: :multisrc:generateExtensions
wrapper-cache-enabled: true
dependencies-cache-enabled: true
configuration-cache-enabled: true
@ -88,4 +88,4 @@ jobs:
arguments: assembleRelease
wrapper-cache-enabled: true
dependencies-cache-enabled: true
configuration-cache-enabled: true
configuration-cache-enabled: true

View File

@ -51,7 +51,7 @@ jobs:
with:
build-root-directory: master
wrapper-directory: master
arguments: :multisrc:multisrcGenerators
arguments: :multisrc:generateExtensions
wrapper-cache-enabled: true
dependencies-cache-enabled: true
configuration-cache-enabled: true

View File

@ -21,7 +21,7 @@ repositories {
apply("$rootDir/common-dependencies.gradle")
tasks {
val multisrcGenerators by registering {
val generateExtensions by registering {
doLast {
val isWindows = System.getProperty("os.name").toString().toLowerCase().contains("win")
val classPath = (configurations.debugCompileOnly.get().asFileTree.toList() +
@ -32,8 +32,7 @@ tasks {
.joinToString(if (isWindows) ";" else ":")
val javaPath = "${System.getProperty("java.home")}/bin/java"
val mainClass =
"eu.kanade.tachiyomi.multisrc.GeneratorMainKt" // Main class we want to execute
val mainClass = "generator.GeneratorMainKt" // Main class we want to execute
val javaCommand = if (isWindows) {
"\"$javaPath\" -classpath $classPath $mainClass".replace("/", "\\")

View File

@ -1,7 +1,7 @@
package eu.kanade.tachiyomi.multisrc.comicake
import eu.kanade.tachiyomi.multisrc.ThemeSourceData.SingleLang
import eu.kanade.tachiyomi.multisrc.ThemeSourceGenerator
import generator.ThemeSourceData.SingleLang
import generator.ThemeSourceGenerator
class ComiCakeGenerator : ThemeSourceGenerator {

View File

@ -1,7 +1,7 @@
package eu.kanade.tachiyomi.multisrc.eromuse
import eu.kanade.tachiyomi.multisrc.ThemeSourceData.SingleLang
import eu.kanade.tachiyomi.multisrc.ThemeSourceGenerator
import generator.ThemeSourceData.SingleLang
import generator.ThemeSourceGenerator
class EroMuseGenerator : ThemeSourceGenerator {
@ -12,7 +12,13 @@ class EroMuseGenerator : ThemeSourceGenerator {
override val baseVersionCode: Int = 1
override val sources = listOf(
SingleLang("8Muses", "https://comics.8muses.com", "en", className = "EightMuses", isNsfw = true),
SingleLang(
"8Muses",
"https://comics.8muses.com",
"en",
className = "EightMuses",
isNsfw = true
),
SingleLang("Erofus", "https://www.erofus.com", "en", isNsfw = true)
)

View File

@ -1,8 +1,8 @@
package eu.kanade.tachiyomi.multisrc.fmreader
import eu.kanade.tachiyomi.multisrc.ThemeSourceData.MultiLang
import eu.kanade.tachiyomi.multisrc.ThemeSourceData.SingleLang
import eu.kanade.tachiyomi.multisrc.ThemeSourceGenerator
import generator.ThemeSourceData.MultiLang
import generator.ThemeSourceData.SingleLang
import generator.ThemeSourceGenerator
class FMReaderGenerator : ThemeSourceGenerator {
@ -16,19 +16,44 @@ class FMReaderGenerator : ThemeSourceGenerator {
* most likely the fix is to override popularMangaNextPageSelector() */
override val sources = listOf(
SingleLang("18LHPlus", "https://18lhplus.com", "en", className = "EighteenLHPlus"),
SingleLang("Epik Manga", "https://www.epikmanga.com", "tr"),
SingleLang("HanaScan (RawQQ)", "https://hanascan.com", "ja", className = "HanaScanRawQQ"),
SingleLang("HeroScan", "https://heroscan.com", "en"),
SingleLang("KissLove", "https://kissaway.net", "ja"),
SingleLang("LHTranslation", "https://lhtranslation.net", "en", overrideVersionCode = 1),
SingleLang("Manga-TR", "https://manga-tr.com", "tr", className = "MangaTR"),
SingleLang("ManhuaScan", "https://manhuascan.com", "en"),
SingleLang("Manhwa18", "https://manhwa18.com", "en"),
MultiLang("Manhwa18.net", "https://manhwa18.net", listOf("en", "ko"), className = "Manhwa18NetFactory"),
SingleLang("ManhwaSmut", "https://manhwasmut.com", "en", overrideVersionCode = 1),
SingleLang("RawLH", "https://lovehug.net", "ja"),
SingleLang("Say Truyen", "https://saytruyen.com", "vi"),
SingleLang(
"18LHPlus",
"https://18lhplus.com",
"en",
className = "EighteenLHPlus"
),
SingleLang("Epik Manga", "https://www.epikmanga.com", "tr"),
SingleLang(
"HanaScan (RawQQ)",
"https://hanascan.com",
"ja",
className = "HanaScanRawQQ"
),
SingleLang("HeroScan", "https://heroscan.com", "en"),
SingleLang("KissLove", "https://kissaway.net", "ja"),
SingleLang(
"LHTranslation",
"https://lhtranslation.net",
"en",
overrideVersionCode = 1
),
SingleLang("Manga-TR", "https://manga-tr.com", "tr", className = "MangaTR"),
SingleLang("ManhuaScan", "https://manhuascan.com", "en"),
SingleLang("Manhwa18", "https://manhwa18.com", "en"),
MultiLang(
"Manhwa18.net",
"https://manhwa18.net",
listOf("en", "ko"),
className = "Manhwa18NetFactory"
),
SingleLang(
"ManhwaSmut",
"https://manhwasmut.com",
"en",
overrideVersionCode = 1
),
SingleLang("RawLH", "https://lovehug.net", "ja"),
SingleLang("Say Truyen", "https://saytruyen.com", "vi"),
)
companion object {

View File

@ -1,8 +1,8 @@
package eu.kanade.tachiyomi.multisrc.foolslide
import eu.kanade.tachiyomi.multisrc.ThemeSourceData.SingleLang
import eu.kanade.tachiyomi.multisrc.ThemeSourceData.MultiLang
import eu.kanade.tachiyomi.multisrc.ThemeSourceGenerator
import generator.ThemeSourceData.MultiLang
import generator.ThemeSourceData.SingleLang
import generator.ThemeSourceGenerator
class FoolSlideGenerator : ThemeSourceGenerator {
@ -13,41 +13,41 @@ class FoolSlideGenerator : ThemeSourceGenerator {
override val baseVersionCode: Int = 1
override val sources = listOf(
SingleLang("The Cat Scans", "https://reader2.thecatscans.com/", "en"),
SingleLang("Silent Sky", "https://reader.silentsky-scans.net", "en"),
SingleLang("Death Toll Scans", "https://reader.deathtollscans.net", "en"),
SingleLang("One Time Scans", "https://reader.otscans.com", "en"),
SingleLang("MangaScouts", "http://onlinereader.mangascouts.org", "de"),
SingleLang("Lilyreader", "https://manga.smuglo.li", "en"),
SingleLang("Evil Flowers", "https://reader.evilflowers.com", "en"),
SingleLang("Русификация", "https://rusmanga.ru", "ru", className = "Russification"),
SingleLang("PowerManga", "https://reader.powermanga.org", "it", className = "PowerMangaIT"),
MultiLang("FoolSlide Customizable", "", listOf("other")),
SingleLang("Menudo-Fansub", "http://www.menudo-fansub.com", "es", className = "MenudoFansub"),
SingleLang("Sense-Scans", "http://sensescans.com", "en", className = "SenseScans"),
SingleLang("Kirei Cake", "https://reader.kireicake.com", "en"),
SingleLang("Mangatellers", "http://www.mangatellers.gr", "en"),
SingleLang("Iskultrip Scans", "https://maryfaye.net", "en"),
SingleLang("Anata no Motokare", "https://motokare.xyz", "en", className = "AnataNoMotokare"),
SingleLang("Yuri-ism", "https://www.yuri-ism.net", "en", className = "YuriIsm"),
SingleLang("Ajia no Scantrad", "https://www.ajianoscantrad.fr", "fr", className = "AjiaNoScantrad"),
SingleLang("Storm in Heaven", "https://www.storm-in-heaven.net", "it", className = "StormInHeaven"),
SingleLang("LupiTeam", "https://lupiteam.net", "it"),
SingleLang("Zandy no Fansub", "https://zandynofansub.aishiteru.org", "en"),
SingleLang("Helvetica Scans", "https://helveticascans.com", "en"),
SingleLang("Kirishima Fansub", "https://www.kirishimafansub.net", "es"),
SingleLang("Baixar Hentai", "https://leitura.baixarhentai.net", "pt-BR", isNsfw = true),
SingleLang("HNI-Scantrad", "https://hni-scantrad.com", "fr", className = "HNIScantrad"),
SingleLang("HNI-Scantrad", "https://hni-scantrad.com", "en", className = "HNIScantradEN"),
SingleLang("The Phoenix Scans", "https://www.phoenixscans.com", "it", className = "PhoenixScans"),
SingleLang("GTO The Great Site", "https://www.gtothegreatsite.net", "it", className = "GTO"),
SingleLang("Fall World Reader", "https://faworeader.altervista.org", "it", className = "FallenWorldOrder"),
SingleLang("NIFTeam", "http://read-nifteam.info", "it"),
SingleLang("TuttoAnimeManga", "https://tuttoanimemanga.net", "it"),
SingleLang("Tortuga Ceviri", "http://tortuga-ceviri.com", "tr"),
SingleLang("Rama", "https://www.ramareader.it", "it"),
SingleLang("Mabushimajo", "http://mabushimajo.com", "tr"),
SingleLang("Hentai Cafe", "https://hentai.cafe", "en", isNsfw = true),
SingleLang("The Cat Scans", "https://reader2.thecatscans.com/", "en"),
SingleLang("Silent Sky", "https://reader.silentsky-scans.net", "en"),
SingleLang("Death Toll Scans", "https://reader.deathtollscans.net", "en"),
SingleLang("One Time Scans", "https://reader.otscans.com", "en"),
SingleLang("MangaScouts", "http://onlinereader.mangascouts.org", "de"),
SingleLang("Lilyreader", "https://manga.smuglo.li", "en"),
SingleLang("Evil Flowers", "https://reader.evilflowers.com", "en"),
SingleLang("Русификация", "https://rusmanga.ru", "ru", className = "Russification"),
SingleLang("PowerManga", "https://reader.powermanga.org", "it", className = "PowerMangaIT"),
MultiLang("FoolSlide Customizable", "", listOf("other")),
SingleLang("Menudo-Fansub", "http://www.menudo-fansub.com", "es", className = "MenudoFansub"),
SingleLang("Sense-Scans", "http://sensescans.com", "en", className = "SenseScans"),
SingleLang("Kirei Cake", "https://reader.kireicake.com", "en"),
SingleLang("Mangatellers", "http://www.mangatellers.gr", "en"),
SingleLang("Iskultrip Scans", "https://maryfaye.net", "en"),
SingleLang("Anata no Motokare", "https://motokare.xyz", "en", className = "AnataNoMotokare"),
SingleLang("Yuri-ism", "https://www.yuri-ism.net", "en", className = "YuriIsm"),
SingleLang("Ajia no Scantrad", "https://www.ajianoscantrad.fr", "fr", className = "AjiaNoScantrad"),
SingleLang("Storm in Heaven", "https://www.storm-in-heaven.net", "it", className = "StormInHeaven"),
SingleLang("LupiTeam", "https://lupiteam.net", "it"),
SingleLang("Zandy no Fansub", "https://zandynofansub.aishiteru.org", "en"),
SingleLang("Helvetica Scans", "https://helveticascans.com", "en"),
SingleLang("Kirishima Fansub", "https://www.kirishimafansub.net", "es"),
SingleLang("Baixar Hentai", "https://leitura.baixarhentai.net", "pt-BR", isNsfw = true),
SingleLang("HNI-Scantrad", "https://hni-scantrad.com", "fr", className = "HNIScantrad"),
SingleLang("HNI-Scantrad", "https://hni-scantrad.com", "en", className = "HNIScantradEN"),
SingleLang("The Phoenix Scans", "https://www.phoenixscans.com", "it", className = "PhoenixScans"),
SingleLang("GTO The Great Site", "https://www.gtothegreatsite.net", "it", className = "GTO"),
SingleLang("Fall World Reader", "https://faworeader.altervista.org", "it", className = "FallenWorldOrder"),
SingleLang("NIFTeam", "http://read-nifteam.info", "it"),
SingleLang("TuttoAnimeManga", "https://tuttoanimemanga.net", "it"),
SingleLang("Tortuga Ceviri", "http://tortuga-ceviri.com", "tr"),
SingleLang("Rama", "https://www.ramareader.it", "it"),
SingleLang("Mabushimajo", "http://mabushimajo.com", "tr"),
SingleLang("Hentai Cafe", "https://hentai.cafe", "en", isNsfw = true),
)
companion object {

View File

@ -1,8 +1,8 @@
package eu.kanade.tachiyomi.multisrc.genkan
import eu.kanade.tachiyomi.multisrc.ThemeSourceData.SingleLang
import eu.kanade.tachiyomi.multisrc.ThemeSourceData.MultiLang
import eu.kanade.tachiyomi.multisrc.ThemeSourceGenerator
import generator.ThemeSourceData.MultiLang
import generator.ThemeSourceData.SingleLang
import generator.ThemeSourceGenerator
class GenkanGenerator : ThemeSourceGenerator {

View File

@ -1,7 +1,7 @@
package eu.kanade.tachiyomi.multisrc.genkan
import eu.kanade.tachiyomi.multisrc.ThemeSourceData.SingleLang
import eu.kanade.tachiyomi.multisrc.ThemeSourceGenerator
import generator.ThemeSourceData.SingleLang
import generator.ThemeSourceGenerator
class GenkanOriginalGenerator : ThemeSourceGenerator {

View File

@ -1,8 +1,8 @@
package eu.kanade.tachiyomi.multisrc.madara
import eu.kanade.tachiyomi.multisrc.ThemeSourceData.SingleLang
import eu.kanade.tachiyomi.multisrc.ThemeSourceData.MultiLang
import eu.kanade.tachiyomi.multisrc.ThemeSourceGenerator
import generator.ThemeSourceData.MultiLang
import generator.ThemeSourceData.SingleLang
import generator.ThemeSourceGenerator
class MadaraGenerator : ThemeSourceGenerator {

View File

@ -1,7 +1,7 @@
package eu.kanade.tachiyomi.multisrc.mangabox
import eu.kanade.tachiyomi.multisrc.ThemeSourceData.SingleLang
import eu.kanade.tachiyomi.multisrc.ThemeSourceGenerator
import generator.ThemeSourceData.SingleLang
import generator.ThemeSourceGenerator
class MangaBoxGenerator : ThemeSourceGenerator {

View File

@ -1,7 +1,7 @@
package eu.kanade.tachiyomi.multisrc.mangadventure
import eu.kanade.tachiyomi.multisrc.ThemeSourceData.SingleLang
import eu.kanade.tachiyomi.multisrc.ThemeSourceGenerator
import generator.ThemeSourceData.SingleLang
import generator.ThemeSourceGenerator
/** [MangAdventure] source generator. */
class MangAdventureGenerator : ThemeSourceGenerator {

View File

@ -1,10 +1,7 @@
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
import generator.ThemeSourceData.SingleLang
import generator.ThemeSourceGenerator
class PaprikaAltGenerator : ThemeSourceGenerator {

View File

@ -1,10 +1,7 @@
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
import generator.ThemeSourceData.SingleLang
import generator.ThemeSourceGenerator
class PaprikaGenerator : ThemeSourceGenerator {

View File

@ -1,8 +1,8 @@
package eu.kanade.tachiyomi.multisrc.wpcomics
import eu.kanade.tachiyomi.multisrc.ThemeSourceData.SingleLang
import eu.kanade.tachiyomi.multisrc.ThemeSourceData.MultiLang
import eu.kanade.tachiyomi.multisrc.ThemeSourceGenerator
import generator.ThemeSourceData.MultiLang
import generator.ThemeSourceData.SingleLang
import generator.ThemeSourceGenerator
class WPComicsGenerator : ThemeSourceGenerator {

View File

@ -1,7 +1,7 @@
package eu.kanade.tachiyomi.multisrc.wpmangareader
import eu.kanade.tachiyomi.multisrc.ThemeSourceData.SingleLang
import eu.kanade.tachiyomi.multisrc.ThemeSourceGenerator
import generator.ThemeSourceData.SingleLang
import generator.ThemeSourceGenerator
class WPMangaReaderGenerator : ThemeSourceGenerator {
@ -19,7 +19,6 @@ class WPMangaReaderGenerator : ThemeSourceGenerator {
SingleLang("Sekaikomik", "https://www.sekaikomik.com", "id", true),
SingleLang("TurkToon", "https://turktoon.com", "tr"),
SingleLang("Gecenin Lordu", "https://geceninlordu.com/", "tr", overrideVersionCode = 1),
)
companion object {

View File

@ -1,7 +1,7 @@
package eu.kanade.tachiyomi.multisrc.wpmangastream
import eu.kanade.tachiyomi.multisrc.ThemeSourceData.SingleLang
import eu.kanade.tachiyomi.multisrc.ThemeSourceGenerator
import generator.ThemeSourceData.SingleLang
import generator.ThemeSourceGenerator
class WPMangaStreamGenerator : ThemeSourceGenerator {

View File

@ -1,4 +1,4 @@
package eu.kanade.tachiyomi.multisrc
package generator
import java.io.File

View File

@ -1,4 +1,4 @@
package eu.kanade.tachiyomi.multisrc
package generator
import java.io.File
import java.nio.file.Files