Merge branch 'master' of gitlab.com:ChristianPauly/fluffychat-flutter

This commit is contained in:
Christian Pauly 2020-01-03 09:09:17 +01:00
commit 3099520239
5 changed files with 38 additions and 6 deletions

4
.gitignore vendored
View file

@ -36,3 +36,7 @@ lib/generated_plugin_registrant.dart
# Exceptions to above rules.
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
/key.jks
/android/key.properties

View file

@ -28,9 +28,14 @@ build_web:
- build/web/
build_android:
build_android_fdroid:
stage: coverage
script:
- cd android && echo $FDROID_KEY | base64 --decode --ignore-garbage > key.jks && cd ..
- cd android && echo "storePassword=${FDROID_KEY_PASS}" >> key.properties && cd ..
- cd android && echo "keyPassword=${FDROID_KEY_PASS}" >> key.properties && cd ..
- cd android && echo "keyAlias=key" >> key.properties && cd ..
- cd android && echo "storeFile=../key.jks" >> key.properties && cd ..
- flutter build apk --release
artifacts:
when: on_success

View file

@ -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 28
@ -37,7 +43,6 @@ android {
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "chat.fluffy.fluffychat"
minSdkVersion 16
targetSdkVersion 28
@ -46,11 +51,21 @@ android {
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
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
signingConfig signingConfigs.release
minifyEnabled true
useProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

View file

@ -8,7 +8,7 @@
<uses-permission android:name="android.permission.INTERNET" />
<application
android:name="io.flutter.app.FlutterApplication"
android:label="fluffychat"
android:label="FluffyChat"
android:icon="@mipmap/launcher_icon">
<activity
android:name=".MainActivity"

8
android/proguard-rules.pro vendored Normal file
View file

@ -0,0 +1,8 @@
## Flutter wrapper
-keep class io.flutter.app.** { *; }
-keep class io.flutter.plugin.** { *; }
-keep class io.flutter.util.** { *; }
-keep class io.flutter.view.** { *; }
-keep class io.flutter.** { *; }
-keep class io.flutter.plugins.** { *; }
-dontwarn io.flutter.embedding.**