diff --git a/.travis.yml b/.travis.yml index c3db79241..4482e615a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,7 +37,7 @@ deploy: provider: releases api_key: secure: mh793ORwYZxd0CERyAYUlyhCeLhCMtvZeklvGrZ4Q6AK8cnacNsg41rOoIK1K1pAqBntXEVLBC3cRg2rAPy0nRT45z3wduUAnDFgvay4lV7FaTO0QwWT8rYWfyWfjEY3Ti13NV+wBa+wF25W6Cr2PNjdge3lVGnck0Xo52X2eMAOuWJMI1Jb2p1QLBAjenPYyh6uSBX8ZScZN0Jx3KVQeFyCoLHwULP8wjVIbTgFbF3qHPNV0l6FZZh7B9WOvHavSk17SDeTD655VoA57vZ/MCBkruwvGmuzs5tixko15kd6+r/mS6DN5NMWlLDODrrTk9xuEYhO8i26bJKwOlSol1A8Ff9vPrVPayp5lbhbdMXJJkeMkDrHG76ugNzeJhJCm67tlq43COUFuin5L8QpC4iOLy3TjOluzkhIn6pZ6OOdsfG3Ip/BpwR+yb+pfaPhiZ1fvuqfDza2ina8bWbYksUoD1AKRDvd1sAg9XqYGxlaxXoL0BeZqTKUwToziaNES2/pGRKNBhM8B+YZyrNYasDPZzKhIWsx6jaXWos3vy7G1JpE8e7xzw/wlemD7fU+/O/hTUaSOtJLCWwoAP3rI42rZEpuAPAZ9aNvtA3PmZUssuZzeEH3zyAU4LhSXE2YH82lRph/sDZjbOnfTo8Sbho/G334gARb15d34YmareU= - file: "/app/build/outputs/apk/release/app-release.apk" + file: "app/build/outputs/apk/release/app-release.apk" skip_cleanup: true on: all_branches: true diff --git a/app/build.gradle b/app/build.gradle index f121ee737..0a34b3812 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -19,8 +19,8 @@ android { applicationId "io.github.feelfreelinux.wykopmobilny" minSdkVersion 19 targetSdkVersion 26 - versionCode 3 - versionName "0.1.2.1" + versionCode 4 + versionName "0.1.2.2" def credentialsPropertiesFile = rootProject.file("credentials.properties") def credentialsProperties = new Properties() @@ -98,6 +98,9 @@ dependencies { implementation "io.reactivex.rxjava2:rxandroid:$versions.rxandroid" implementation "io.reactivex.rxjava2:rxjava:$versions.rxjava" + // AppUpdater + implementation "com.github.javiersantos:AppUpdater:$versions.appUpdater" + // Dagger 2 implementation "com.google.dagger:dagger:$versions.dagger2" kapt "com.google.dagger:dagger-compiler:$versions.dagger2" diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index f704686e5..38c4a43b7 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -4,6 +4,7 @@ + diff --git a/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/modules/mainnavigation/MainNavigationActivity.kt b/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/modules/mainnavigation/MainNavigationActivity.kt index d0c6a9b18..4c0ca7724 100644 --- a/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/modules/mainnavigation/MainNavigationActivity.kt +++ b/app/src/main/kotlin/io/github/feelfreelinux/wykopmobilny/ui/modules/mainnavigation/MainNavigationActivity.kt @@ -12,6 +12,7 @@ import android.support.v7.widget.Toolbar import android.view.MenuItem import android.widget.Toast import com.evernote.android.job.util.JobUtil +import com.github.javiersantos.appupdater.AppUpdater import io.github.feelfreelinux.wykopmobilny.R import io.github.feelfreelinux.wykopmobilny.WykopApp import io.github.feelfreelinux.wykopmobilny.base.BaseActivity @@ -91,6 +92,14 @@ class NavigationActivity : BaseActivity(), MainNavigationView, NavigationView.On WykopApp.uiInjector.inject(this) JobUtil.hasBootPermission(this) + // Setup AppUpdater + AppUpdater(this) + .setGitHubUserAndRepo("feelfreelinux", "WykopMobilny") + .setTitleOnUpdateAvailable(R.string.update_available) + .setContentOnUpdateAvailable(R.string.update_app) + .setButtonUpdate(R.string.update) + .start() + // Schedules notification service WykopNotificationsJob.schedule(settingsApi) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 986574ec2..99f917234 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -85,4 +85,7 @@ Przestań obserwować tag Zablokuj tag Odblokuj tag + Dostępna aktualizacja + Zaktualizuj aplikację do najnowszej wersji + Zaktualizuj diff --git a/app/src/test/kotlin/io/github/feelfreelinux/wykopmobilny/ui/modules/loginscreen/LoginScreenPresenterTest.kt b/app/src/test/kotlin/io/github/feelfreelinux/wykopmobilny/ui/modules/loginscreen/LoginScreenPresenterTest.kt index abda77f77..1cd492ebf 100644 --- a/app/src/test/kotlin/io/github/feelfreelinux/wykopmobilny/ui/modules/loginscreen/LoginScreenPresenterTest.kt +++ b/app/src/test/kotlin/io/github/feelfreelinux/wykopmobilny/ui/modules/loginscreen/LoginScreenPresenterTest.kt @@ -49,4 +49,5 @@ class LoginScreenPresenterTest { } + } \ No newline at end of file diff --git a/versions.gradle b/versions.gradle index 5ceae467d..94ab7c681 100644 --- a/versions.gradle +++ b/versions.gradle @@ -17,6 +17,7 @@ ext { rxjava : '2.1.3', rxandroid : '2.0.1', leakcanary : '1.6-SNAPSHOT', - androidjob : '1.2.0' + androidjob : '1.2.0', + appUpdater : '2.6.3' ] }