Skip to content

Commit

Permalink
Finished package android apk
Browse files Browse the repository at this point in the history
  • Loading branch information
iHTCboy committed Feb 28, 2021
1 parent 9e1d8c1 commit bbfc8e8
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 7 deletions.
29 changes: 26 additions & 3 deletions app/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ if (flutterVersionName == null) {
flutterVersionName = '1.0'
}

def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
Expand All @@ -37,19 +43,36 @@ android {
}

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.iHTCboy.iPomodoro"
minSdkVersion 16
targetSdkVersion 30
versionCode flutterVersionCode.toInteger()
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.release
ndk {
//设置支持的SO库架构
abiFilters 'arm64-v8a'
}
}
debug {
signingConfig signingConfigs.debug
ndk {
//设置支持的SO库架构
abiFilters 'arm64-v8a', 'x86', 'x86_64'
}
}
}
}
Expand Down
8 changes: 8 additions & 0 deletions app/android/app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -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.**
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,10 @@ class MainActivity : FlutterActivity() {
val appName = call.argument<String>("appname")
val title = "${appName} Feedback"
val appVersion = "${getAppVersionName()}(${getAppVersionCode()})"
val systemVersion = "${android.os.Build.VERSION.RELEASE}(${android.os.Build.VERSION.SDK_INT})"
val deviceInfo = "${android.os.Build.BRAND}(${android.os.Build.MANUFACTURER}) - ${android.os.Build.MODEL}"
val message = """欢迎来信,写下你的问题吧~
当前 ${appName} 版本 ${appVersion},系统版本:${android.os.Build.VERSION.RELEASE}
设备信息:${android.os.Build.BRAND} - ${android.os.Build.MODEL}"""
当前 ${appName} 版本 ${appVersion},系统版本:v${systemVersion},设备信息:${deviceInfo} """
val emialIntent: Intent = Intent().apply {
action = Intent.ACTION_SENDTO
setData(Uri.parse("mailto:${call.argument<String>("email")}"))
Expand Down
4 changes: 3 additions & 1 deletion app/lib/config/app_config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ import 'package:flutter/material.dart';

class AppConfig {
static const AppName = "iPomodoro";
static const AppAppleId = "iPomodoro";
static const AppAppleId = "1439666929";
static const AppPackageName = "com.iHTCboy.iPomodoro";
static const AppAppStoreUrl = "https://apps.apple.com/cn/app/ipomodoro/id1439666929";
static const AppAppStoreReviewAction = "&action=write-review";
static const AppPlayStoreUrl = "https://play.google.com/store/apps/details?id=" + AppPackageName;
static const AppGitHubUrl = "https://github.com/iHTCboy/iPomodoro-Flutter";
static const AppLicenseUrl = "https://raw.githubusercontent.com/iHTCboy/iPomodoro-Flutter/master/LICENSE";
static const AppShareText = "Hello, ${AppName}! 这是一款番茄时间管理规划的App,不再分心!不再拖延!高效!专注!学习必备的好工具哦!iOS下载链接:${AppAppStoreUrl}";
Expand Down
4 changes: 3 additions & 1 deletion app/lib/ui/page/me_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ class MePage extends StatelessWidget {
slivers: [
//頂
SliverAppBar(
backgroundColor: AppColors.ME_SUB_COLOR,
pinned: true,
centerTitle: true,
backgroundColor: AppColors.ME_SUB_COLOR,
expandedHeight: DeviceUtils.get_size(context, 200, 220, 300),
flexibleSpace: FlexibleSpaceBar(
centerTitle: true,
title: Text("爱番茄",
style: TextStyle(fontSize: 20, fontWeight: FontWeight.normal)),
background: Container(
Expand Down

0 comments on commit bbfc8e8

Please sign in to comment.