From e405512146403d21bd88545bf5870922a0083edf Mon Sep 17 00:00:00 2001 From: arkon Date: Sat, 27 Jun 2020 15:21:46 -0400 Subject: [PATCH] Update to SDK 29 (#3629) * Print out repo JSON contents during build * Target SDK 29 --- .travis.yml | 4 ++-- .travis/create-repo.sh | 4 +++- buildSrc/src/main/kotlin/AndroidConfig.kt | 4 ++-- common.gradle | 4 ++-- .../src/eu/kanade/tachiyomi/extension/all/komga/Komga.kt | 8 ++++---- .../eu/kanade/tachiyomi/extension/ko/newtoki/NewToki.kt | 2 +- 6 files changed, 14 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5b83efa8c..1f1c53dea 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,14 +3,14 @@ language: android android: components: - build-tools-29.0.3 - - android-27 + - android-29 - extra-android-m2repository - extra-google-m2repository - extra-android-support licenses: - android-sdk-license-.+ before_install: -- yes | sdkmanager "platforms;android-27" # workaround for accepting the license +- yes | sdkmanager "platforms;android-29" # workaround for accepting the license - if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then openssl aes-256-cbc -K $encrypted_5ba4ee4c096f_key -iv $encrypted_5ba4ee4c096f_iv -in "$PWD/.travis/secrets.tar.enc" -out secrets.tar -d; tar xf secrets.tar; diff --git a/.travis/create-repo.sh b/.travis/create-repo.sh index 83ac0a999..84964f7ca 100755 --- a/.travis/create-repo.sh +++ b/.travis/create-repo.sh @@ -18,7 +18,7 @@ for APK in ${APKS[@]}; do BADGING="$(${TOOLS}/aapt dump badging $APK)" PACKAGE=$(echo "$BADGING" | grep package:) - PKGNAME=$(echo $PACKAGE | grep -Po "name='\K[^']+") + PKGNAME=$(echo $PACKAGE | grep -Po "package: name='\K[^']+") VCODE=$(echo $PACKAGE | grep -Po "versionCode='\K[^']+") VNAME=$(echo $PACKAGE | grep -Po "versionName='\K[^']+") @@ -40,3 +40,5 @@ for APK in ${APKS[@]}; do '{name:$name, pkg:$pkg, apk:$apk, lang:$lang, code:$code, version:$version}' done | jq -scr '[.[]]' > index.json + +cat index.json diff --git a/buildSrc/src/main/kotlin/AndroidConfig.kt b/buildSrc/src/main/kotlin/AndroidConfig.kt index 333d28a2c..f24c7eb0f 100644 --- a/buildSrc/src/main/kotlin/AndroidConfig.kt +++ b/buildSrc/src/main/kotlin/AndroidConfig.kt @@ -1,6 +1,6 @@ object AndroidConfig { - const val compileSdk = 27 + const val compileSdk = 29 const val minSdk = 16 - const val targetSdk = 27 + const val targetSdk = 29 const val buildTools = "29.0.3" } diff --git a/common.gradle b/common.gradle index 7631836e4..ac115c866 100644 --- a/common.gradle +++ b/common.gradle @@ -1,7 +1,7 @@ apply plugin: 'org.jmailen.kotlinter' android { - compileSdkVersion 27 + compileSdkVersion 29 buildToolsVersion '29.0.3' buildTypes { @@ -32,7 +32,7 @@ android { defaultConfig { minSdkVersion 16 - targetSdkVersion 27 + targetSdkVersion 29 applicationIdSuffix pkgNameSuffix versionCode extVersionCode versionName "$libVersion.$extVersionCode" diff --git a/src/all/komga/src/eu/kanade/tachiyomi/extension/all/komga/Komga.kt b/src/all/komga/src/eu/kanade/tachiyomi/extension/all/komga/Komga.kt index d078dd31b..b60b4f2ed 100644 --- a/src/all/komga/src/eu/kanade/tachiyomi/extension/all/komga/Komga.kt +++ b/src/all/komga/src/eu/kanade/tachiyomi/extension/all/komga/Komga.kt @@ -24,6 +24,10 @@ import eu.kanade.tachiyomi.source.model.Page import eu.kanade.tachiyomi.source.model.SChapter import eu.kanade.tachiyomi.source.model.SManga import eu.kanade.tachiyomi.source.online.HttpSource +import java.text.DecimalFormat +import java.text.SimpleDateFormat +import java.util.Date +import java.util.Locale import okhttp3.Credentials import okhttp3.Headers import okhttp3.HttpUrl @@ -35,10 +39,6 @@ import rx.android.schedulers.AndroidSchedulers import rx.schedulers.Schedulers import uy.kohesive.injekt.Injekt import uy.kohesive.injekt.api.get -import java.text.DecimalFormat -import java.text.SimpleDateFormat -import java.util.Date -import java.util.Locale open class Komga(suffix: String = "") : ConfigurableSource, HttpSource() { override fun popularMangaRequest(page: Int): Request = 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 700418bb9..8b6a660cf 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 @@ -245,7 +245,7 @@ open class NewToki(override val name: String, private val defaultBaseUrl: String screen.addPreference(baseUrlPref) } - private fun getPrefBaseUrl(): String = preferences.getString(BASE_URL_PREF, defaultBaseUrl) + private fun getPrefBaseUrl(): String = preferences.getString(BASE_URL_PREF, defaultBaseUrl)!! companion object { private const val BASE_URL_PREF_TITLE = "Override BaseUrl"