diff --git a/app/build.gradle b/app/build.gradle index 8f66f54d5..64373ffe9 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -4,8 +4,8 @@ android { defaultConfig { applicationId 'com.topjohnwu.magisk' vectorDrawables.useSupportLibrary = true - versionName rootProject.ext.configProps['appVersion'] - versionCode rootProject.ext.configProps['appVersionCode'] as Integer + versionName configProps['appVersion'] + versionCode configProps['appVersionCode'] as Integer javaCompileOptions { annotationProcessorOptions { argument('butterknife.debuggable', 'false') diff --git a/stub/build.gradle b/stub/build.gradle index 60fce7e2c..9da7df4d9 100644 --- a/stub/build.gradle +++ b/stub/build.gradle @@ -4,7 +4,7 @@ android { defaultConfig { applicationId 'com.topjohnwu.magisk' versionCode 1 - versionName "stub" + versionName configProps['appVersion'] } buildTypes { diff --git a/stub/src/main/java/com/topjohnwu/magisk/MainActivity.java b/stub/src/main/java/com/topjohnwu/magisk/MainActivity.java index 79b57894b..226611f75 100644 --- a/stub/src/main/java/com/topjohnwu/magisk/MainActivity.java +++ b/stub/src/main/java/com/topjohnwu/magisk/MainActivity.java @@ -17,7 +17,8 @@ import java.io.File; public class MainActivity extends Activity { private static final String URL = - "https://raw.githubusercontent.com/topjohnwu/magisk_files/master/stable.json"; + "https://raw.githubusercontent.com/topjohnwu/magisk_files/master/" + + (BuildConfig.VERSION_NAME.contains("-") ? "canary_builds/canary.json" : "stable.json"); private String apkLink;