Sign release apks (#123)
This commit is contained in:
parent
71290a5f78
commit
b8787730e5
|
@ -35,12 +35,27 @@ jobs:
|
|||
- name: Run lints
|
||||
run: flutter analyze
|
||||
|
||||
- name: Run dartfmt
|
||||
run: dartfmt --dry-run --set-exit-if-changed .
|
||||
- name: Check formatting
|
||||
run: flutter format --dry-run --set-exit-if-changed .
|
||||
|
||||
- name: Run tests
|
||||
run: flutter test
|
||||
|
||||
- name: Inject keystore
|
||||
working-directory: android
|
||||
env:
|
||||
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
|
||||
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
|
||||
ALIAS: ${{ secrets.ALIAS }}
|
||||
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
|
||||
run: |
|
||||
echo storePassword=$KEY_STORE_PASSWORD > key.properties
|
||||
echo keyPassword=$KEY_PASSWORD >> key.properties
|
||||
echo keyAlias=$ALIAS >> key.properties
|
||||
echo storeFile=$HOME/key.jks >> key.properties
|
||||
|
||||
echo $SIGNING_KEY | base64 -d | tee ~/key.jks >/dev/null
|
||||
|
||||
- name: Android build
|
||||
run: flutter build apk --split-per-abi
|
||||
|
||||
|
|
|
@ -25,8 +25,14 @@ 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 28
|
||||
compileSdkVersion 30
|
||||
|
||||
sourceSets {
|
||||
main.java.srcDirs += 'src/main/kotlin'
|
||||
|
@ -37,21 +43,27 @@ android {
|
|||
}
|
||||
|
||||
defaultConfig {
|
||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||
applicationId "com.example.lemmur"
|
||||
applicationId "com.krawieck.lemmur"
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 28
|
||||
targetSdkVersion 30
|
||||
versionCode flutterVersionCode.toInteger()
|
||||
versionName flutterVersionName
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
signingConfigs {
|
||||
release {
|
||||
keyAlias keystoreProperties['keyAlias']
|
||||
keyPassword keystoreProperties['keyPassword']
|
||||
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
|
||||
storePassword keystoreProperties['storePassword']
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
signingConfig signingConfigs.release
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
flutter {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.example.lemmur">
|
||||
package="com.krawieck.lemmur">
|
||||
<!-- Flutter needs it to communicate with the running application
|
||||
to allow setting breakpoints, to provide hot reload, etc.
|
||||
-->
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.example.lemmur">
|
||||
package="com.krawieck.lemmur">
|
||||
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
|
||||
calls FlutterMain.startInitialization(this); in its onCreate method.
|
||||
In most cases you can leave this as-is, but you if you want to provide
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package com.example.lemmur
|
||||
package com.krawieck.lemmur
|
||||
|
||||
import io.flutter.embedding.android.FlutterActivity
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.example.lemmur">
|
||||
package="com.krawieck.lemmur">
|
||||
<!-- Flutter needs it to communicate with the running application
|
||||
to allow setting breakpoints, to provide hot reload, etc.
|
||||
-->
|
||||
|
|
|
@ -378,7 +378,7 @@
|
|||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.lemmur;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.krawieck.lemmur;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_VERSION = 5.0;
|
||||
|
@ -515,7 +515,7 @@
|
|||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.lemmur;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.krawieck.lemmur;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
|
@ -546,7 +546,7 @@
|
|||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.lemmur;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.krawieck.lemmur;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_VERSION = 5.0;
|
||||
|
@ -580,4 +580,4 @@
|
|||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 97C146E61CF9000F007C117D /* Project object */;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.10)
|
|||
project(runner LANGUAGES CXX)
|
||||
|
||||
set(BINARY_NAME "lemmur")
|
||||
set(APPLICATION_ID "com.example.lemmur")
|
||||
set(APPLICATION_ID "com.krawieck.lemmur")
|
||||
|
||||
cmake_policy(SET CMP0063 NEW)
|
||||
|
||||
|
|
Loading…
Reference in New Issue