From e8d6a9abf5463ea5f7670c40962f5a61a3fa2787 Mon Sep 17 00:00:00 2001 From: HeCodes2Much Date: Tue, 9 Jul 2024 13:02:33 +0100 Subject: [PATCH] Fix: Fixed nightly builds to not overlap with other versions Signed-off-by: HeCodes2Much --- .github/workflows/nightly-release.yml | 2 +- app/build.gradle.kts | 28 +++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/.github/workflows/nightly-release.yml b/.github/workflows/nightly-release.yml index 1864f11..db7fe8b 100644 --- a/.github/workflows/nightly-release.yml +++ b/.github/workflows/nightly-release.yml @@ -61,7 +61,7 @@ jobs: run: printf "%s" "${{ secrets.WEATHER_PROPERTIES }}" > $GITHUB_WORKSPACE/weather.properties - name: Build with Gradle - run: ./gradlew clean && ./gradlew assembleWithInternetRelease && ./gradlew assembleWithoutInternetRelease + run: ./gradlew clean && ./gradlew assembleWithInternetNightlyRelease && ./gradlew assembleWithoutInternetNightlyRelease - name: Sign APK - WithInternet uses: ilharp/sign-android-release@v1.0.4 diff --git a/app/build.gradle.kts b/app/build.gradle.kts index f5e4dab..231ca44 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -91,6 +91,34 @@ android { value = "\"REMOVE\"" ) } + + create("withInternetNightly") { + dimension = "internet" + applicationIdSuffix = ".nightly" + manifestPlaceholders["internetPermission"] = "android.permission.INTERNET" + val weatherFile = project.rootProject.file("weather.properties") + val properties = Properties() + properties.load(weatherFile.inputStream()) + val apiKey = properties.getProperty("WEATHER_API_KEY") ?: "" + buildConfigField( + type = "String", + name = "API_KEY", + value = "\"$apiKey\"" + ) + resValue("string", "app_name", "Easy Launcher (Nightly)") + } + + create("withoutInternetNightly") { + dimension = "internet" + applicationIdSuffix = ".nightly" + manifestPlaceholders["internetPermission"] = "REMOVE" + buildConfigField( + type = "String", + name = "API_KEY", + value = "\"REMOVE\"" + ) + resValue("string", "app_name", "Easy Launcher (Nightly)") + } } composeOptions {