diff --git a/.travis.yml b/.travis.yml index fd5d461..b32f7ea 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,14 +13,14 @@ jdk: - oraclejdk8 before_install: -- openssl aes-256-cbc -K $encrypted_fe6e969707e0_key -iv $encrypted_fe6e969707e0_iv - -in yun.jks.enc -out yun.jks -d +- openssl aes-256-cbc -K $encrypted_fe6e969707e0_key -iv $encrypted_fe6e969707e0_iv -in yun.jks.enc -out yun.jks -d +- openssl aes-256-cbc -K $encrypted_f4baf1fb5ebf_key -iv $encrypted_f4baf1fb5ebf_iv -in play.json.enc -out play.json -d - chmod +x gradlew - gem install fir-cli - yes | sdkmanager "platforms;android-27" script: -- "./gradlew assembleReleaseGitHub" +- ./gradlew assembleReleaseGitHub deploy: provider: releases @@ -32,6 +32,7 @@ deploy: on: tags: true -after_script: +after_deploy: - fir login $fir_token - fir p app/build/outputs/apk/releaseGitHub/app-releaseGitHub.apk -c "$TRAVIS_COMMIT_MESSAGE" +- ./gradlew publishApkReleaseGitHub diff --git a/README.md b/README.md index 29798bb..a9ec90d 100644 --- a/README.md +++ b/README.md @@ -9,10 +9,12 @@ BJUT Wi-Fi client for Android. **Warning:** This is an experimental app. + + ## Install See [Releases](https://github.com/yunv/BJUTWiFi/releases). -Only Android 8.1 and later is supported. If you are using older versions, go to [BJUTLoginApp](https://github.com/ZeroGoYoosee/BJUTLoginApp/). +Only Android 7.1 and later is supported. If you are using older versions, go to [BJUTLoginApp](https://github.com/ZeroGoYoosee/BJUTLoginApp/). ## Screenshot diff --git a/app/build.gradle b/app/build.gradle index bb8c52a..980749e 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -3,6 +3,7 @@ plugins { id 'org.jetbrains.kotlin.android' id 'org.jetbrains.kotlin.android.extensions' id 'org.jetbrains.kotlin.kapt' + id 'com.github.triplet.play' } def gitCommitCount = "git rev-list HEAD --count".execute().text.trim() @@ -19,17 +20,26 @@ android { keyPassword System.getenv("KEY_PASSWORD") } } + playAccountConfigs { + defaultAccountConfig { + jsonFile = file('../play.json') + } + } defaultConfig { applicationId "me.liuyun.bjutlgn" - minSdkVersion 27 + minSdkVersion 25 targetSdkVersion 27 - versionCode 9 - versionName "9.0.0" + versionCode gitCommitCount.toInteger() + versionName "10.0.0" versionNameSuffix = " (${gitCommitCount})" resConfigs "en", "zh-rCN" + manifestPlaceholders = [app_name: "@string/app_name"] + playAccountConfig = playAccountConfigs.defaultAccountConfig } buildTypes { debug { + applicationIdSuffix ".debug" + manifestPlaceholders = [app_name: "@string/app_name_debug"] signingConfig signingConfigs.release } release { @@ -43,10 +53,17 @@ android { shrinkResources true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' signingConfig signingConfigs.github + play { + track = 'beta' + userFraction = 1.0 + untrackOld = true + } } } - dataBinding { - // enabled = true + packagingOptions { + exclude 'kotlin/**' + exclude 'META-INF/*.kotlin_module' + exclude 'META-INF/*.version' } sourceSets { main.java.srcDirs += 'src/main/kotlin' diff --git a/build.gradle b/build.gradle index d6beeca..036eecb 100644 --- a/build.gradle +++ b/build.gradle @@ -13,6 +13,7 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:3.1.0-rc03' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + classpath 'com.github.triplet.gradle:play-publisher:1.2.0' } } diff --git a/play.json.enc b/play.json.enc new file mode 100644 index 0000000..9d32fcd Binary files /dev/null and b/play.json.enc differ