diff --git a/.travis/script.sh b/.travis/script.sh index c10f13d2f..6fc2e94af 100755 --- a/.travis/script.sh +++ b/.travis/script.sh @@ -2,23 +2,32 @@ set -ev -git log --format=%B -n 1 $TRAVIS_COMMIT > CHANGES.md -mkdir -p app/src/main/play/release-notes/en-US/ -cp CHANGES.md app/src/main/play/release-notes/en-US/default.txt - -export VERSION_CODE=`git rev-list --count HEAD` - -./gradlew test -./gradlew lint -./gradlew ktlintCheck - -if [ "$TRAVIS_PULL_REQUEST" = "false" ] +if [ "$TRAVIS_PULL_REQUEST" != "false" ] then - if [ -n "$TRAVIS_TAG" ] - then - echo "Release already in Play Store Console" - elif [ "$TRAVIS_BRANCH" = "master" ] - then - ./gradlew assembleRelease appDistributionUploadRelease publishReleaseBundle - fi -fi \ No newline at end of file + + echo "Building PR" + ./gradlew test + ./gradlew lint + ./gradlew ktlintCheck + +elif [ -n "$TRAVIS_TAG" ] +then + + echo "Promoting Beta to Production" + ./gradlew promoteArtifact --from-track beta --promote-track production + +elif [ "$TRAVIS_BRANCH" = "master" ] +then + + echo "Building Master" + mkdir -p app/src/main/play/release-notes/en-US/ + git log --format=%s $(git rev-list --tags --max-count=1)..HEAD > app/src/main/play/release-notes/en-US/default.txt + + export VERSION_CODE=`git rev-list --count HEAD` + + ./gradlew test + ./gradlew lint + ./gradlew ktlintCheck + + ./gradlew assembleRelease appDistributionUploadRelease publishReleaseBundle +fi diff --git a/README.md b/README.md index f833c1649..24ef1f0a0 100644 --- a/README.md +++ b/README.md @@ -58,4 +58,4 @@ def vName = "X.X.X-${vCode}" ``` Merge that into master and allow the build to complete and validate on the beta channel. (Deploy there automatic) -Once ready to move to production log into play store -> Release Management -> App Releases -> Beta -> Promote to Production +Once ready to move to production tag the master branch and travis will start the promotion from beta -> production. diff --git a/app/build.gradle b/app/build.gradle index bbe5ae919..89d5deadd 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -14,7 +14,7 @@ buildscript { } dependencies { classpath 'com.google.firebase:firebase-appdistribution-gradle:1.3.1' - classpath 'com.github.triplet.gradle:play-publisher:2.5.0' + classpath 'com.github.triplet.gradle:play-publisher:2.6.2' classpath 'de.mannodermaus.gradle.plugins:android-junit5:1.5.2.0' } } @@ -35,7 +35,7 @@ android { firebaseAppDistribution { serviceCredentialsFile = "firebaseAppDistributionServiceCredentialsFile.json" - releaseNotesFile = "CHANGES.md" + releaseNotesFile = "src/main/play/release-notes/en-US/default.txt" groups = "continuous-deployment" } @@ -97,7 +97,7 @@ dependencies { implementation "androidx.appcompat:appcompat:$appCompatVersion" implementation "androidx.constraintlayout:constraintlayout:$constraintLayoutversion" implementation "androidx.preference:preference-ktx:1.1.0" - implementation 'com.google.android.material:material:1.0.0' + implementation 'com.google.android.material:material:1.1.0' implementation("com.jakewharton.threetenabp:threetenabp:$threeTenAbpVersion") { exclude group: 'org.threeten' @@ -112,7 +112,7 @@ dependencies { implementation "com.google.firebase:firebase-iid:20.0.2" implementation "com.google.firebase:firebase-messaging:20.1.0" - implementation "androidx.work:work-runtime-ktx:2.3.0" + implementation "androidx.work:work-runtime-ktx:2.3.1" testImplementation "org.spekframework.spek2:spek-dsl-jvm:$spek2Version" testImplementation "org.spekframework.spek2:spek-runner-junit5:$spek2Version" diff --git a/app/src/main/java/io/homeassistant/companion/android/settings/SettingsFragment.kt b/app/src/main/java/io/homeassistant/companion/android/settings/SettingsFragment.kt index 4a72a77fa..9e977cc26 100644 --- a/app/src/main/java/io/homeassistant/companion/android/settings/SettingsFragment.kt +++ b/app/src/main/java/io/homeassistant/companion/android/settings/SettingsFragment.kt @@ -52,7 +52,7 @@ class SettingsFragment : PreferenceFragmentCompat(), SettingsView { onChangeUrlValidator findPreference("version")?.let { - it.summary = "${BuildConfig.VERSION_NAME} (${BuildConfig.VERSION_CODE})" + it.summary = BuildConfig.VERSION_NAME } presenter.onCreate() diff --git a/gradle/dependencies.gradle b/gradle/dependencies.gradle index 230aeed7e..90196fd34 100644 --- a/gradle/dependencies.gradle +++ b/gradle/dependencies.gradle @@ -7,7 +7,7 @@ ext { jacksonVersion = '2.10.1' appCompatVersion = '1.1.0' constraintLayoutversion = '1.1.3' - coroutinesVersion = '1.3.2' + coroutinesVersion = '1.3.3' daggerVersion = '2.25.2' threeTenAbpVersion = '1.2.1' threeTenBpVersion = '1.4.0' diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index f6b961fd5..5c2d1cf01 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 339337ad0..4e1cc9db6 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ -#Sun Mar 31 01:55:59 PDT 2019 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.3-all.zip diff --git a/gradlew b/gradlew index cccdd3d51..83f2acfdc 100755 --- a/gradlew +++ b/gradlew @@ -1,5 +1,21 @@ #!/usr/bin/env sh +# +# Copyright 2015 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + ############################################################################## ## ## Gradle start up script for UN*X @@ -28,7 +44,7 @@ APP_NAME="Gradle" APP_BASE_NAME=`basename "$0"` # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD="maximum" @@ -109,8 +125,8 @@ if $darwin; then GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" fi -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then +# For Cygwin or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then APP_HOME=`cygpath --path --mixed "$APP_HOME"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` JAVACMD=`cygpath --unix "$JAVACMD"` diff --git a/gradlew.bat b/gradlew.bat index f9553162f..9618d8d96 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -1,3 +1,19 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + @if "%DEBUG%" == "" @echo off @rem ########################################################################## @rem @@ -14,7 +30,7 @@ set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome