diff --git a/.travis.yml b/.travis.yml index 000f532..297a62c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,13 +1,19 @@ language: java env: + matrix: - ANDROID_HOME="./android-sdk-linux" - + global: + - secure: FFXEK5dnQaJ2nSyaggVO66uNfpM6WYdS962qjY4ry9OumoK9OHg25MeQPrWmQurUaDDRfzdjMTs0UicWvJAnka846dDpYVbt0bpWbnNsq8vb05h1XhCsjjnEwcgPzbbyoAecmx7m1noAhkjFVnqmUhnjoYIsNd/pIRplO+r+0PY= + - secure: BezK2LQRlHA4bgfShHH9l8/N0roGcMCxzAXV3CoGw4OWp6npUbIGvj1H4scA2OAMpct7u6fS9T0//FQehe6tbsHniVfsRxrmwsj8SqXQ6E3tQ4lZeFu9q6dy2qgIaktY9q2SIkf+/1DG5b7gd/KJX4luU8LX1RErorco6+MGuoQ= before_install: - - bash android_install.sh - -# TODO: Even using language: java, this fails on the first try, succeeds on second, please fix +- openssl aes-256-cbc -K $encrypted_b017c1e684ac_key -iv $encrypted_b017c1e684ac_iv + -in play_api.p12.enc -out play_api.p12 -d +- bash android_install.sh script: - - ./gradlew test - +- ./gradlew test after_success: - - ./gradlew jacocoTestReport coveralls +- ./gradlew jacocoTestReport coveralls +- if [ $TRAVIS_TAG ]; then + echo "Publishing to Play store..." + ./gradlew publishRelease + fi diff --git a/app/build.gradle b/app/build.gradle index 131d9a6..7de2ab4 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -4,11 +4,13 @@ buildscript { } dependencies { classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version" + classpath 'com.github.triplet.gradle:play-publisher:1.0.2' } } apply plugin: 'com.android.application' apply plugin: 'kotlin-android' +apply plugin: 'play' android { compileSdkVersion 21 @@ -17,7 +19,12 @@ android { applicationId 'org.bspeice.minimalbible' minSdkVersion 8 targetSdkVersion 21 - versionCode 8 + + def travis_code = System.getenv("TRAVIS_BUILD_NUMBER") + if (travis_code) + versionCode travis_code.toInteger() + else + versionCode 0 versionName '0.7' } packagingOptions { @@ -32,11 +39,29 @@ android { exclude 'NOTICE' exclude 'asm-license.txt' } + signingConfigs { + release { + storeFile file('src/main/play/MinimalBible.jks') + storePassword System.getenv("KEYSTORE_PASSWORD") + keyAlias 'minimalbible signing key' + keyPassword System.getenv("KEYSTORE_PASSWORD") + } + } + buildTypes { + release { + signingConfig signingConfigs.release + } + } sourceSets { main.java.srcDirs += 'src/main/kotlin' } } +play { + serviceAccountEmail = System.getenv("SERVICE_ACCOUNT_EMAIL") + pk12File = file('src/main/play/play_api.p12') +} + dependencies { compile project(path: ':jsword-minimalbible', configuration: 'buildJSword') @@ -53,7 +78,6 @@ dependencies { compile 'com.android.support:appcompat-v7:21.+' compile 'com.android.support:recyclerview-v7:21.+' compile 'org.apache.commons:commons-lang3:+' - compile 'com.google.code.gson:gson:+' compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" androidTestCompile 'com.jayway.awaitility:awaitility:+' diff --git a/app/src/main/play/.gitignore b/app/src/main/play/.gitignore new file mode 100644 index 0000000..6a7e392 --- /dev/null +++ b/app/src/main/play/.gitignore @@ -0,0 +1 @@ +play_api.p12 diff --git a/app/src/main/play/MinimalBible.jks b/app/src/main/play/MinimalBible.jks new file mode 100644 index 0000000..5307c80 Binary files /dev/null and b/app/src/main/play/MinimalBible.jks differ diff --git a/app/src/main/play/en-US/listing/fulldescription b/app/src/main/play/en-US/listing/fulldescription new file mode 100644 index 0000000..a95f25e --- /dev/null +++ b/app/src/main/play/en-US/listing/fulldescription @@ -0,0 +1,6 @@ +There are a lot of Bible apps available for Android, but what sets MinimalBible apart is the focus on a simple application design, ease-of-use, and speedy execution leading to more time focusing on what you're using the app for - reading your Bible. +Designed from the ground-up to be sleek and efficient, MinimalBible is focused on making a great experience without worrying about a lot of advanced features. + +MinimalBible uses your internet connection to retrieve Bibles, but you will be prompted before doing so. The app will not connect to the internet without your consent. + +MinimalBible is also an open-source application! If you're interested in helping the development, check it out over here: https://github.com/MinimalBible/MinimalBible diff --git a/app/src/main/play/en-US/listing/shortdescription b/app/src/main/play/en-US/listing/shortdescription new file mode 100644 index 0000000..c79eff9 --- /dev/null +++ b/app/src/main/play/en-US/listing/shortdescription @@ -0,0 +1 @@ +A Bible app focused on simplicity, ease-of-use, and speed. diff --git a/app/src/main/play/en-US/listing/title b/app/src/main/play/en-US/listing/title new file mode 100644 index 0000000..adef579 --- /dev/null +++ b/app/src/main/play/en-US/listing/title @@ -0,0 +1 @@ +MinimalBible diff --git a/app/src/main/play/play_api.p12.enc b/app/src/main/play/play_api.p12.enc new file mode 100644 index 0000000..8e2ac10 Binary files /dev/null and b/app/src/main/play/play_api.p12.enc differ