Separate out generator logic from the multisrc boilerplate itself
This commit is contained in:
parent
8e977fec59
commit
580754e668
|
@ -41,7 +41,7 @@ jobs:
|
||||||
env:
|
env:
|
||||||
CI_MULTISRC: "true"
|
CI_MULTISRC: "true"
|
||||||
with:
|
with:
|
||||||
arguments: :multisrc:multisrcGenerators
|
arguments: :multisrc:generateExtensions
|
||||||
wrapper-cache-enabled: true
|
wrapper-cache-enabled: true
|
||||||
dependencies-cache-enabled: true
|
dependencies-cache-enabled: true
|
||||||
configuration-cache-enabled: true
|
configuration-cache-enabled: true
|
||||||
|
|
|
@ -51,7 +51,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
build-root-directory: master
|
build-root-directory: master
|
||||||
wrapper-directory: master
|
wrapper-directory: master
|
||||||
arguments: :multisrc:multisrcGenerators
|
arguments: :multisrc:generateExtensions
|
||||||
wrapper-cache-enabled: true
|
wrapper-cache-enabled: true
|
||||||
dependencies-cache-enabled: true
|
dependencies-cache-enabled: true
|
||||||
configuration-cache-enabled: true
|
configuration-cache-enabled: true
|
||||||
|
|
|
@ -21,7 +21,7 @@ repositories {
|
||||||
apply("$rootDir/common-dependencies.gradle")
|
apply("$rootDir/common-dependencies.gradle")
|
||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
val multisrcGenerators by registering {
|
val generateExtensions by registering {
|
||||||
doLast {
|
doLast {
|
||||||
val isWindows = System.getProperty("os.name").toString().toLowerCase().contains("win")
|
val isWindows = System.getProperty("os.name").toString().toLowerCase().contains("win")
|
||||||
val classPath = (configurations.debugCompileOnly.get().asFileTree.toList() +
|
val classPath = (configurations.debugCompileOnly.get().asFileTree.toList() +
|
||||||
|
@ -32,8 +32,7 @@ tasks {
|
||||||
.joinToString(if (isWindows) ";" else ":")
|
.joinToString(if (isWindows) ";" else ":")
|
||||||
val javaPath = "${System.getProperty("java.home")}/bin/java"
|
val javaPath = "${System.getProperty("java.home")}/bin/java"
|
||||||
|
|
||||||
val mainClass =
|
val mainClass = "generator.GeneratorMainKt" // Main class we want to execute
|
||||||
"eu.kanade.tachiyomi.multisrc.GeneratorMainKt" // Main class we want to execute
|
|
||||||
|
|
||||||
val javaCommand = if (isWindows) {
|
val javaCommand = if (isWindows) {
|
||||||
"\"$javaPath\" -classpath $classPath $mainClass".replace("/", "\\")
|
"\"$javaPath\" -classpath $classPath $mainClass".replace("/", "\\")
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package eu.kanade.tachiyomi.multisrc.comicake
|
package eu.kanade.tachiyomi.multisrc.comicake
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.multisrc.ThemeSourceData.SingleLang
|
import generator.ThemeSourceData.SingleLang
|
||||||
import eu.kanade.tachiyomi.multisrc.ThemeSourceGenerator
|
import generator.ThemeSourceGenerator
|
||||||
|
|
||||||
class ComiCakeGenerator : ThemeSourceGenerator {
|
class ComiCakeGenerator : ThemeSourceGenerator {
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package eu.kanade.tachiyomi.multisrc.eromuse
|
package eu.kanade.tachiyomi.multisrc.eromuse
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.multisrc.ThemeSourceData.SingleLang
|
import generator.ThemeSourceData.SingleLang
|
||||||
import eu.kanade.tachiyomi.multisrc.ThemeSourceGenerator
|
import generator.ThemeSourceGenerator
|
||||||
|
|
||||||
class EroMuseGenerator : ThemeSourceGenerator {
|
class EroMuseGenerator : ThemeSourceGenerator {
|
||||||
|
|
||||||
|
@ -12,7 +12,13 @@ class EroMuseGenerator : ThemeSourceGenerator {
|
||||||
override val baseVersionCode: Int = 1
|
override val baseVersionCode: Int = 1
|
||||||
|
|
||||||
override val sources = listOf(
|
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)
|
SingleLang("Erofus", "https://www.erofus.com", "en", isNsfw = true)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package eu.kanade.tachiyomi.multisrc.fmreader
|
package eu.kanade.tachiyomi.multisrc.fmreader
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.multisrc.ThemeSourceData.MultiLang
|
import generator.ThemeSourceData.MultiLang
|
||||||
import eu.kanade.tachiyomi.multisrc.ThemeSourceData.SingleLang
|
import generator.ThemeSourceData.SingleLang
|
||||||
import eu.kanade.tachiyomi.multisrc.ThemeSourceGenerator
|
import generator.ThemeSourceGenerator
|
||||||
|
|
||||||
class FMReaderGenerator : ThemeSourceGenerator {
|
class FMReaderGenerator : ThemeSourceGenerator {
|
||||||
|
|
||||||
|
@ -16,17 +16,42 @@ class FMReaderGenerator : ThemeSourceGenerator {
|
||||||
* most likely the fix is to override popularMangaNextPageSelector() */
|
* most likely the fix is to override popularMangaNextPageSelector() */
|
||||||
|
|
||||||
override val sources = listOf(
|
override val sources = listOf(
|
||||||
SingleLang("18LHPlus", "https://18lhplus.com", "en", className = "EighteenLHPlus"),
|
SingleLang(
|
||||||
|
"18LHPlus",
|
||||||
|
"https://18lhplus.com",
|
||||||
|
"en",
|
||||||
|
className = "EighteenLHPlus"
|
||||||
|
),
|
||||||
SingleLang("Epik Manga", "https://www.epikmanga.com", "tr"),
|
SingleLang("Epik Manga", "https://www.epikmanga.com", "tr"),
|
||||||
SingleLang("HanaScan (RawQQ)", "https://hanascan.com", "ja", className = "HanaScanRawQQ"),
|
SingleLang(
|
||||||
|
"HanaScan (RawQQ)",
|
||||||
|
"https://hanascan.com",
|
||||||
|
"ja",
|
||||||
|
className = "HanaScanRawQQ"
|
||||||
|
),
|
||||||
SingleLang("HeroScan", "https://heroscan.com", "en"),
|
SingleLang("HeroScan", "https://heroscan.com", "en"),
|
||||||
SingleLang("KissLove", "https://kissaway.net", "ja"),
|
SingleLang("KissLove", "https://kissaway.net", "ja"),
|
||||||
SingleLang("LHTranslation", "https://lhtranslation.net", "en", overrideVersionCode = 1),
|
SingleLang(
|
||||||
|
"LHTranslation",
|
||||||
|
"https://lhtranslation.net",
|
||||||
|
"en",
|
||||||
|
overrideVersionCode = 1
|
||||||
|
),
|
||||||
SingleLang("Manga-TR", "https://manga-tr.com", "tr", className = "MangaTR"),
|
SingleLang("Manga-TR", "https://manga-tr.com", "tr", className = "MangaTR"),
|
||||||
SingleLang("ManhuaScan", "https://manhuascan.com", "en"),
|
SingleLang("ManhuaScan", "https://manhuascan.com", "en"),
|
||||||
SingleLang("Manhwa18", "https://manhwa18.com", "en"),
|
SingleLang("Manhwa18", "https://manhwa18.com", "en"),
|
||||||
MultiLang("Manhwa18.net", "https://manhwa18.net", listOf("en", "ko"), className = "Manhwa18NetFactory"),
|
MultiLang(
|
||||||
SingleLang("ManhwaSmut", "https://manhwasmut.com", "en", overrideVersionCode = 1),
|
"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("RawLH", "https://lovehug.net", "ja"),
|
||||||
SingleLang("Say Truyen", "https://saytruyen.com", "vi"),
|
SingleLang("Say Truyen", "https://saytruyen.com", "vi"),
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package eu.kanade.tachiyomi.multisrc.foolslide
|
package eu.kanade.tachiyomi.multisrc.foolslide
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.multisrc.ThemeSourceData.SingleLang
|
import generator.ThemeSourceData.MultiLang
|
||||||
import eu.kanade.tachiyomi.multisrc.ThemeSourceData.MultiLang
|
import generator.ThemeSourceData.SingleLang
|
||||||
import eu.kanade.tachiyomi.multisrc.ThemeSourceGenerator
|
import generator.ThemeSourceGenerator
|
||||||
|
|
||||||
class FoolSlideGenerator : ThemeSourceGenerator {
|
class FoolSlideGenerator : ThemeSourceGenerator {
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package eu.kanade.tachiyomi.multisrc.genkan
|
package eu.kanade.tachiyomi.multisrc.genkan
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.multisrc.ThemeSourceData.SingleLang
|
import generator.ThemeSourceData.MultiLang
|
||||||
import eu.kanade.tachiyomi.multisrc.ThemeSourceData.MultiLang
|
import generator.ThemeSourceData.SingleLang
|
||||||
import eu.kanade.tachiyomi.multisrc.ThemeSourceGenerator
|
import generator.ThemeSourceGenerator
|
||||||
|
|
||||||
class GenkanGenerator : ThemeSourceGenerator {
|
class GenkanGenerator : ThemeSourceGenerator {
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package eu.kanade.tachiyomi.multisrc.genkan
|
package eu.kanade.tachiyomi.multisrc.genkan
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.multisrc.ThemeSourceData.SingleLang
|
import generator.ThemeSourceData.SingleLang
|
||||||
import eu.kanade.tachiyomi.multisrc.ThemeSourceGenerator
|
import generator.ThemeSourceGenerator
|
||||||
|
|
||||||
class GenkanOriginalGenerator : ThemeSourceGenerator {
|
class GenkanOriginalGenerator : ThemeSourceGenerator {
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package eu.kanade.tachiyomi.multisrc.madara
|
package eu.kanade.tachiyomi.multisrc.madara
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.multisrc.ThemeSourceData.SingleLang
|
import generator.ThemeSourceData.MultiLang
|
||||||
import eu.kanade.tachiyomi.multisrc.ThemeSourceData.MultiLang
|
import generator.ThemeSourceData.SingleLang
|
||||||
import eu.kanade.tachiyomi.multisrc.ThemeSourceGenerator
|
import generator.ThemeSourceGenerator
|
||||||
|
|
||||||
class MadaraGenerator : ThemeSourceGenerator {
|
class MadaraGenerator : ThemeSourceGenerator {
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package eu.kanade.tachiyomi.multisrc.mangabox
|
package eu.kanade.tachiyomi.multisrc.mangabox
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.multisrc.ThemeSourceData.SingleLang
|
import generator.ThemeSourceData.SingleLang
|
||||||
import eu.kanade.tachiyomi.multisrc.ThemeSourceGenerator
|
import generator.ThemeSourceGenerator
|
||||||
|
|
||||||
class MangaBoxGenerator : ThemeSourceGenerator {
|
class MangaBoxGenerator : ThemeSourceGenerator {
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package eu.kanade.tachiyomi.multisrc.mangadventure
|
package eu.kanade.tachiyomi.multisrc.mangadventure
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.multisrc.ThemeSourceData.SingleLang
|
import generator.ThemeSourceData.SingleLang
|
||||||
import eu.kanade.tachiyomi.multisrc.ThemeSourceGenerator
|
import generator.ThemeSourceGenerator
|
||||||
|
|
||||||
/** [MangAdventure] source generator. */
|
/** [MangAdventure] source generator. */
|
||||||
class MangAdventureGenerator : ThemeSourceGenerator {
|
class MangAdventureGenerator : ThemeSourceGenerator {
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
package eu.kanade.tachiyomi.multisrc.paprika
|
package eu.kanade.tachiyomi.multisrc.paprika
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.multisrc.ThemeSourceData.SingleLang
|
import generator.ThemeSourceData.SingleLang
|
||||||
import eu.kanade.tachiyomi.multisrc.ThemeSourceGenerator
|
import generator.ThemeSourceGenerator
|
||||||
import eu.kanade.tachiyomi.source.Source
|
|
||||||
import eu.kanade.tachiyomi.source.SourceFactory
|
|
||||||
|
|
||||||
|
|
||||||
class PaprikaAltGenerator : ThemeSourceGenerator {
|
class PaprikaAltGenerator : ThemeSourceGenerator {
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
package eu.kanade.tachiyomi.multisrc.paprika
|
package eu.kanade.tachiyomi.multisrc.paprika
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.multisrc.ThemeSourceData.SingleLang
|
import generator.ThemeSourceData.SingleLang
|
||||||
import eu.kanade.tachiyomi.multisrc.ThemeSourceGenerator
|
import generator.ThemeSourceGenerator
|
||||||
import eu.kanade.tachiyomi.source.Source
|
|
||||||
import eu.kanade.tachiyomi.source.SourceFactory
|
|
||||||
|
|
||||||
|
|
||||||
class PaprikaGenerator : ThemeSourceGenerator {
|
class PaprikaGenerator : ThemeSourceGenerator {
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package eu.kanade.tachiyomi.multisrc.wpcomics
|
package eu.kanade.tachiyomi.multisrc.wpcomics
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.multisrc.ThemeSourceData.SingleLang
|
import generator.ThemeSourceData.MultiLang
|
||||||
import eu.kanade.tachiyomi.multisrc.ThemeSourceData.MultiLang
|
import generator.ThemeSourceData.SingleLang
|
||||||
import eu.kanade.tachiyomi.multisrc.ThemeSourceGenerator
|
import generator.ThemeSourceGenerator
|
||||||
|
|
||||||
class WPComicsGenerator : ThemeSourceGenerator {
|
class WPComicsGenerator : ThemeSourceGenerator {
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package eu.kanade.tachiyomi.multisrc.wpmangareader
|
package eu.kanade.tachiyomi.multisrc.wpmangareader
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.multisrc.ThemeSourceData.SingleLang
|
import generator.ThemeSourceData.SingleLang
|
||||||
import eu.kanade.tachiyomi.multisrc.ThemeSourceGenerator
|
import generator.ThemeSourceGenerator
|
||||||
|
|
||||||
class WPMangaReaderGenerator : ThemeSourceGenerator {
|
class WPMangaReaderGenerator : ThemeSourceGenerator {
|
||||||
|
|
||||||
|
@ -19,7 +19,6 @@ class WPMangaReaderGenerator : ThemeSourceGenerator {
|
||||||
SingleLang("Sekaikomik", "https://www.sekaikomik.com", "id", true),
|
SingleLang("Sekaikomik", "https://www.sekaikomik.com", "id", true),
|
||||||
SingleLang("TurkToon", "https://turktoon.com", "tr"),
|
SingleLang("TurkToon", "https://turktoon.com", "tr"),
|
||||||
SingleLang("Gecenin Lordu", "https://geceninlordu.com/", "tr", overrideVersionCode = 1),
|
SingleLang("Gecenin Lordu", "https://geceninlordu.com/", "tr", overrideVersionCode = 1),
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package eu.kanade.tachiyomi.multisrc.wpmangastream
|
package eu.kanade.tachiyomi.multisrc.wpmangastream
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.multisrc.ThemeSourceData.SingleLang
|
import generator.ThemeSourceData.SingleLang
|
||||||
import eu.kanade.tachiyomi.multisrc.ThemeSourceGenerator
|
import generator.ThemeSourceGenerator
|
||||||
|
|
||||||
class WPMangaStreamGenerator : ThemeSourceGenerator {
|
class WPMangaStreamGenerator : ThemeSourceGenerator {
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package eu.kanade.tachiyomi.multisrc
|
package generator
|
||||||
|
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package eu.kanade.tachiyomi.multisrc
|
package generator
|
||||||
|
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.nio.file.Files
|
import java.nio.file.Files
|
Loading…
Reference in New Issue