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 {