Update dependencies and travis scripts

This commit is contained in:
len 2018-02-04 13:55:21 +01:00
parent 12673dbc0e
commit 9078f82963
8 changed files with 112 additions and 41 deletions

2
.gitignore vendored
View File

@ -6,3 +6,5 @@ build/
/captures
.idea/
*.iml
repo/
apk/

View File

@ -1,43 +1,45 @@
language: android
android:
components:
- platform-tools
- tools
# The BuildTools version used by your project
- build-tools-25.0.1
- android-25
- build-tools-27.0.2
- android-27
- extra-android-m2repository
- extra-google-m2repository
- extra-android-support
- extra-google-google_play_services
licenses:
- android-sdk-license-.+
- '.+'
jdk:
- oraclejdk8
before_script:
- chmod +x gradlew
before_install:
- yes | sdkmanager "platforms;android-27" # workaround for accepting the license
- 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
- mkdir "$ANDROID_HOME/licenses" || true
- echo -e "\n8933bad161af4178b1185d1a37fbf41ea5269c55" > "$ANDROID_HOME/licenses/android-sdk-license"
- echo -e "\n84831b9409646a918e30573bab4c9c91346d8abd" > "$ANDROID_HOME/licenses/android-sdk-preview-license"
#Build, and run tests
script: "./gradlew clean assembleDebug"
sudo: false
script:
- .travis/build.sh && .travis/create-repo.sh
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
- $HOME/.android/build-cache
- repo
deploy:
- provider: pages
local-dir: repo
target-branch: repo
skip-cleanup: true
keep-history: true
github-token:
secure: "SCzQyavQM/bfOjEF+eKp9l0DxiAgsB3v64hYQNb2s/sql4WiL8Mjv9HEAyxBWDfGwUg1cNELWR7s2Y1j/8lCLFaZ5doy7222ZSaRP48MGhpGJQi22jGOqavMNCIcS5EZCjo3OJ9+VWLcx67OIJUQK3KHmnxgeM00luPjzC0a3FiED7/7joU4y9fkQhizfnV6AEZjEma0wUH4+wQxUC+5H71nNDZuz77BO3slZ4TX2YKg9O+QIr5jIjv4GT7dqh+UDQUoMvPXVtORUTI3yOzziwEawc64uMUr+0NtSr9ww+9lg4fs7IeVwkTlDEDbVDFdwvLYAvKlZCqboKygG7NX5Pi11grLYYCrqynXXIsyyBtEyV/fkGt2UcQrMOJRxxI6RkZFuUwozP/DVVO9XiebEfoKKZaQ/ehljveu8+B5S+qsKTO/sFMQJhvi2muhXkUvXeduSjHfqgAxEzrnh6sTR4laI05ICVJVw5j38iUfqOEo4rF+cX11ywgHFzp9RJjYCYhndvobv5vtwk77hrndzVcLlKKlKO4tJDfwg+czRRD7oSX9pT0NeL7tRyD86sNryPMG5pBAfJ4D7knnM9+YmRNJmnsmnu/FGeYlBygUK5IiG05LQ7TfkXiF0wQt7nvlixAiB3ULrso18lqP9U2bGHdjLNaRip3dVxHbrCmP9xY="
on:
branch: master
repo: inorichi/tachiyomi-extensions
env:
- GRADLE_OPTS="-XX:MaxPermSize=1024m -XX:+CMSClassUnloadingEnabled -XX:+HeapDumpOnOutOfMemoryError -Xmx2048m"
global:
- secure: "VvCw9E2eOPoExCKjs4jbGEUJ8hYS6Hw8YzJ4VPqtLa0YJSMKhdwNAcW2ldy47tJklTYKv6djehjh7oivTMFOR4m5jhG5MNrAbCprPtTeiK7KU3o8vCK8CyCYgRS/+LfmryNdXTB4N5B8VQzx26jl3+aJE8g5uJacSOYnv1bc+i89ZLAVW9Xwy4EGKZqQW/cZrDS6NDAPyU05Hell/PZMcHIqkNhcb4AJdGfjXJ3zOrv02F7PxYL8cAsapfUgaFME/2rNokuUTYAWN9lHx3VH51bxEM36lVlPKme0O9Op7hVE4GWvcjab7u54oOlOTFk1L4f2gYC75f1rsweRLwxpQ/XgZgwMAQHkGdYsp1jagVJkbXZE0p+jFN12KOQK/+9ahLuSJwxk4rCsIvR1XlIU2Taw0/v3OWM5u2A00WQkRHW7A3LfHGDFg2JgKCxPnBlzUFliFEubuU5WyWK/BllqZPpSUhinQrymVQE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JqTSghgCxtxTqMaeI1psMq2k1IWq42wPYlDlEqRNoyR1q4Hh3CW4Q6Sz3k5lktLoUUsQREJ5/5d/mNOr76gOUDO4C+QJKYBLojZnfHiY66RjHIqjs="

23
.travis/build.sh Executable file
View File

@ -0,0 +1,23 @@
#!/bin/bash
set -e
./gradlew --no-daemon clean assembleRelease
TOOLS="$(ls -d ${ANDROID_HOME}/build-tools/* | tail -1)"
shopt -s globstar nullglob extglob
APKS=( **/*"-unsigned.apk"* )
DEST=$PWD/apk
rm -rf $DEST && mkdir -p $DEST
for APK in ${APKS[@]}; do
BASENAME=$(basename $APK)
APKNAME="${BASENAME%%+(-release*)}.apk"
APKDEST="$DEST/$APKNAME"
${TOOLS}/zipalign -v -p 4 $APK $APKDEST
${TOOLS}/apksigner sign --ks $STORE_PATH --ks-key-alias $STORE_ALIAS --ks-pass env:STORE_PASS --key-pass env:KEY_PASS $APKDEST
done

42
.travis/create-repo.sh Executable file
View File

@ -0,0 +1,42 @@
#!/bin/bash
set -e
TOOLS="$(ls -d ${ANDROID_HOME}/build-tools/* | tail -1)"
mkdir -p repo/apk
mkdir -p repo/icon
cp -f apk/* repo/apk || true
cd repo
APKS=( apk/*".apk"* )
for APK in ${APKS[@]}; do
FILENAME=$(basename ${APK})
BADGING="$(${TOOLS}/aapt dump badging $APK)"
PACKAGE=$(echo "$BADGING" | grep package:)
PKGNAME=$(echo $PACKAGE | grep -Po "name='\K[^']+")
VCODE=$(echo $PACKAGE | grep -Po "versionCode='\K[^']+")
VNAME=$(echo $PACKAGE | grep -Po "versionName='\K[^']+")
APPLICATION=$(echo "$BADGING" | grep application:)
LABEL=$(echo $APPLICATION | grep -Po "label='\K[^']+")
LANG=$(echo $APK | grep -Po "tachiyomi-\K[^\.]+")
ICON=$(echo "$BADGING" | grep -Po "application-icon-320.*'\K[^']+")
unzip -p $APK $ICON > icon/${FILENAME%.*}.png
jq -n \
--arg name "$LABEL" \
--arg pkg "$PKGNAME" \
--arg apk "$FILENAME" \
--arg lang "$LANG" \
--argjson code $VCODE \
--arg version "$VNAME" \
'{name:$name, pkg:$pkg, apk:$apk, lang:$lang, code:$code, version:$version}'
done | jq -sr '[.[]]' > index.json

BIN
.travis/secrets.tar.enc Normal file

Binary file not shown.

View File

@ -1,10 +1,11 @@
buildscript {
ext.kotlin_version = '1.1.2'
ext.kotlin_version = '1.2.21'
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.1'
classpath 'com.android.tools.build:gradle:3.0.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
@ -12,6 +13,7 @@ buildscript {
allprojects {
repositories {
jcenter()
google()
maven { url 'https://dl.bintray.com/inorichi/tachiyomi' }
}
}

View File

@ -1,6 +1,6 @@
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
compileSdkVersion 27
buildToolsVersion "27.0.2"
buildTypes {
release {
@ -28,7 +28,7 @@ android {
defaultConfig {
minSdkVersion 16
targetSdkVersion 25
targetSdkVersion 27
applicationIdSuffix pkgNameSuffix
versionCode extVersionCode
versionName "$libVersion.$extVersionSuffix"

View File

@ -1,6 +1,6 @@
#Thu Jun 01 17:09:13 CEST 2017
#Sun Feb 04 00:22:22 CET 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip