Let stub APK respect canary builds

This commit is contained in:
topjohnwu 2019-04-05 07:15:54 -04:00
parent 24f5bc98d8
commit 6a0b2ddee9
3 changed files with 5 additions and 4 deletions

View File

@ -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')

View File

@ -4,7 +4,7 @@ android {
defaultConfig {
applicationId 'com.topjohnwu.magisk'
versionCode 1
versionName "stub"
versionName configProps['appVersion']
}
buildTypes {

View File

@ -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;