Annotate multi-source factories
Doesn't do anything yet. Will add an annotation processor to do add info the repo JSON in the future.
This commit is contained in:
parent
7e2e2f39fe
commit
4079830822
|
@ -0,0 +1,7 @@
|
||||||
|
plugins {
|
||||||
|
id("kotlin")
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation(Deps.kotlin.stdlib)
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
package eu.kanade.tachiyomi.annotations
|
||||||
|
|
||||||
|
@Retention(AnnotationRetention.SOURCE)
|
||||||
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
annotation class MultiSource
|
|
@ -0,0 +1,2 @@
|
||||||
|
.gradle/
|
||||||
|
build/
|
|
@ -0,0 +1,7 @@
|
||||||
|
plugins {
|
||||||
|
`kotlin-dsl`
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
jcenter()
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
object Deps {
|
||||||
|
object kotlin {
|
||||||
|
const val version = "1.3.72"
|
||||||
|
const val stdlib = "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$version"
|
||||||
|
}
|
||||||
|
}
|
|
@ -62,6 +62,8 @@ repositories {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
compileOnly project(":annotations")
|
||||||
|
|
||||||
// Lib 1.2, but using specific commit so we don't need to bump up the version
|
// Lib 1.2, but using specific commit so we don't need to bump up the version
|
||||||
compileOnly "com.github.tachiyomiorg:extensions-lib:a596412"
|
compileOnly "com.github.tachiyomiorg:extensions-lib:a596412"
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
include(':annotations')
|
||||||
|
|
||||||
include ':lib-ratelimit'
|
include ':lib-ratelimit'
|
||||||
project(':lib-ratelimit').projectDir = new File("lib/ratelimit")
|
project(':lib-ratelimit').projectDir = new File("lib/ratelimit")
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
package eu.kanade.tachiyomi.extension.all.boommanga
|
package eu.kanade.tachiyomi.extension.all.boommanga
|
||||||
|
|
||||||
|
import eu.kanade.tachiyomi.annotations.MultiSource
|
||||||
import eu.kanade.tachiyomi.source.Source
|
import eu.kanade.tachiyomi.source.Source
|
||||||
import eu.kanade.tachiyomi.source.SourceFactory
|
import eu.kanade.tachiyomi.source.SourceFactory
|
||||||
import eu.kanade.tachiyomi.source.model.SManga
|
import eu.kanade.tachiyomi.source.model.SManga
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
|
|
||||||
|
@MultiSource
|
||||||
class BoomMangaFactory : SourceFactory {
|
class BoomMangaFactory : SourceFactory {
|
||||||
override fun createSources(): List<Source> = listOf(
|
override fun createSources(): List<Source> = listOf(
|
||||||
BoomMangacom(),
|
BoomMangacom(),
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
package eu.kanade.tachiyomi.extension.all.comicake
|
package eu.kanade.tachiyomi.extension.all.comicake
|
||||||
|
|
||||||
|
import eu.kanade.tachiyomi.annotations.MultiSource
|
||||||
import eu.kanade.tachiyomi.source.Source
|
import eu.kanade.tachiyomi.source.Source
|
||||||
import eu.kanade.tachiyomi.source.SourceFactory
|
import eu.kanade.tachiyomi.source.SourceFactory
|
||||||
|
|
||||||
|
@MultiSource
|
||||||
class ComiCakeFactory : SourceFactory {
|
class ComiCakeFactory : SourceFactory {
|
||||||
override fun createSources(): List<Source> = listOf(
|
override fun createSources(): List<Source> = listOf(
|
||||||
LetItGoScans(),
|
LetItGoScans(),
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
package eu.kanade.tachiyomi.extension.all.emerald
|
package eu.kanade.tachiyomi.extension.all.emerald
|
||||||
|
|
||||||
|
import eu.kanade.tachiyomi.annotations.MultiSource
|
||||||
import eu.kanade.tachiyomi.source.Source
|
import eu.kanade.tachiyomi.source.Source
|
||||||
import eu.kanade.tachiyomi.source.SourceFactory
|
import eu.kanade.tachiyomi.source.SourceFactory
|
||||||
|
|
||||||
|
@MultiSource
|
||||||
class EmeraldFactory : SourceFactory {
|
class EmeraldFactory : SourceFactory {
|
||||||
override fun createSources(): List<Source> = languages.map { Mangawindow(it.first, it.second) } + languages.map { Batoto(it.first, it.second) }
|
override fun createSources(): List<Source> = languages.map { Mangawindow(it.first, it.second) } + languages.map { Batoto(it.first, it.second) }
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package eu.kanade.tachiyomi.extension.all.fmreader
|
package eu.kanade.tachiyomi.extension.all.fmreader
|
||||||
|
|
||||||
|
import eu.kanade.tachiyomi.annotations.MultiSource
|
||||||
import eu.kanade.tachiyomi.network.GET
|
import eu.kanade.tachiyomi.network.GET
|
||||||
import eu.kanade.tachiyomi.network.POST
|
import eu.kanade.tachiyomi.network.POST
|
||||||
import eu.kanade.tachiyomi.network.asObservableSuccess
|
import eu.kanade.tachiyomi.network.asObservableSuccess
|
||||||
|
@ -21,6 +22,7 @@ import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import rx.Observable
|
import rx.Observable
|
||||||
|
|
||||||
|
@MultiSource
|
||||||
class FMReaderFactory : SourceFactory {
|
class FMReaderFactory : SourceFactory {
|
||||||
override fun createSources(): List<Source> = listOf(
|
override fun createSources(): List<Source> = listOf(
|
||||||
LHTranslation(),
|
LHTranslation(),
|
||||||
|
|
|
@ -7,6 +7,7 @@ import android.support.v7.preference.PreferenceScreen
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
import com.github.salomonbrys.kotson.get
|
import com.github.salomonbrys.kotson.get
|
||||||
import com.google.gson.JsonParser
|
import com.google.gson.JsonParser
|
||||||
|
import eu.kanade.tachiyomi.annotations.MultiSource
|
||||||
import eu.kanade.tachiyomi.extension.BuildConfig
|
import eu.kanade.tachiyomi.extension.BuildConfig
|
||||||
import eu.kanade.tachiyomi.network.GET
|
import eu.kanade.tachiyomi.network.GET
|
||||||
import eu.kanade.tachiyomi.source.ConfigurableSource
|
import eu.kanade.tachiyomi.source.ConfigurableSource
|
||||||
|
@ -24,6 +25,7 @@ import org.jsoup.nodes.Element
|
||||||
import uy.kohesive.injekt.Injekt
|
import uy.kohesive.injekt.Injekt
|
||||||
import uy.kohesive.injekt.api.get
|
import uy.kohesive.injekt.api.get
|
||||||
|
|
||||||
|
@MultiSource
|
||||||
class FoolSlideFactory : SourceFactory {
|
class FoolSlideFactory : SourceFactory {
|
||||||
override fun createSources(): List<Source> = listOf(
|
override fun createSources(): List<Source> = listOf(
|
||||||
JaiminisBox(),
|
JaiminisBox(),
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
package eu.kanade.tachiyomi.extension.all.genkan
|
package eu.kanade.tachiyomi.extension.all.genkan
|
||||||
|
|
||||||
|
import eu.kanade.tachiyomi.annotations.MultiSource
|
||||||
import eu.kanade.tachiyomi.source.Source
|
import eu.kanade.tachiyomi.source.Source
|
||||||
import eu.kanade.tachiyomi.source.SourceFactory
|
import eu.kanade.tachiyomi.source.SourceFactory
|
||||||
|
|
||||||
|
@MultiSource
|
||||||
class GenkanFactory : SourceFactory {
|
class GenkanFactory : SourceFactory {
|
||||||
override fun createSources(): List<Source> = listOf(
|
override fun createSources(): List<Source> = listOf(
|
||||||
LeviatanScans(),
|
LeviatanScans(),
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package eu.kanade.tachiyomi.extension.all.madara
|
package eu.kanade.tachiyomi.extension.all.madara
|
||||||
|
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
|
import eu.kanade.tachiyomi.annotations.MultiSource
|
||||||
import eu.kanade.tachiyomi.lib.dataimage.DataImageInterceptor
|
import eu.kanade.tachiyomi.lib.dataimage.DataImageInterceptor
|
||||||
import eu.kanade.tachiyomi.lib.dataimage.dataImageAsUrl
|
import eu.kanade.tachiyomi.lib.dataimage.dataImageAsUrl
|
||||||
import eu.kanade.tachiyomi.network.GET
|
import eu.kanade.tachiyomi.network.GET
|
||||||
|
@ -26,6 +27,7 @@ import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import rx.Observable
|
import rx.Observable
|
||||||
|
|
||||||
|
@MultiSource
|
||||||
class MadaraFactory : SourceFactory {
|
class MadaraFactory : SourceFactory {
|
||||||
override fun createSources(): List<Source> = listOf(
|
override fun createSources(): List<Source> = listOf(
|
||||||
AdonisFansub(),
|
AdonisFansub(),
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package eu.kanade.tachiyomi.extension.all.mangabox
|
package eu.kanade.tachiyomi.extension.all.mangabox
|
||||||
|
|
||||||
|
import eu.kanade.tachiyomi.annotations.MultiSource
|
||||||
import eu.kanade.tachiyomi.network.GET
|
import eu.kanade.tachiyomi.network.GET
|
||||||
import eu.kanade.tachiyomi.source.Source
|
import eu.kanade.tachiyomi.source.Source
|
||||||
import eu.kanade.tachiyomi.source.SourceFactory
|
import eu.kanade.tachiyomi.source.SourceFactory
|
||||||
|
@ -14,6 +15,7 @@ import okhttp3.Request
|
||||||
import okhttp3.Response
|
import okhttp3.Response
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
|
|
||||||
|
@MultiSource
|
||||||
class MangaBoxFactory : SourceFactory {
|
class MangaBoxFactory : SourceFactory {
|
||||||
override fun createSources(): List<Source> = listOf(
|
override fun createSources(): List<Source> = listOf(
|
||||||
Mangakakalot(),
|
Mangakakalot(),
|
||||||
|
|
|
@ -6,8 +6,10 @@ import com.github.salomonbrys.kotson.string
|
||||||
import com.google.gson.JsonArray
|
import com.google.gson.JsonArray
|
||||||
import com.google.gson.JsonObject
|
import com.google.gson.JsonObject
|
||||||
import com.google.gson.JsonParser
|
import com.google.gson.JsonParser
|
||||||
|
import eu.kanade.tachiyomi.annotations.MultiSource
|
||||||
import eu.kanade.tachiyomi.source.SourceFactory
|
import eu.kanade.tachiyomi.source.SourceFactory
|
||||||
|
|
||||||
|
@MultiSource
|
||||||
class MyMangaReaderCMSSources : SourceFactory {
|
class MyMangaReaderCMSSources : SourceFactory {
|
||||||
/**
|
/**
|
||||||
* Create a new copy of the sources
|
* Create a new copy of the sources
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
package eu.kanade.tachiyomi.extension.all.paprika
|
package eu.kanade.tachiyomi.extension.all.paprika
|
||||||
|
|
||||||
|
import eu.kanade.tachiyomi.annotations.MultiSource
|
||||||
import eu.kanade.tachiyomi.source.Source
|
import eu.kanade.tachiyomi.source.Source
|
||||||
import eu.kanade.tachiyomi.source.SourceFactory
|
import eu.kanade.tachiyomi.source.SourceFactory
|
||||||
|
|
||||||
|
@MultiSource
|
||||||
class PaprikaFactory : SourceFactory {
|
class PaprikaFactory : SourceFactory {
|
||||||
override fun createSources(): List<Source> = listOf(
|
override fun createSources(): List<Source> = listOf(
|
||||||
MangazukiXyz(),
|
MangazukiXyz(),
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package eu.kanade.tachiyomi.extension.all.wpcomics
|
package eu.kanade.tachiyomi.extension.all.wpcomics
|
||||||
|
|
||||||
|
import eu.kanade.tachiyomi.annotations.MultiSource
|
||||||
import eu.kanade.tachiyomi.network.GET
|
import eu.kanade.tachiyomi.network.GET
|
||||||
import eu.kanade.tachiyomi.source.Source
|
import eu.kanade.tachiyomi.source.Source
|
||||||
import eu.kanade.tachiyomi.source.SourceFactory
|
import eu.kanade.tachiyomi.source.SourceFactory
|
||||||
|
@ -17,6 +18,7 @@ import okhttp3.Response
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
|
|
||||||
|
@MultiSource
|
||||||
class WPComicsFactory : SourceFactory {
|
class WPComicsFactory : SourceFactory {
|
||||||
override fun createSources(): List<Source> = listOf(
|
override fun createSources(): List<Source> = listOf(
|
||||||
ManhuaPlus(),
|
ManhuaPlus(),
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package eu.kanade.tachiyomi.extension.all.wpmangastream
|
package eu.kanade.tachiyomi.extension.all.wpmangastream
|
||||||
|
|
||||||
|
import eu.kanade.tachiyomi.annotations.MultiSource
|
||||||
import eu.kanade.tachiyomi.network.GET
|
import eu.kanade.tachiyomi.network.GET
|
||||||
import eu.kanade.tachiyomi.network.asObservableSuccess
|
import eu.kanade.tachiyomi.network.asObservableSuccess
|
||||||
import eu.kanade.tachiyomi.source.Source
|
import eu.kanade.tachiyomi.source.Source
|
||||||
|
@ -21,6 +22,7 @@ import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import rx.Observable
|
import rx.Observable
|
||||||
|
|
||||||
|
@MultiSource
|
||||||
class WPMangaStreamFactory : SourceFactory {
|
class WPMangaStreamFactory : SourceFactory {
|
||||||
override fun createSources(): List<Source> = listOf(
|
override fun createSources(): List<Source> = listOf(
|
||||||
Kiryuu(),
|
Kiryuu(),
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
package eu.kanade.tachiyomi.extension.all.zbulu
|
package eu.kanade.tachiyomi.extension.all.zbulu
|
||||||
|
|
||||||
|
import eu.kanade.tachiyomi.annotations.MultiSource
|
||||||
import eu.kanade.tachiyomi.source.Source
|
import eu.kanade.tachiyomi.source.Source
|
||||||
import eu.kanade.tachiyomi.source.SourceFactory
|
import eu.kanade.tachiyomi.source.SourceFactory
|
||||||
|
|
||||||
|
@MultiSource
|
||||||
class ZbuluFactory : SourceFactory {
|
class ZbuluFactory : SourceFactory {
|
||||||
override fun createSources(): List<Source> = listOf(
|
override fun createSources(): List<Source> = listOf(
|
||||||
HolyManga(),
|
HolyManga(),
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
package eu.kanade.tachiyomi.extension.en.mangareader
|
package eu.kanade.tachiyomi.extension.en.mangareader
|
||||||
|
|
||||||
|
import eu.kanade.tachiyomi.annotations.MultiSource
|
||||||
import eu.kanade.tachiyomi.source.Source
|
import eu.kanade.tachiyomi.source.Source
|
||||||
import eu.kanade.tachiyomi.source.SourceFactory
|
import eu.kanade.tachiyomi.source.SourceFactory
|
||||||
|
|
||||||
|
@MultiSource
|
||||||
class MRPFactory : SourceFactory {
|
class MRPFactory : SourceFactory {
|
||||||
override fun createSources(): List<Source> = listOf(
|
override fun createSources(): List<Source> = listOf(
|
||||||
Mangareader(),
|
Mangareader(),
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
package eu.kanade.tachiyomi.extension.ja.mangaraw
|
package eu.kanade.tachiyomi.extension.ja.mangaraw
|
||||||
|
|
||||||
|
import eu.kanade.tachiyomi.annotations.MultiSource
|
||||||
import eu.kanade.tachiyomi.source.Source
|
import eu.kanade.tachiyomi.source.Source
|
||||||
import eu.kanade.tachiyomi.source.SourceFactory
|
import eu.kanade.tachiyomi.source.SourceFactory
|
||||||
|
|
||||||
|
@MultiSource
|
||||||
class MangaRawFactory : SourceFactory {
|
class MangaRawFactory : SourceFactory {
|
||||||
override fun createSources(): List<Source> = listOf(
|
override fun createSources(): List<Source> = listOf(
|
||||||
Manga1000(),
|
Manga1000(),
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
package eu.kanade.tachiyomi.extension.pt.mangasproject
|
package eu.kanade.tachiyomi.extension.pt.mangasproject
|
||||||
|
|
||||||
|
import eu.kanade.tachiyomi.annotations.MultiSource
|
||||||
import eu.kanade.tachiyomi.source.Source
|
import eu.kanade.tachiyomi.source.Source
|
||||||
import eu.kanade.tachiyomi.source.SourceFactory
|
import eu.kanade.tachiyomi.source.SourceFactory
|
||||||
|
|
||||||
|
@MultiSource
|
||||||
class MangasProjectFactory : SourceFactory {
|
class MangasProjectFactory : SourceFactory {
|
||||||
override fun createSources(): List<Source> = listOf(
|
override fun createSources(): List<Source> = listOf(
|
||||||
LeitorNet(),
|
LeitorNet(),
|
||||||
|
|
Loading…
Reference in New Issue