diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index c1f8eb21f..29d1df7f7 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -2,7 +2,7 @@ I acknowledge that: -- I have updated to the latest version of the app (stable is v0.10.11) +- I have updated to the latest version of the app (stable is v0.10.12) - I have updated all extensions - If this is an issue with the app itself, that I should be opening an issue in https://github.com/tachiyomiorg/tachiyomi - I have searched the existing issues for duplicates diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 1cdecd9a2..685a907b2 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -10,7 +10,7 @@ labels: "enhancement" I acknowledge that: - I have updated: - - To the latest version of the app (stable is v0.10.11) + - To the latest version of the app (stable is v0.10.12) - All extensions - I have tried the troubleshooting guide: https://tachiyomi.org/help/guides/troubleshooting-problems/ - If this is an issue with the app itself, that I should be opening an issue in https://github.com/tachiyomiorg/tachiyomi diff --git a/.github/ISSUE_TEMPLATE/meta_request.md b/.github/ISSUE_TEMPLATE/meta_request.md index 2e727d801..3226feacf 100644 --- a/.github/ISSUE_TEMPLATE/meta_request.md +++ b/.github/ISSUE_TEMPLATE/meta_request.md @@ -10,7 +10,7 @@ labels: "meta" I acknowledge that: - I have updated: - - To the latest version of the app (stable is v0.10.11) + - To the latest version of the app (stable is v0.10.12) - All extensions - I have tried the troubleshooting guide: https://tachiyomi.org/help/guides/troubleshooting-problems/ - If this is an issue with the app itself, that I should be opening an issue in https://github.com/tachiyomiorg/tachiyomi diff --git a/.github/ISSUE_TEMPLATE/source_bug.md b/.github/ISSUE_TEMPLATE/source_bug.md index 463044afa..6a65ca8d1 100644 --- a/.github/ISSUE_TEMPLATE/source_bug.md +++ b/.github/ISSUE_TEMPLATE/source_bug.md @@ -10,7 +10,7 @@ labels: "bug" I acknowledge that: - I have updated: - - To the latest version of the app (stable is v0.10.11) + - To the latest version of the app (stable is v0.10.12) - All extensions - I have tried the troubleshooting guide: https://tachiyomi.org/help/guides/troubleshooting-problems/ - If this is an issue with the app itself, that I should be opening an issue in https://github.com/tachiyomiorg/tachiyomi diff --git a/.github/ISSUE_TEMPLATE/source_request.md b/.github/ISSUE_TEMPLATE/source_request.md index 06e13f9c0..e22178ba4 100644 --- a/.github/ISSUE_TEMPLATE/source_request.md +++ b/.github/ISSUE_TEMPLATE/source_request.md @@ -1,5 +1,5 @@ --- -name: "Source Request" +name: "🌐 Source Request" title: "[Source Request] " about: "Suggest a new source for Tachiyomi" labels: "Source Request" diff --git a/.github/workflows/issue_closer.yml b/.github/workflows/issue_closer.yml index eccf3b436..f5a2308ec 100644 --- a/.github/workflows/issue_closer.yml +++ b/.github/workflows/issue_closer.yml @@ -9,9 +9,10 @@ jobs: runs-on: ubuntu-latest steps: - name: Autoclose issues - uses: arkon/issue-closer-action@v3.0 + uses: arkon/issue-closer-action@v3.4 with: repo-token: ${{ secrets.GITHUB_TOKEN }} + ignoreLabel: do-not-autoclose rules: | [ { @@ -28,5 +29,17 @@ jobs: "type": "body", "regex": ".*\\* (Tachiyomi version|Android version|Device|Name|Link|Extension version): \\?.*", "message": "The requested information was not filled out" + }, + { + "type": "both", + "regex": ".*(mangago|mangafox|hq\\s*dragon|manga\\s*host|supermangas|superhentais|union\\s*mangas|yes\\s*mangas|manhuascan|heroscan|manhwahot).*", + "ignoreCase": true, + "message": "{match} will not be added back as it is too difficult to maintain. Read #3475 for more information" + }, + { + "type": "both", + "regex": ".*(teamx|tqneplus|manga\\s*disk|komiktap|gourmet\\s*scans|manga\\s*crimson|mangawow|voidscans|hikari\\s*scans|mangagegecesi|piedpiperfb).*", + "ignoreCase": true, + "message": "{match} will not be added back as the Scanlator team has requested it to be removed. Read #3475 for more information" } ] diff --git a/.github/workflows/issue_moderator.yml b/.github/workflows/issue_moderator.yml new file mode 100644 index 000000000..97440971f --- /dev/null +++ b/.github/workflows/issue_moderator.yml @@ -0,0 +1,14 @@ +name: Issue moderator + +on: + issue_comment: + types: [created] + +jobs: + autoclose: + runs-on: ubuntu-latest + steps: + - name: Moderate issues + uses: tachiyomiorg/issue-moderator-action@v1.0 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7ce4392ef..a11ffb434 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -354,7 +354,7 @@ with open(f"{package}/src/{source}.kt", "w") as f: ## Running -To aid in local development, you can use the following run configuration to launch an extension: +To make local development more convenient, you can use the following run configuration to launch Tachiyomi directly at the Browse panel: ![](https://i.imgur.com/STy0UFY.png) @@ -372,7 +372,21 @@ And for a release build of Tachiyomi: ## Debugging -Directly debugging your extension (i.e stepping through the extension code) is not possible due to the way that extension code is loaded into the app. However, logs printed from extensions (via [`Logcat`](https://developer.android.com/studio/debug/am-logcat)) do work. +### Android Debugger + +You can leverage the Android Debugger to step through your extension while debugging. + +You *cannot* simply use Android Studio's `Debug 'module.name'` -> this will most likely result in an error while launching. + +Instead, once you've built and installed your extension on the target device, use `Attach Debugger to Android Process` to start debugging Tachiyomi. + +![](https://i.imgur.com/muhXyfu.png) + + +### Logs + +You can also elect to simply rely on logs printed from your extension, which +show up in the [`Logcat`](https://developer.android.com/studio/debug/am-logcat) panel of Android Studio ## Building diff --git a/annotations/build.gradle.kts b/annotations/build.gradle.kts index 7fada1cc2..82482f1b3 100644 --- a/annotations/build.gradle.kts +++ b/annotations/build.gradle.kts @@ -3,5 +3,5 @@ plugins { } dependencies { - compileOnly(Deps.kotlin.stdlib) + compileOnly(Dependencies.kotlin.stdlib) } diff --git a/build.gradle b/build.gradle index c10799633..3d6114282 100644 --- a/build.gradle +++ b/build.gradle @@ -1,13 +1,13 @@ buildscript { - ext.kotlin_version = '1.4.10' - ext.coroutines_version = '1.3.9' + ext.kotlin_version = '1.4.32' + ext.coroutines_version = '1.4.3' repositories { mavenCentral() google() maven { url 'https://plugins.gradle.org/m2/' } } dependencies { - classpath 'com.android.tools.build:gradle:4.1.3' + classpath 'com.android.tools.build:gradle:4.2.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version" classpath 'org.jmailen.gradle:kotlinter-gradle:3.3.0' diff --git a/buildSrc/src/main/kotlin/AndroidConfig.kt b/buildSrc/src/main/kotlin/AndroidConfig.kt new file mode 100644 index 000000000..94aaf4e26 --- /dev/null +++ b/buildSrc/src/main/kotlin/AndroidConfig.kt @@ -0,0 +1,6 @@ +object AndroidConfig { + const val compileSdk = 30 + const val minSdk = 21 + const val targetSdk = 29 + const val buildTools = "30.0.3" +} diff --git a/buildSrc/src/main/kotlin/Config.kt b/buildSrc/src/main/kotlin/Config.kt deleted file mode 100644 index 4a296469a..000000000 --- a/buildSrc/src/main/kotlin/Config.kt +++ /dev/null @@ -1,6 +0,0 @@ -object Config { - const val compileSdk = 29 - const val minSdk = 16 - const val targetSdk = 29 - const val buildTools = "29.0.3" -} diff --git a/buildSrc/src/main/kotlin/Dependencies.kt b/buildSrc/src/main/kotlin/Dependencies.kt new file mode 100644 index 000000000..5a209d904 --- /dev/null +++ b/buildSrc/src/main/kotlin/Dependencies.kt @@ -0,0 +1,9 @@ +object Dependencies { + object kotlin { + const val version = "1.4.32" + const val stdlib = "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$version" + } + + const val jsoup = "org.jsoup:jsoup:1.13.1" + const val okhttp = "com.squareup.okhttp3:okhttp:4.9.1" +} diff --git a/common-dependencies.gradle b/common-dependencies.gradle index 7fb244918..3f34cbefb 100644 --- a/common-dependencies.gradle +++ b/common-dependencies.gradle @@ -7,12 +7,12 @@ dependencies { compileOnly "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" compileOnly 'com.github.inorichi.injekt:injekt-core:65b0440' - compileOnly 'com.squareup.okhttp3:okhttp:3.10.0' - compileOnly 'io.reactivex:rxjava:1.3.6' - compileOnly 'org.jsoup:jsoup:1.10.2' - compileOnly 'com.google.code.gson:gson:2.8.2' + compileOnly 'com.squareup.okhttp3:okhttp:4.9.1' + compileOnly 'io.reactivex:rxjava:1.3.8' + compileOnly 'org.jsoup:jsoup:1.13.1' + compileOnly 'com.google.code.gson:gson:2.8.6' compileOnly 'com.github.salomonbrys.kotson:kotson:2.5.0' implementation project(":annotations") compileOnly project(':duktape-stub') -} \ No newline at end of file +} diff --git a/common.gradle b/common.gradle index dce2d536d..17e2b5d0a 100644 --- a/common.gradle +++ b/common.gradle @@ -1,8 +1,8 @@ apply plugin: 'org.jmailen.kotlinter' android { - compileSdkVersion Config.compileSdk - buildToolsVersion Config.buildTools + compileSdkVersion AndroidConfig.compileSdk + buildToolsVersion AndroidConfig.buildTools buildTypes { release { @@ -25,8 +25,8 @@ android { } defaultConfig { - minSdkVersion Config.minSdk - targetSdkVersion Config.targetSdk + minSdkVersion AndroidConfig.minSdk + targetSdkVersion AndroidConfig.targetSdk applicationIdSuffix pkgNameSuffix versionCode extVersionCode versionName "$libVersion.$extVersionCode" diff --git a/core/build.gradle.kts b/core/build.gradle.kts index ac4e9ea6b..c9065b8d4 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -3,10 +3,11 @@ plugins { } android { - compileSdkVersion(Config.compileSdk) + compileSdkVersion(AndroidConfig.compileSdk) + buildToolsVersion(AndroidConfig.buildTools) defaultConfig { - minSdkVersion(Config.minSdk) + minSdkVersion(AndroidConfig.minSdk) } sourceSets { diff --git a/gradle.properties b/gradle.properties index a85c021b0..ae3b5127c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,7 @@ # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. -org.gradle.jvmargs=-Xmx2048m +org.gradle.jvmargs=-Xmx3072m # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit diff --git a/lib/dataimage/build.gradle.kts b/lib/dataimage/build.gradle.kts index a283c2fa3..f5cf8cb52 100644 --- a/lib/dataimage/build.gradle.kts +++ b/lib/dataimage/build.gradle.kts @@ -4,12 +4,12 @@ plugins { } android { - compileSdkVersion(Config.compileSdk) - buildToolsVersion(Config.buildTools) + compileSdkVersion(AndroidConfig.compileSdk) + buildToolsVersion(AndroidConfig.buildTools) defaultConfig { - minSdkVersion(Config.minSdk) - targetSdkVersion(Config.targetSdk) + minSdkVersion(AndroidConfig.minSdk) + targetSdkVersion(AndroidConfig.targetSdk) } } @@ -18,7 +18,7 @@ repositories { } dependencies { - compileOnly(Deps.kotlin.stdlib) - compileOnly(Deps.okhttp) - compileOnly(Deps.jsoup) + compileOnly(Dependencies.kotlin.stdlib) + compileOnly(Dependencies.okhttp) + compileOnly(Dependencies.jsoup) } diff --git a/lib/dataimage/src/main/java/eu/kanade/tachiyomi/lib/dataimage/DataImageInterceptor.kt b/lib/dataimage/src/main/java/eu/kanade/tachiyomi/lib/dataimage/DataImageInterceptor.kt index df1cc81f6..3599a8910 100644 --- a/lib/dataimage/src/main/java/eu/kanade/tachiyomi/lib/dataimage/DataImageInterceptor.kt +++ b/lib/dataimage/src/main/java/eu/kanade/tachiyomi/lib/dataimage/DataImageInterceptor.kt @@ -2,10 +2,10 @@ package eu.kanade.tachiyomi.lib.dataimage import android.util.Base64 import okhttp3.Interceptor -import okhttp3.MediaType +import okhttp3.MediaType.Companion.toMediaTypeOrNull import okhttp3.Protocol import okhttp3.Response -import okhttp3.ResponseBody +import okhttp3.ResponseBody.Companion.toResponseBody import org.jsoup.nodes.Element /** @@ -43,7 +43,7 @@ class DataImageInterceptor : Interceptor { private val mediaTypePattern = Regex("""(^[^;,]*)[;,]""") override fun intercept(chain: Interceptor.Chain): Response { - val url = chain.request().url().toString() + val url = chain.request().url.toString() return if (url.startsWith("https://127.0.0.1/?image")) { val dataString = url.substringAfter("?") val byteArray = if (dataString.contains("base64")) { @@ -51,8 +51,8 @@ class DataImageInterceptor : Interceptor { } else { dataString.substringAfter(",").toByteArray() } - val mediaType = MediaType.parse(mediaTypePattern.find(dataString)!!.value) - Response.Builder().body(ResponseBody.create(mediaType, byteArray)) + val mediaType = mediaTypePattern.find(dataString)!!.value.toMediaTypeOrNull() + Response.Builder().body(byteArray.toResponseBody(mediaType)) .request(chain.request()) .protocol(Protocol.HTTP_1_0) .code(200) diff --git a/lib/ratelimit/build.gradle.kts b/lib/ratelimit/build.gradle.kts index 5dfcf0f41..a9c37e057 100644 --- a/lib/ratelimit/build.gradle.kts +++ b/lib/ratelimit/build.gradle.kts @@ -4,12 +4,12 @@ plugins { } android { - compileSdkVersion(Config.compileSdk) - buildToolsVersion(Config.buildTools) + compileSdkVersion(AndroidConfig.compileSdk) + buildToolsVersion(AndroidConfig.buildTools) defaultConfig { - minSdkVersion(Config.minSdk) - targetSdkVersion(Config.targetSdk) + minSdkVersion(AndroidConfig.minSdk) + targetSdkVersion(AndroidConfig.targetSdk) } } @@ -18,6 +18,6 @@ repositories { } dependencies { - compileOnly(Deps.kotlin.stdlib) - compileOnly(Deps.okhttp) + compileOnly(Dependencies.kotlin.stdlib) + compileOnly(Dependencies.okhttp) } diff --git a/lib/ratelimit/src/main/java/eu/kanade/tachiyomi/lib/ratelimit/SpecificHostRateLimitInterceptor.kt b/lib/ratelimit/src/main/java/eu/kanade/tachiyomi/lib/ratelimit/SpecificHostRateLimitInterceptor.kt index 3a237c860..cd2e5cbf0 100644 --- a/lib/ratelimit/src/main/java/eu/kanade/tachiyomi/lib/ratelimit/SpecificHostRateLimitInterceptor.kt +++ b/lib/ratelimit/src/main/java/eu/kanade/tachiyomi/lib/ratelimit/SpecificHostRateLimitInterceptor.kt @@ -11,8 +11,8 @@ import java.util.concurrent.TimeUnit * * Examples: * - * httpUrl = Httpurl.parse("api.manga.com"), permits = 5, period = 1, unit = seconds => 5 requests per second to api.manga.com - * httpUrl = Httpurl.parse("imagecdn.manga.com"), permits = 10, period = 2, unit = minutes => 10 requests per 2 minutes to imagecdn.manga.com + * httpUrl = "api.manga.com".toHttpUrlOrNull(), permits = 5, period = 1, unit = seconds => 5 requests per second to api.manga.com + * httpUrl = "imagecdn.manga.com".toHttpUrlOrNull(), permits = 10, period = 2, unit = minutes => 10 requests per 2 minutes to imagecdn.manga.com * * @param httpUrl {HttpUrl} The url host that this interceptor should handle. Will get url's host by using HttpUrl.host() * @param permits {Int} Number of requests allowed within a period of units. @@ -28,10 +28,10 @@ class SpecificHostRateLimitInterceptor( private val requestQueue = ArrayList(permits) private val rateLimitMillis = unit.toMillis(period) - private val host = httpUrl.host() + private val host = httpUrl.host override fun intercept(chain: Interceptor.Chain): Response { - if (chain.request().url().host() != host) { + if (chain.request().url.host != host) { return chain.proceed(chain.request()) } synchronized(requestQueue) {