diff --git a/.github/workflows/build-unsigned.yaml b/.github/workflows/build-unsigned.yaml new file mode 100644 index 00000000..5610252e --- /dev/null +++ b/.github/workflows/build-unsigned.yaml @@ -0,0 +1,24 @@ +name: Build Unsigned +on: [push, pull_request] +jobs: + BuildUnsigned: + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + with: + submodules: recursive + - name: Setup Java + uses: actions/setup-java@v1 + with: + java-version: 11 + - name: Setup Go + uses: actions/setup-go@v2 + with: + go-version: 1.16 + - name: Setup Android SDK + uses: android-actions/setup-android@v2 + - name: Setup Cmake & Ninja + uses: lukka/get-cmake@latest + - name: Build + run: ./gradlew --no-daemon app:assembleRelease \ No newline at end of file diff --git a/app/build.gradle.kts b/app/build.gradle.kts index d41642e5..9ed11a3e 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -48,13 +48,20 @@ android { versionNameSuffix = ".premium" if (buildFlavor == "premium") { - val appCenterKey = rootProject.file("local.properties").inputStream() - .use { Properties().apply { load(it) } } - .getProperty("appcenter.key", null) + val localFile = rootProject.file("local.properties") + if (localFile.exists()) { + val appCenterKey = localFile.inputStream() + .use { Properties().apply { load(it) } } + .getProperty("appcenter.key", null) - Objects.requireNonNull(appCenterKey) - - buildConfigField("String", "APP_CENTER_KEY", "\"$appCenterKey\"") + if (appCenterKey != null) { + buildConfigField("String", "APP_CENTER_KEY", "\"$appCenterKey\"") + } else { + buildConfigField("String", "APP_CENTER_KEY", "null") + } + } else { + buildConfigField("String", "APP_CENTER_KEY", "null") + } } } } diff --git a/buildSrc/src/main/java/Build.kt b/buildSrc/src/main/java/Build.kt index 2c0e644c..98a14d4e 100644 --- a/buildSrc/src/main/java/Build.kt +++ b/buildSrc/src/main/java/Build.kt @@ -6,7 +6,7 @@ const val buildVersionName = "2.4.2" const val buildMinSdkVersion = 21 const val buildTargetSdkVersion = 30 -const val buildNdkVersion = "23.0.7123448" +const val buildNdkVersion = "22.1.7171670" val Project.buildFlavor: String get() {