Skip to content

Commit a631edc

Browse files
authored
Merge pull request #80 from fleetbase/patch/profile-release
remove match-s3 plugin, update build.gradle helper fn
2 parents 3c84440 + c5276ff commit a631edc

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed

.github/workflows/profile-release.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,9 @@ jobs:
447447
cd android
448448
chmod +x ./gradlew
449449
450+
# Sanity check
451+
./gradlew :app:signingReport --no-daemon
452+
450453
# Install Fastlane for deployment
451454
if [ "${{ needs.detect-release.outputs.deploy }}" == "true" ]; then
452455
echo "🚀 Installing Fastlane for deployment"
@@ -679,7 +682,6 @@ jobs:
679682
cat > Gemfile <<'EOF'
680683
source "https://rubygems.org"
681684
gem "fastlane", "~> 2.228"
682-
gem "fastlane-plugin-match_storage_s3"
683685
EOF
684686
685687
# Optional: speed up / be deterministic

android/app/build.gradle

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,18 @@ def enableProguardInReleaseBuilds = false
7878
def jscFlavor = 'org.webkit:android-jsc:+'
7979

8080
/**
81-
* Helper function to prefer project property variables or fallback to env variable
81+
* Helper function to pull from env, -P props, or project.env (dotenv)
8282
*/
83-
def envOrProp(String key) {
84-
return project.hasProperty(key) ? project.property(key) : System.getenv(key)
83+
def readVar = { String key ->
84+
def v = System.getenv(key)
85+
if (v == null && project.hasProperty(key)) v = project.property(key)?.toString()
86+
if (v == null && project.hasProperty('env')) {
87+
def m = project.property('env')
88+
if (m instanceof Map || m instanceof Properties) {
89+
v = m.get(key)?.toString()
90+
}
91+
}
92+
return v
8593
}
8694

8795
android {
@@ -104,10 +112,10 @@ android {
104112
}
105113
signingConfigs {
106114
release {
107-
def ksFile = envOrProp('MYAPP_UPLOAD_STORE_FILE')
108-
def ksPass = envOrProp('MYAPP_UPLOAD_STORE_PASSWORD')
109-
def keyAlias = envOrProp('MYAPP_UPLOAD_KEY_ALIAS')
110-
def keyPass = envOrProp('MYAPP_UPLOAD_KEY_PASSWORD')
115+
def ksFile = readVar('ANDROID_UPLOAD_STORE_FILE')
116+
def ksPass = readVar('ANDROID_UPLOAD_STORE_PASSWORD')
117+
def keyAlias = readVar('ANDROID_UPLOAD_KEY_ALIAS')
118+
def keyPass = readVar('ANDROID_UPLOAD_KEY_PASSWORD')
111119

112120
if (ksFile && ksPass && keyAlias && keyPass) {
113121
storeFile file(ksFile)

0 commit comments

Comments
 (0)