From c7033dd7570f63f96771907298cb1208c0c670b3 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Wed, 16 Oct 2019 01:54:59 -0400 Subject: [PATCH] Allow injecting custom channel URL for debug --- stub/build.gradle | 1 + stub/src/main/java/com/topjohnwu/magisk/DownloadActivity.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/stub/build.gradle b/stub/build.gradle index b9e76ddae..932b547fc 100644 --- a/stub/build.gradle +++ b/stub/build.gradle @@ -5,6 +5,7 @@ android { applicationId 'com.topjohnwu.magisk' versionCode 1 versionName props['appVersion'] + buildConfigField 'String', 'DEV_CHANNEL', props['DEV_CHANNEL'] ?: 'null' } buildTypes { diff --git a/stub/src/main/java/com/topjohnwu/magisk/DownloadActivity.java b/stub/src/main/java/com/topjohnwu/magisk/DownloadActivity.java index f020a2b0f..62a2baa29 100644 --- a/stub/src/main/java/com/topjohnwu/magisk/DownloadActivity.java +++ b/stub/src/main/java/com/topjohnwu/magisk/DownloadActivity.java @@ -22,7 +22,7 @@ public class DownloadActivity extends Activity { static final String TAG = "MMStub"; private static final boolean IS_CANARY = BuildConfig.VERSION_NAME.contains("-"); - private static final String URL = + private static final String URL = BuildConfig.DEV_CHANNEL != null ? BuildConfig.DEV_CHANNEL : "https://raw.githubusercontent.com/topjohnwu/magisk_files/" + (IS_CANARY ? "canary/release.json" : "master/stable.json");