Move annotations and Duktape stub into core module

This commit is contained in:
arkon 2021-02-06 18:16:04 -05:00
parent f8bf81ae43
commit 3da46570aa
13 changed files with 23 additions and 48 deletions

View File

@ -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.
#### 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
[`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/).

View File

@ -1,7 +0,0 @@
plugins {
id("kotlin")
}
dependencies {
compileOnly(Deps.kotlin.stdlib)
}

View File

@ -13,6 +13,5 @@ dependencies {
compileOnly 'com.google.code.gson:gson:2.8.2'
compileOnly 'com.github.salomonbrys.kotson:kotson:2.5.0'
implementation project(":annotations")
compileOnly project(':duktape-stub')
}
implementation project(":core")
}

View File

@ -56,9 +56,6 @@ repositories {
mavenCentral()
}
dependencies {
implementation project(":core")
}
apply from: "$rootDir/common-dependencies.gradle"
preBuild.dependsOn(lintKotlin)

View File

@ -1,5 +1,6 @@
plugins {
id("com.android.library")
kotlin("android")
}
android {
@ -12,6 +13,7 @@ android {
sourceSets {
named("main") {
manifest.srcFile("AndroidManifest.xml")
java.setSrcDirs(listOf("src"))
res.setSrcDirs(listOf("res"))
}
}
@ -21,4 +23,17 @@ android {
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)
}

View File

@ -1,16 +0,0 @@
plugins {
java
}
sourceSets {
main {
java {
srcDirs(listOf("src"))
}
}
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

View File

@ -1,12 +1,8 @@
include(":annotations")
include(":core")
include(":lib-ratelimit")
project(":lib-ratelimit").projectDir = File("lib/ratelimit")
include(":duktape-stub")
project(":duktape-stub").projectDir = File("lib/duktape-stub")
include(":lib-dataimage")
project(":lib-dataimage").projectDir = File("lib/dataimage")

View File

@ -63,7 +63,7 @@ private class ManhuaES : WPComics("Manhua ES", "https://manhuaes.com", "en", Sim
val showMoreFake = info.select(".detail-content .content-readmore").text()
val showMore = info.select(".detail-content .morelink").text()
val rawDesc = info.select("div.detail-content").text()
if (showMoreFake == null || showMoreFake == "") {
description = rawDesc.substringAfter(h3).substringAfter(strong).substringBefore(showMore)
} else {

View File

@ -10,11 +10,11 @@ import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.HttpSource
import eu.kanade.tachiyomi.util.asJsoup
import java.util.Calendar
import okhttp3.OkHttpClient
import okhttp3.Request
import okhttp3.Response
import rx.Observable
import java.util.Calendar
@Nsfw
class Latisbooks : HttpSource() {

View File

@ -225,5 +225,4 @@ class Scantrad : ParsedHttpSource() {
override fun imageUrlParse(document: Document) = throw UnsupportedOperationException("Not used")
override fun getFilterList() = FilterList()
}

View File

@ -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 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)
details.url = urlPath
listOf(details)
} 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 details = mangaDetailsParse(client.newCall(GET(url)).execute())
details.url = getUrlPath(url)