diff --git a/annotations/build.gradle.kts b/annotations/build.gradle.kts new file mode 100644 index 000000000..0f69c7777 --- /dev/null +++ b/annotations/build.gradle.kts @@ -0,0 +1,7 @@ +plugins { + id("kotlin") +} + +dependencies { + implementation(Deps.kotlin.stdlib) +} diff --git a/annotations/src/main/kotlin/MultiSource.kt b/annotations/src/main/kotlin/MultiSource.kt new file mode 100644 index 000000000..e82273f00 --- /dev/null +++ b/annotations/src/main/kotlin/MultiSource.kt @@ -0,0 +1,5 @@ +package eu.kanade.tachiyomi.annotations + +@Retention(AnnotationRetention.SOURCE) +@Target(AnnotationTarget.CLASS) +annotation class MultiSource diff --git a/buildSrc/.gitignore b/buildSrc/.gitignore new file mode 100644 index 000000000..67bcc2f72 --- /dev/null +++ b/buildSrc/.gitignore @@ -0,0 +1,2 @@ +.gradle/ +build/ diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts new file mode 100644 index 000000000..3d7a9541b --- /dev/null +++ b/buildSrc/build.gradle.kts @@ -0,0 +1,7 @@ +plugins { + `kotlin-dsl` +} + +repositories { + jcenter() +} diff --git a/buildSrc/src/main/kotlin/Deps.kt b/buildSrc/src/main/kotlin/Deps.kt new file mode 100644 index 000000000..efa5fb004 --- /dev/null +++ b/buildSrc/src/main/kotlin/Deps.kt @@ -0,0 +1,6 @@ +object Deps { + object kotlin { + const val version = "1.3.72" + const val stdlib = "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$version" + } +} diff --git a/common.gradle b/common.gradle index 481780a54..219279952 100644 --- a/common.gradle +++ b/common.gradle @@ -62,6 +62,8 @@ repositories { } dependencies { + compileOnly project(":annotations") + // Lib 1.2, but using specific commit so we don't need to bump up the version compileOnly "com.github.tachiyomiorg:extensions-lib:a596412" diff --git a/settings.gradle b/settings.gradle index dc61dc57a..88fd7b507 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,3 +1,5 @@ +include(':annotations') + include ':lib-ratelimit' project(':lib-ratelimit').projectDir = new File("lib/ratelimit") diff --git a/src/all/boommanga/src/eu/kanade/tachiyomi/extension/all/boommanga/BoomMangaFactory.kt b/src/all/boommanga/src/eu/kanade/tachiyomi/extension/all/boommanga/BoomMangaFactory.kt index 3ec73df65..9bede020c 100644 --- a/src/all/boommanga/src/eu/kanade/tachiyomi/extension/all/boommanga/BoomMangaFactory.kt +++ b/src/all/boommanga/src/eu/kanade/tachiyomi/extension/all/boommanga/BoomMangaFactory.kt @@ -1,11 +1,13 @@ package eu.kanade.tachiyomi.extension.all.boommanga +import eu.kanade.tachiyomi.annotations.MultiSource import eu.kanade.tachiyomi.source.Source import eu.kanade.tachiyomi.source.SourceFactory import eu.kanade.tachiyomi.source.model.SManga import org.jsoup.nodes.Document import org.jsoup.nodes.Element +@MultiSource class BoomMangaFactory : SourceFactory { override fun createSources(): List = listOf( BoomMangacom(), diff --git a/src/all/comicake/src/eu/kanade/tachiyomi/extension/all/comicake/ComiCakeFactory.kt b/src/all/comicake/src/eu/kanade/tachiyomi/extension/all/comicake/ComiCakeFactory.kt index 34541018e..5f685c3b1 100644 --- a/src/all/comicake/src/eu/kanade/tachiyomi/extension/all/comicake/ComiCakeFactory.kt +++ b/src/all/comicake/src/eu/kanade/tachiyomi/extension/all/comicake/ComiCakeFactory.kt @@ -1,8 +1,10 @@ package eu.kanade.tachiyomi.extension.all.comicake +import eu.kanade.tachiyomi.annotations.MultiSource import eu.kanade.tachiyomi.source.Source import eu.kanade.tachiyomi.source.SourceFactory +@MultiSource class ComiCakeFactory : SourceFactory { override fun createSources(): List = listOf( LetItGoScans(), diff --git a/src/all/emerald/src/eu/kanade/tachiyomi/extension/all/emerald/EmeraldFactory.kt b/src/all/emerald/src/eu/kanade/tachiyomi/extension/all/emerald/EmeraldFactory.kt index 715998ceb..2042018ac 100644 --- a/src/all/emerald/src/eu/kanade/tachiyomi/extension/all/emerald/EmeraldFactory.kt +++ b/src/all/emerald/src/eu/kanade/tachiyomi/extension/all/emerald/EmeraldFactory.kt @@ -1,8 +1,10 @@ package eu.kanade.tachiyomi.extension.all.emerald +import eu.kanade.tachiyomi.annotations.MultiSource import eu.kanade.tachiyomi.source.Source import eu.kanade.tachiyomi.source.SourceFactory +@MultiSource class EmeraldFactory : SourceFactory { override fun createSources(): List = languages.map { Mangawindow(it.first, it.second) } + languages.map { Batoto(it.first, it.second) } } diff --git a/src/all/fmreader/src/eu/kanade/tachiyomi/extension/all/fmreader/FMReaderFactory.kt b/src/all/fmreader/src/eu/kanade/tachiyomi/extension/all/fmreader/FMReaderFactory.kt index 319e3663b..2e5c88032 100644 --- a/src/all/fmreader/src/eu/kanade/tachiyomi/extension/all/fmreader/FMReaderFactory.kt +++ b/src/all/fmreader/src/eu/kanade/tachiyomi/extension/all/fmreader/FMReaderFactory.kt @@ -1,5 +1,6 @@ package eu.kanade.tachiyomi.extension.all.fmreader +import eu.kanade.tachiyomi.annotations.MultiSource import eu.kanade.tachiyomi.network.GET import eu.kanade.tachiyomi.network.POST import eu.kanade.tachiyomi.network.asObservableSuccess @@ -21,6 +22,7 @@ import org.jsoup.nodes.Document import org.jsoup.nodes.Element import rx.Observable +@MultiSource class FMReaderFactory : SourceFactory { override fun createSources(): List = listOf( LHTranslation(), diff --git a/src/all/foolslide/src/eu/kanade/tachiyomi/extension/all/foolslide/FoolSlideFactory.kt b/src/all/foolslide/src/eu/kanade/tachiyomi/extension/all/foolslide/FoolSlideFactory.kt index 6582de7b2..4309af024 100644 --- a/src/all/foolslide/src/eu/kanade/tachiyomi/extension/all/foolslide/FoolSlideFactory.kt +++ b/src/all/foolslide/src/eu/kanade/tachiyomi/extension/all/foolslide/FoolSlideFactory.kt @@ -7,6 +7,7 @@ import android.support.v7.preference.PreferenceScreen import android.widget.Toast import com.github.salomonbrys.kotson.get import com.google.gson.JsonParser +import eu.kanade.tachiyomi.annotations.MultiSource import eu.kanade.tachiyomi.extension.BuildConfig import eu.kanade.tachiyomi.network.GET import eu.kanade.tachiyomi.source.ConfigurableSource @@ -24,6 +25,7 @@ import org.jsoup.nodes.Element import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get +@MultiSource class FoolSlideFactory : SourceFactory { override fun createSources(): List = listOf( JaiminisBox(), diff --git a/src/all/genkan/src/eu/kanade/tachiyomi/extension/all/genkan/GenkanFactory.kt b/src/all/genkan/src/eu/kanade/tachiyomi/extension/all/genkan/GenkanFactory.kt index dc5d0f74d..34db337a8 100644 --- a/src/all/genkan/src/eu/kanade/tachiyomi/extension/all/genkan/GenkanFactory.kt +++ b/src/all/genkan/src/eu/kanade/tachiyomi/extension/all/genkan/GenkanFactory.kt @@ -1,8 +1,10 @@ package eu.kanade.tachiyomi.extension.all.genkan +import eu.kanade.tachiyomi.annotations.MultiSource import eu.kanade.tachiyomi.source.Source import eu.kanade.tachiyomi.source.SourceFactory +@MultiSource class GenkanFactory : SourceFactory { override fun createSources(): List = listOf( LeviatanScans(), diff --git a/src/all/madara/src/eu/kanade/tachiyomi/extension/all/madara/MadaraFactory.kt b/src/all/madara/src/eu/kanade/tachiyomi/extension/all/madara/MadaraFactory.kt index f9568f388..270a422b6 100644 --- a/src/all/madara/src/eu/kanade/tachiyomi/extension/all/madara/MadaraFactory.kt +++ b/src/all/madara/src/eu/kanade/tachiyomi/extension/all/madara/MadaraFactory.kt @@ -1,6 +1,7 @@ package eu.kanade.tachiyomi.extension.all.madara import android.annotation.SuppressLint +import eu.kanade.tachiyomi.annotations.MultiSource import eu.kanade.tachiyomi.lib.dataimage.DataImageInterceptor import eu.kanade.tachiyomi.lib.dataimage.dataImageAsUrl import eu.kanade.tachiyomi.network.GET @@ -26,6 +27,7 @@ import org.jsoup.nodes.Document import org.jsoup.nodes.Element import rx.Observable +@MultiSource class MadaraFactory : SourceFactory { override fun createSources(): List = listOf( AdonisFansub(), diff --git a/src/all/mangabox/src/eu/kanade/tachiyomi/extension/all/mangabox/MangaBoxFactory.kt b/src/all/mangabox/src/eu/kanade/tachiyomi/extension/all/mangabox/MangaBoxFactory.kt index c71bc6e89..a7200cf34 100644 --- a/src/all/mangabox/src/eu/kanade/tachiyomi/extension/all/mangabox/MangaBoxFactory.kt +++ b/src/all/mangabox/src/eu/kanade/tachiyomi/extension/all/mangabox/MangaBoxFactory.kt @@ -1,5 +1,6 @@ package eu.kanade.tachiyomi.extension.all.mangabox +import eu.kanade.tachiyomi.annotations.MultiSource import eu.kanade.tachiyomi.network.GET import eu.kanade.tachiyomi.source.Source import eu.kanade.tachiyomi.source.SourceFactory @@ -14,6 +15,7 @@ import okhttp3.Request import okhttp3.Response import org.jsoup.nodes.Element +@MultiSource class MangaBoxFactory : SourceFactory { override fun createSources(): List = listOf( Mangakakalot(), diff --git a/src/all/mmrcms/src/eu/kanade/tachiyomi/extension/all/mmrcms/MyMangaReaderCMSSources.kt b/src/all/mmrcms/src/eu/kanade/tachiyomi/extension/all/mmrcms/MyMangaReaderCMSSources.kt index 6ff654ed4..5919942f6 100644 --- a/src/all/mmrcms/src/eu/kanade/tachiyomi/extension/all/mmrcms/MyMangaReaderCMSSources.kt +++ b/src/all/mmrcms/src/eu/kanade/tachiyomi/extension/all/mmrcms/MyMangaReaderCMSSources.kt @@ -6,8 +6,10 @@ import com.github.salomonbrys.kotson.string import com.google.gson.JsonArray import com.google.gson.JsonObject import com.google.gson.JsonParser +import eu.kanade.tachiyomi.annotations.MultiSource import eu.kanade.tachiyomi.source.SourceFactory +@MultiSource class MyMangaReaderCMSSources : SourceFactory { /** * Create a new copy of the sources 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 index f9d99a81e..c3c92134f 100644 --- 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 @@ -1,8 +1,10 @@ package eu.kanade.tachiyomi.extension.all.paprika +import eu.kanade.tachiyomi.annotations.MultiSource import eu.kanade.tachiyomi.source.Source import eu.kanade.tachiyomi.source.SourceFactory +@MultiSource class PaprikaFactory : SourceFactory { override fun createSources(): List = listOf( MangazukiXyz(), diff --git a/src/all/wpcomics/src/eu/kanade/tachiyomi/extension/all/wpcomics/WPComicsFactory.kt b/src/all/wpcomics/src/eu/kanade/tachiyomi/extension/all/wpcomics/WPComicsFactory.kt index 87367dc33..2f9cb9ee0 100644 --- a/src/all/wpcomics/src/eu/kanade/tachiyomi/extension/all/wpcomics/WPComicsFactory.kt +++ b/src/all/wpcomics/src/eu/kanade/tachiyomi/extension/all/wpcomics/WPComicsFactory.kt @@ -1,5 +1,6 @@ package eu.kanade.tachiyomi.extension.all.wpcomics +import eu.kanade.tachiyomi.annotations.MultiSource import eu.kanade.tachiyomi.network.GET import eu.kanade.tachiyomi.source.Source import eu.kanade.tachiyomi.source.SourceFactory @@ -17,6 +18,7 @@ import okhttp3.Response import org.jsoup.nodes.Document import org.jsoup.nodes.Element +@MultiSource class WPComicsFactory : SourceFactory { override fun createSources(): List = listOf( ManhuaPlus(), diff --git a/src/all/wpmangastream/src/eu/kanade/tachiyomi/extension/all/wpmangastream/WPMangaStreamFactory.kt b/src/all/wpmangastream/src/eu/kanade/tachiyomi/extension/all/wpmangastream/WPMangaStreamFactory.kt index 9d468bcb5..a52986a04 100644 --- a/src/all/wpmangastream/src/eu/kanade/tachiyomi/extension/all/wpmangastream/WPMangaStreamFactory.kt +++ b/src/all/wpmangastream/src/eu/kanade/tachiyomi/extension/all/wpmangastream/WPMangaStreamFactory.kt @@ -1,5 +1,6 @@ package eu.kanade.tachiyomi.extension.all.wpmangastream +import eu.kanade.tachiyomi.annotations.MultiSource import eu.kanade.tachiyomi.network.GET import eu.kanade.tachiyomi.network.asObservableSuccess import eu.kanade.tachiyomi.source.Source @@ -21,6 +22,7 @@ import org.jsoup.nodes.Document import org.jsoup.nodes.Element import rx.Observable +@MultiSource class WPMangaStreamFactory : SourceFactory { override fun createSources(): List = listOf( Kiryuu(), diff --git a/src/all/zbulu/src/eu/kanade/tachiyomi/extension/all/zbulu/ZbuluFactory.kt b/src/all/zbulu/src/eu/kanade/tachiyomi/extension/all/zbulu/ZbuluFactory.kt index c34517e4f..08dd51f71 100644 --- a/src/all/zbulu/src/eu/kanade/tachiyomi/extension/all/zbulu/ZbuluFactory.kt +++ b/src/all/zbulu/src/eu/kanade/tachiyomi/extension/all/zbulu/ZbuluFactory.kt @@ -1,8 +1,10 @@ package eu.kanade.tachiyomi.extension.all.zbulu +import eu.kanade.tachiyomi.annotations.MultiSource import eu.kanade.tachiyomi.source.Source import eu.kanade.tachiyomi.source.SourceFactory +@MultiSource class ZbuluFactory : SourceFactory { override fun createSources(): List = listOf( HolyManga(), diff --git a/src/en/mangareader/src/eu/kanade/tachiyomi/extension/en/mangareader/MRPFactory.kt b/src/en/mangareader/src/eu/kanade/tachiyomi/extension/en/mangareader/MRPFactory.kt index 9b02685d9..5402044a9 100644 --- a/src/en/mangareader/src/eu/kanade/tachiyomi/extension/en/mangareader/MRPFactory.kt +++ b/src/en/mangareader/src/eu/kanade/tachiyomi/extension/en/mangareader/MRPFactory.kt @@ -1,8 +1,10 @@ package eu.kanade.tachiyomi.extension.en.mangareader +import eu.kanade.tachiyomi.annotations.MultiSource import eu.kanade.tachiyomi.source.Source import eu.kanade.tachiyomi.source.SourceFactory +@MultiSource class MRPFactory : SourceFactory { override fun createSources(): List = listOf( Mangareader(), diff --git a/src/ja/mangaraw/src/eu/kanade/tachiyomi/extension/ja/mangaraw/MangaRawFactory.kt b/src/ja/mangaraw/src/eu/kanade/tachiyomi/extension/ja/mangaraw/MangaRawFactory.kt index f9fa78cef..0bdd4e165 100644 --- a/src/ja/mangaraw/src/eu/kanade/tachiyomi/extension/ja/mangaraw/MangaRawFactory.kt +++ b/src/ja/mangaraw/src/eu/kanade/tachiyomi/extension/ja/mangaraw/MangaRawFactory.kt @@ -1,8 +1,10 @@ package eu.kanade.tachiyomi.extension.ja.mangaraw +import eu.kanade.tachiyomi.annotations.MultiSource import eu.kanade.tachiyomi.source.Source import eu.kanade.tachiyomi.source.SourceFactory +@MultiSource class MangaRawFactory : SourceFactory { override fun createSources(): List = listOf( Manga1000(), diff --git a/src/pt/mangasproject/src/eu/kanade/tachiyomi/extension/pt/mangasproject/MangasProjectFactory.kt b/src/pt/mangasproject/src/eu/kanade/tachiyomi/extension/pt/mangasproject/MangasProjectFactory.kt index 846b83df3..b31f3db01 100644 --- a/src/pt/mangasproject/src/eu/kanade/tachiyomi/extension/pt/mangasproject/MangasProjectFactory.kt +++ b/src/pt/mangasproject/src/eu/kanade/tachiyomi/extension/pt/mangasproject/MangasProjectFactory.kt @@ -1,8 +1,10 @@ package eu.kanade.tachiyomi.extension.pt.mangasproject +import eu.kanade.tachiyomi.annotations.MultiSource import eu.kanade.tachiyomi.source.Source import eu.kanade.tachiyomi.source.SourceFactory +@MultiSource class MangasProjectFactory : SourceFactory { override fun createSources(): List = listOf( LeitorNet(),