Move annotations and Duktape stub into core module
This commit is contained in:
parent
f8bf81ae43
commit
3da46570aa
|
@ -102,16 +102,6 @@ The extension's version name is generated automatically by concatenating `libVer
|
||||||
|
|
||||||
Extensions rely on [extensions-lib](https://github.com/tachiyomiorg/extensions-lib), which provides some interfaces and stubs from the [app](https://github.com/tachiyomiorg/tachiyomi) for compilation purposes. The actual implementations can be found [here](https://github.com/tachiyomiorg/tachiyomi/tree/dev/app/src/main/java/eu/kanade/tachiyomi/source). Referencing the actual implementation will help with understanding extensions' call flow.
|
Extensions rely on [extensions-lib](https://github.com/tachiyomiorg/extensions-lib), which provides some interfaces and stubs from the [app](https://github.com/tachiyomiorg/tachiyomi) for compilation purposes. The actual implementations can be found [here](https://github.com/tachiyomiorg/tachiyomi/tree/dev/app/src/main/java/eu/kanade/tachiyomi/source). Referencing the actual implementation will help with understanding extensions' call flow.
|
||||||
|
|
||||||
#### Duktape stub
|
|
||||||
|
|
||||||
[`duktape-stub`](https://github.com/tachiyomiorg/tachiyomi-extensions/tree/master/lib/duktape-stub) provides stubs for using Duktape functionality without pulling in the full library. Functionality is bundled into the main Tachiyomi app.
|
|
||||||
|
|
||||||
```gradle
|
|
||||||
dependencies {
|
|
||||||
compileOnly project(':duktape-stub')
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Rate limiting library
|
#### Rate limiting library
|
||||||
|
|
||||||
[`lib-ratelimit`](https://github.com/tachiyomiorg/tachiyomi-extensions/tree/master/lib/ratelimit) is a library for adding rate limiting functionality as an [OkHttp interceptor](https://square.github.io/okhttp/interceptors/).
|
[`lib-ratelimit`](https://github.com/tachiyomiorg/tachiyomi-extensions/tree/master/lib/ratelimit) is a library for adding rate limiting functionality as an [OkHttp interceptor](https://square.github.io/okhttp/interceptors/).
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
plugins {
|
|
||||||
id("kotlin")
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
compileOnly(Deps.kotlin.stdlib)
|
|
||||||
}
|
|
|
@ -13,6 +13,5 @@ dependencies {
|
||||||
compileOnly 'com.google.code.gson:gson:2.8.2'
|
compileOnly 'com.google.code.gson:gson:2.8.2'
|
||||||
compileOnly 'com.github.salomonbrys.kotson:kotson:2.5.0'
|
compileOnly 'com.github.salomonbrys.kotson:kotson:2.5.0'
|
||||||
|
|
||||||
implementation project(":annotations")
|
implementation project(":core")
|
||||||
compileOnly project(':duktape-stub')
|
|
||||||
}
|
}
|
|
@ -56,9 +56,6 @@ repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
|
||||||
implementation project(":core")
|
|
||||||
}
|
|
||||||
apply from: "$rootDir/common-dependencies.gradle"
|
apply from: "$rootDir/common-dependencies.gradle"
|
||||||
|
|
||||||
preBuild.dependsOn(lintKotlin)
|
preBuild.dependsOn(lintKotlin)
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
plugins {
|
plugins {
|
||||||
id("com.android.library")
|
id("com.android.library")
|
||||||
|
kotlin("android")
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
@ -12,6 +13,7 @@ android {
|
||||||
sourceSets {
|
sourceSets {
|
||||||
named("main") {
|
named("main") {
|
||||||
manifest.srcFile("AndroidManifest.xml")
|
manifest.srcFile("AndroidManifest.xml")
|
||||||
|
java.setSrcDirs(listOf("src"))
|
||||||
res.setSrcDirs(listOf("res"))
|
res.setSrcDirs(listOf("res"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -21,4 +23,17 @@ android {
|
||||||
enabled = false
|
enabled = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
compileOptions {
|
||||||
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||||
|
targetCompatibility = JavaVersion.VERSION_1_8
|
||||||
|
}
|
||||||
|
|
||||||
|
kotlinOptions {
|
||||||
|
jvmTarget = JavaVersion.VERSION_1_8.toString()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
compileOnly(Deps.kotlin.stdlib)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
plugins {
|
|
||||||
java
|
|
||||||
}
|
|
||||||
|
|
||||||
sourceSets {
|
|
||||||
main {
|
|
||||||
java {
|
|
||||||
srcDirs(listOf("src"))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
java {
|
|
||||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
||||||
targetCompatibility = JavaVersion.VERSION_1_8
|
|
||||||
}
|
|
|
@ -1,12 +1,8 @@
|
||||||
include(":annotations")
|
|
||||||
include(":core")
|
include(":core")
|
||||||
|
|
||||||
include(":lib-ratelimit")
|
include(":lib-ratelimit")
|
||||||
project(":lib-ratelimit").projectDir = File("lib/ratelimit")
|
project(":lib-ratelimit").projectDir = File("lib/ratelimit")
|
||||||
|
|
||||||
include(":duktape-stub")
|
|
||||||
project(":duktape-stub").projectDir = File("lib/duktape-stub")
|
|
||||||
|
|
||||||
include(":lib-dataimage")
|
include(":lib-dataimage")
|
||||||
project(":lib-dataimage").projectDir = File("lib/dataimage")
|
project(":lib-dataimage").projectDir = File("lib/dataimage")
|
||||||
|
|
||||||
|
|
|
@ -10,11 +10,11 @@ import eu.kanade.tachiyomi.source.model.SChapter
|
||||||
import eu.kanade.tachiyomi.source.model.SManga
|
import eu.kanade.tachiyomi.source.model.SManga
|
||||||
import eu.kanade.tachiyomi.source.online.HttpSource
|
import eu.kanade.tachiyomi.source.online.HttpSource
|
||||||
import eu.kanade.tachiyomi.util.asJsoup
|
import eu.kanade.tachiyomi.util.asJsoup
|
||||||
import java.util.Calendar
|
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.OkHttpClient
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
import okhttp3.Response
|
import okhttp3.Response
|
||||||
import rx.Observable
|
import rx.Observable
|
||||||
|
import java.util.Calendar
|
||||||
|
|
||||||
@Nsfw
|
@Nsfw
|
||||||
class Latisbooks : HttpSource() {
|
class Latisbooks : HttpSource() {
|
||||||
|
|
|
@ -225,5 +225,4 @@ class Scantrad : ParsedHttpSource() {
|
||||||
override fun imageUrlParse(document: Document) = throw UnsupportedOperationException("Not used")
|
override fun imageUrlParse(document: Document) = throw UnsupportedOperationException("Not used")
|
||||||
|
|
||||||
override fun getFilterList() = FilterList()
|
override fun getFilterList() = FilterList()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,12 +106,14 @@ open class NewToki(override val name: String, private val defaultBaseUrl: String
|
||||||
val fullListButton = document.select(".comic-navbar .toon-nav a").last()
|
val fullListButton = document.select(".comic-navbar .toon-nav a").last()
|
||||||
|
|
||||||
val list: List<SManga> = if (firstChapterButton?.text()?.contains("첫회보기")
|
val list: List<SManga> = if (firstChapterButton?.text()?.contains("첫회보기")
|
||||||
?: false) { // Check this page is detail page
|
?: false
|
||||||
|
) { // Check this page is detail page
|
||||||
val details = mangaDetailsParse(document)
|
val details = mangaDetailsParse(document)
|
||||||
details.url = urlPath
|
details.url = urlPath
|
||||||
listOf(details)
|
listOf(details)
|
||||||
} else if (fullListButton?.text()?.contains("전체목록")
|
} else if (fullListButton?.text()?.contains("전체목록")
|
||||||
?: false) { // Check this page is chapter page
|
?: false
|
||||||
|
) { // Check this page is chapter page
|
||||||
val url = fullListButton.attr("abs:href")
|
val url = fullListButton.attr("abs:href")
|
||||||
val details = mangaDetailsParse(client.newCall(GET(url)).execute())
|
val details = mangaDetailsParse(client.newCall(GET(url)).execute())
|
||||||
details.url = getUrlPath(url)
|
details.url = getUrlPath(url)
|
||||||
|
|
Loading…
Reference in New Issue