Skip to content

Commit

Permalink
[FIX] #7 - release 버전 시도 / buildConfigField를 buildTypes > release로 이동
Browse files Browse the repository at this point in the history
  • Loading branch information
jung0115 committed Jul 8, 2024
1 parent 2e1006f commit 2c1a5eb
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 26 deletions.
34 changes: 17 additions & 17 deletions .github/workflows/android_ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,35 +64,35 @@ jobs:
# echo storeFile=$STORE_FILE > ./keystore.properties

# Build APK Release
# - name: Build Release Apk
# run: ./gradlew assembleRelease --stacktrace --warning-mode=all
- name: Build Release Apk
run: ./gradlew assembleRelease --stacktrace --warning-mode=all

# - name: APK 디렉토리 확인 (디버깅용)
# run: ls -alh app/build/outputs/apk/release/
- name: APK 디렉토리 확인 (디버깅용) / Release
run: ls -alh app/build/outputs/apk/release/

- name: Build debug
run: ./gradlew assembleDebug
# - name: Build Debug Apk
# run: ./gradlew assembleDebug

# - name: APK 디렉토리 확인 (디버깅용)
# - name: APK 디렉토리 확인 (디버깅용) / Debug
# run: ls -alh app/build/outputs/apk/debug/

# Build AAB Release
# - name: Build release Bundle
# run: ./gradlew bundleRelease

# Firebase에 배포
# - name: Upload Firebase App Distribution / Release
# uses: wzieba/Firebase-Distribution-Github-Action@v1
# with:
# appId: ${{secrets.FIREBASE_APP_ID}}
# serviceCredentialsFileContent: ${{ secrets.CREDENTIAL_FILE_CONTENT }}
# groups: swmarastro
# file: app/build/outputs/apk/release/app-release-unsigned.apk

- name: Upload Firebase App Distribution / Debug
- name: Upload Firebase App Distribution / Release
uses: wzieba/Firebase-Distribution-Github-Action@v1
with:
appId: ${{secrets.FIREBASE_APP_ID}}
serviceCredentialsFileContent: ${{ secrets.CREDENTIAL_FILE_CONTENT }}
groups: swmarastro
file: app/build/outputs/apk/debug/app-debug.apk
file: app/build/outputs/apk/release/app-release-unsigned.apk

# - name: Upload Firebase App Distribution / Debug
# uses: wzieba/Firebase-Distribution-Github-Action@v1
# with:
# appId: ${{secrets.FIREBASE_APP_ID}}
# serviceCredentialsFileContent: ${{ secrets.CREDENTIAL_FILE_CONTENT }}
# groups: swmarastro
# file: app/build/outputs/apk/debug/app-debug.apk
18 changes: 9 additions & 9 deletions core/data/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,21 @@ android {
targetSdk target_sdk_version

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

def baseUrl = properties.getProperty('api.baseurl', '')
println "BASE_URL: ${baseUrl}"

if (!baseUrl.isEmpty()) {
buildConfigField "String", 'BASE_URL', "${properties.getProperty('api.baseurl', '')}"
} else {
throw new GradleException("BASE_URL is not set in local.properties")
}
}

buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'

def baseUrl = properties.getProperty('api.baseurl', '')
println "BASE_URL: ${baseUrl}"

if (!baseUrl.isEmpty()) {
buildConfigField "String", 'BASE_URL', "${properties.getProperty('api.baseurl', '')}"
} else {
throw new GradleException("BASE_URL is not set in local.properties")
}
}
}
compileOptions {
Expand Down

0 comments on commit 2c1a5eb

Please sign in to comment.