Skip to content

Commit

Permalink
release(client_mobile_flutter): 打包apk 🚀 (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
dkvirus committed Jan 30, 2019
1 parent a6ed69a commit 97d3852
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 12 deletions.
2 changes: 2 additions & 0 deletions client_mobile_flutter/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ build/
.flutter-plugins

.idea

build
17 changes: 14 additions & 3 deletions client_mobile_flutter/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ if (flutterVersionName == null) {
apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

def keystorePropertiesFile = rootProject.file("key.properties")
def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))

android {
compileSdkVersion 27

Expand All @@ -41,11 +45,18 @@ android {
testInstrumentationRunner "android.support.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
}
}
}
Expand Down
4 changes: 4 additions & 0 deletions client_mobile_flutter/android/key.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
storePassword=dkvirus
keyPassword=dkvirus
keyAlias=key
storeFile=/Users/dkvirus/key.jks
Binary file added client_mobile_flutter/app-release.apk
Binary file not shown.
Binary file added client_mobile_flutter/font/iconfont.ttf
Binary file not shown.
12 changes: 6 additions & 6 deletions client_mobile_flutter/lib/utils/HttpUtils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -84,17 +84,17 @@ class HttpUtils {

/// 请求拦截器
dio.interceptor.request.onSend = (Options options){
if (context != null) {
DialogUtils.showLoadingDialog(context);
}
// if (context != null) {
// DialogUtils.showLoadingDialog(context);
// }
return options; //continue
};

/// 响应成功拦截器
dio.interceptor.response.onSuccess = (Response response) {
if (context != null) {
DialogUtils.closeLoadingDialog(context);
}
// if (context != null) {
// DialogUtils.closeLoadingDialog(context);
// }
return response; // continue
};

Expand Down
6 changes: 3 additions & 3 deletions client_mobile_flutter/lib/views/index.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ class IndexState extends State with SingleTickerProviderStateMixin {
color: Colors.grey,
child: TabBar(controller: controller, tabs: [
Tab(
icon: Icon(Icons.home),
icon: Icon(IconData(0xe60a, fontFamily: 'iconfont')),
),
Tab(
icon: Icon(Icons.notifications),
icon: Icon(IconData(0xe648, fontFamily: 'iconfont')),
),
Tab(
icon: Icon(Icons.cloud),
icon: Icon(IconData(0xe607, fontFamily: 'iconfont')),
)
]),
),
Expand Down
4 changes: 4 additions & 0 deletions client_mobile_flutter/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,7 @@ flutter:
#
# For details regarding fonts from package dependencies,
# see https://flutter.io/custom-fonts/#from-packages
fonts:
- family: iconfont
fonts:
- asset: font/iconfont.ttf

0 comments on commit 97d3852

Please sign in to comment.