mirror of
https://github.com/austinried/subtracks.git
synced 2025-12-26 16:49:29 +01:00
signing config & build apk
This commit is contained in:
parent
f0f812e66a
commit
49b8d2c423
12
.github/workflows/build-flutter.yml
vendored
12
.github/workflows/build-flutter.yml
vendored
@ -6,10 +6,11 @@ on:
|
||||
- v2
|
||||
|
||||
jobs:
|
||||
build-android:
|
||||
runs-on: ubuntu-latest
|
||||
build-apk:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: subosito/flutter-action@v2
|
||||
with:
|
||||
flutter-version: '3.7.11'
|
||||
@ -17,7 +18,6 @@ jobs:
|
||||
cache: true
|
||||
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:'
|
||||
cache-path: '${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:'
|
||||
- run: flutter doctor
|
||||
# - run: flutter pub get
|
||||
# - run: flutter build apk
|
||||
# - run: flutter build appbundle
|
||||
|
||||
- run: flutter pub get
|
||||
- run: flutter build apk
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@ -46,3 +46,4 @@ app.*.map.json
|
||||
/.env
|
||||
*.sqlite*
|
||||
/.fvm/flutter_sdk
|
||||
*.keystore
|
||||
|
||||
@ -25,6 +25,12 @@ apply plugin: 'com.android.application'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||
|
||||
def keystoreProperties = new Properties()
|
||||
def keystorePropertiesFile = rootProject.file('key.properties')
|
||||
if (keystorePropertiesFile.exists()) {
|
||||
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion flutter.compileSdkVersion
|
||||
ndkVersion flutter.ndkVersion
|
||||
@ -53,11 +59,22 @@ android {
|
||||
versionName flutterVersionName
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
release {
|
||||
keyAlias keystoreProperties['keyAlias']
|
||||
keyPassword keystoreProperties['keyPassword']
|
||||
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
|
||||
storePassword keystoreProperties['storePassword']
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
// TODO: Add your own signing config for the release build.
|
||||
// Signing with the debug keys for now, so `flutter run --release` works.
|
||||
signingConfig signingConfigs.debug
|
||||
if (project.hasProperty("signRelease")) {
|
||||
signingConfig signingConfigs.release
|
||||
} else {
|
||||
signingConfig signingConfigs.debug
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user