mirror of
https://github.com/OMGeeky/andors-trail.git
synced 2026-02-23 15:38:29 +01:00
Add Travis CI support
This commit is contained in:
11
.travis.yml
Normal file
11
.travis.yml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
dist: bionic
|
||||||
|
sudo: required
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- env: TARGET_OS=
|
||||||
|
before_install:
|
||||||
|
- "$TRAVIS_BUILD_DIR/travis/$TRAVIS_OS_NAME.$TARGET_OS.before_install"
|
||||||
|
install:
|
||||||
|
- "$TRAVIS_BUILD_DIR/travis/$TRAVIS_OS_NAME.$TARGET_OS.install"
|
||||||
|
script:
|
||||||
|
- "$TRAVIS_BUILD_DIR/travis/$TRAVIS_OS_NAME.$TARGET_OS.script"
|
||||||
@@ -305,7 +305,8 @@ public final class MainActivity
|
|||||||
t = Toast.makeText(this, msg, duration);
|
t = Toast.makeText(this, msg, duration);
|
||||||
lastToast = new WeakReference<Toast>(t);
|
lastToast = new WeakReference<Toast>(t);
|
||||||
} else {
|
} else {
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P && t.getView().isShown()) {
|
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P && t.getView().isShown()) {
|
||||||
|
if (Build.VERSION.SDK_INT >= 28 && t.getView().isShown()) {
|
||||||
t.cancel();
|
t.cancel();
|
||||||
}
|
}
|
||||||
t.setText(msg);
|
t.setText(msg);
|
||||||
|
|||||||
2
travis/linux..before_install
Executable file
2
travis/linux..before_install
Executable file
@@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
sudo apt-get update -qq
|
||||||
9
travis/linux..install
Executable file
9
travis/linux..install
Executable file
@@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
sudo apt-get install -y \
|
||||||
|
android-sdk \
|
||||||
|
android-sdk-platform-23 \
|
||||||
|
apksigner \
|
||||||
|
default-jdk-headless \
|
||||||
|
gettext \
|
||||||
|
gradle \
|
||||||
|
libgradle-android-plugin-java
|
||||||
30
travis/linux..script
Executable file
30
travis/linux..script
Executable file
@@ -0,0 +1,30 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
|
cd AndorsTrail
|
||||||
|
|
||||||
|
ln -s ../travis/support/build.gradle ../travis/support/gradle.properties \
|
||||||
|
../travis/support/local.properties .
|
||||||
|
|
||||||
|
mkdir -p src/main/assets/translation src/main/java
|
||||||
|
ln -s ../../AndroidManifest.xml ../../res src/main
|
||||||
|
ln -s ../../com src/main/java
|
||||||
|
|
||||||
|
for po in assets/translation/*.po
|
||||||
|
do
|
||||||
|
msgfmt -o src/main/${po%.po}.mo $po
|
||||||
|
done
|
||||||
|
|
||||||
|
gradle assembleRelease
|
||||||
|
|
||||||
|
keytool -genkeypair -v -keystore keystore.p12 -storepass changeit \
|
||||||
|
-keypass changeit -storetype pkcs12 -alias self -keyalg RSA \
|
||||||
|
-validity 10000 -dname \
|
||||||
|
"CN=Unknown, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=Unknown"
|
||||||
|
|
||||||
|
VERSION=$(grep android:versionCode AndroidManifest.xml | cut -d \" -f 2)
|
||||||
|
APK=com.gpl.rpg.AndorsTrail_$VERSION.apk
|
||||||
|
|
||||||
|
apksigner sign --out $APK -v --ks keystore.p12 --ks-pass pass:changeit \
|
||||||
|
build/outputs/apk/AndorsTrail-release-unsigned.apk
|
||||||
|
apksigner verify $APK
|
||||||
20
travis/support/build.gradle
Normal file
20
travis/support/build.gradle
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
buildscript {
|
||||||
|
repositories {
|
||||||
|
maven { url "file:///usr/share/maven-repo" }
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
classpath "com.android.tools.build:gradle:debian"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
apply plugin: "com.android.application"
|
||||||
|
|
||||||
|
android {
|
||||||
|
compileSdkVersion 23
|
||||||
|
buildToolsVersion "24.0.0"
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
compile files("libs/android-support-v4.jar")
|
||||||
|
}
|
||||||
1
travis/support/gradle.properties
Normal file
1
travis/support/gradle.properties
Normal file
@@ -0,0 +1 @@
|
|||||||
|
android.disableResourceValidation=true
|
||||||
1
travis/support/local.properties
Normal file
1
travis/support/local.properties
Normal file
@@ -0,0 +1 @@
|
|||||||
|
sdk.dir=/usr/lib/android-sdk
|
||||||
Reference in New Issue
Block a user