Skip to content

Commit

Permalink
fix android build
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobaraujo7 committed Jan 15, 2024
1 parent 1e4b50b commit c8f9f93
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 15 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,15 @@ jobs:
run: flutter pub get

- name: Decode Keystore File
run: echo "${{ secrets.KEYSTORE }}" | base64 -d > ${{ github.workspace }}/key.jks
run: echo "${{ secrets.KEYSTORE }}" | base64 -d > ${{ github.workspace }}/android/app/key.jks
env:
KEYSTORE: ${{ secrets.KEYSTORE }}

- name: Build APK
run: flutter build apk --release --flavor prod
env:
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWD }}
KEY_ALIAS: ${{ secrets.KEYSTORE_ALIAS }}
KEY_PASSWORD: ${{ secrets.KEYSTORE_PASSWD }}
KEYSTORE_PASSWD: ${{ secrets.KEYSTORE_PASSWD }}
KEYSTORE_ALIAS: ${{ secrets.KEYSTORE_ALIAS }}

- name: Upload Artifact
uses: actions/upload-artifact@v2
Expand Down
15 changes: 4 additions & 11 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,6 @@ if (flutterVersionName == null) {
flutterVersionName = '1.0'
}

def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')

if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}

android {
namespace "br.com.flutterando.yuno"
compileSdkVersion flutter.compileSdkVersion
Expand Down Expand Up @@ -72,10 +65,10 @@ android {

signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword keystoreProperties['storePassword']
keyAlias System.getenv('KEYSTORE_ALIAS')
keyPassword System.getenv('KEYSTORE_PASSWD')
storeFile file('key.jks')
storePassword System.getenv('KEYSTORE_PASSWD')
}
}

Expand Down

0 comments on commit c8f9f93

Please sign in to comment.