diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9023fb4ec..ebe62c8fd 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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/). diff --git a/annotations/build.gradle.kts b/annotations/build.gradle.kts deleted file mode 100644 index 7fada1cc2..000000000 --- a/annotations/build.gradle.kts +++ /dev/null @@ -1,7 +0,0 @@ -plugins { - id("kotlin") -} - -dependencies { - compileOnly(Deps.kotlin.stdlib) -} diff --git a/common-dependencies.gradle b/common-dependencies.gradle index 888a3df16..9e135981f 100644 --- a/common-dependencies.gradle +++ b/common-dependencies.gradle @@ -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') -} \ No newline at end of file + implementation project(":core") +} diff --git a/common.gradle b/common.gradle index 5463638ae..02315cfd8 100644 --- a/common.gradle +++ b/common.gradle @@ -56,9 +56,6 @@ repositories { mavenCentral() } -dependencies { - implementation project(":core") -} apply from: "$rootDir/common-dependencies.gradle" preBuild.dependsOn(lintKotlin) diff --git a/core/build.gradle.kts b/core/build.gradle.kts index ac4e9ea6b..2637957fe 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -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) } diff --git a/lib/duktape-stub/src/com/squareup/duktape/Duktape.java b/core/src/com/squareup/duktape/Duktape.java similarity index 100% rename from lib/duktape-stub/src/com/squareup/duktape/Duktape.java rename to core/src/com/squareup/duktape/Duktape.java diff --git a/annotations/src/main/kotlin/Nsfw.kt b/core/src/eu/kanade/tachiyomi/annotations/Nsfw.kt similarity index 100% rename from annotations/src/main/kotlin/Nsfw.kt rename to core/src/eu/kanade/tachiyomi/annotations/Nsfw.kt diff --git a/lib/duktape-stub/build.gradle.kts b/lib/duktape-stub/build.gradle.kts deleted file mode 100644 index b07c0af69..000000000 --- a/lib/duktape-stub/build.gradle.kts +++ /dev/null @@ -1,16 +0,0 @@ -plugins { - java -} - -sourceSets { - main { - java { - srcDirs(listOf("src")) - } - } -} - -java { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 -} diff --git a/settings.gradle.kts b/settings.gradle.kts index 77558de40..7971057fb 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -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") 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 e411bf495..fca74f44c 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 @@ -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 { diff --git a/src/en/latisbooks/src/eu/kanade/tachiyomi/extension/en/latisbooks/Latisbooks.kt b/src/en/latisbooks/src/eu/kanade/tachiyomi/extension/en/latisbooks/Latisbooks.kt index 2e01c3e98..b8c34c9f4 100644 --- a/src/en/latisbooks/src/eu/kanade/tachiyomi/extension/en/latisbooks/Latisbooks.kt +++ b/src/en/latisbooks/src/eu/kanade/tachiyomi/extension/en/latisbooks/Latisbooks.kt @@ -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() { diff --git a/src/fr/scantrad/src/eu/kanade/tachiyomi/extension/fr/scantrad/Scantrad.kt b/src/fr/scantrad/src/eu/kanade/tachiyomi/extension/fr/scantrad/Scantrad.kt index 07f04327b..d6c1c185b 100644 --- a/src/fr/scantrad/src/eu/kanade/tachiyomi/extension/fr/scantrad/Scantrad.kt +++ b/src/fr/scantrad/src/eu/kanade/tachiyomi/extension/fr/scantrad/Scantrad.kt @@ -225,5 +225,4 @@ class Scantrad : ParsedHttpSource() { override fun imageUrlParse(document: Document) = throw UnsupportedOperationException("Not used") override fun getFilterList() = FilterList() - } diff --git a/src/ko/newtoki/src/eu/kanade/tachiyomi/extension/ko/newtoki/NewToki.kt b/src/ko/newtoki/src/eu/kanade/tachiyomi/extension/ko/newtoki/NewToki.kt index 5b19de4f3..ade739277 100644 --- a/src/ko/newtoki/src/eu/kanade/tachiyomi/extension/ko/newtoki/NewToki.kt +++ b/src/ko/newtoki/src/eu/kanade/tachiyomi/extension/ko/newtoki/NewToki.kt @@ -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 = 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)