Skip to content

Commit

Permalink
Update firebase firestribution
Browse files Browse the repository at this point in the history
  • Loading branch information
cesarwillymc committed Jan 19, 2024
1 parent 28d09f4 commit 82b3b86
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 20 deletions.
21 changes: 10 additions & 11 deletions .github/workflows/debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Create local.properties
run: echo ./local.properties
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
Expand All @@ -33,24 +31,25 @@ jobs:

- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Execute validations
run: ./gradlew executeValidations
- name: Configuration Local.properties
env:
SHARED_PREFERENCES_NAME: ${{ secrets.SHARED_PREFERENCES_NAME }}
BASE_URL: ${{ secrets.BASE_URL }}
BASE_URL_GQL: ${{ secrets.BASE_URL_GQL }}
CLIENT_ID: ${{ secrets.CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
DEBUG_KEY_PASSWORD: ${{ secrets.DEBUG_KEY_PASSWORD }}
TESTERS_GROUP: ${{ secrets.TESTERS_GROUP }}
run: |
echo "SHARED_PREFERENCES_NAME=$SHARED_PREFERENCES_NAME" >> local.properties
echo "BASE_URL=BASE_URL" >> local.properties
echo "BASE_URL_GQL=BASE_URL_GQL" >> local.properties
echo "CLIENT_ID=CLIENT_ID" >> local.properties
echo "CLIENT_SECRET=CLIENT_SECRET" >> local.properties
- name: Execute validations
run: ./gradlew executeValidations
- name: Build App
run: ./gradlew assembleDebug appDistributionUploadDebug
env:
SHARED_PREFERENCES_NAME: ${{ secrets.SHARED_PREFERENCES_NAME }}
BASE_URL: ${{ secrets.BASE_URL }}
BASE_URL_GQL: ${{ secrets.BASE_URL_GQL }}
CLIENT_ID: ${{ secrets.CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
DEBUG_KEY_PASSWORD: ${{ secrets.DEBUG_KEY_PASSWORD }}
TESTERS_GROUP: ${{ secrets.TESTERS_GROUP }}
- name: Upload APK artifact
Expand Down
10 changes: 1 addition & 9 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import com.android.build.gradle.internal.cxx.configure.gradleLocalProperties
import java.io.FileInputStream
import java.util.Properties

plugins {
id("com.android.application")
Expand All @@ -12,13 +10,7 @@ plugins {
kotlin("kapt")
}

private val localProperties = Properties().apply {
File(rootProject.rootDir, "local.properties").let {
if(it.exists()){
load(FileInputStream(it))
}
}
}
private val localProperties = gradleLocalProperties(rootDir)

fun getLocalProperty(key: String, defaultValue: String = ""): String =
localProperties.getProperty(key, System.getenv(key) ?: defaultValue)
Expand Down

0 comments on commit 82b3b86

Please sign in to comment.