Compare commits
29 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 10ccc40b6a | |||
| 9bab2cde56 | |||
| 59b972f864 | |||
| b21fd12ca7 | |||
| 730cb9c5bb | |||
| e07e30f598 | |||
| 067489b37b | |||
| ac1e447eca | |||
| a3ad89d0d4 | |||
| 799479447c | |||
| 6f75cf0bcd | |||
| c2cf535a77 | |||
| 5bca96a4cf | |||
| 8501b5ea48 | |||
| 64f1a28997 | |||
| f8db0ce0ff | |||
| cff16f671f | |||
| 63773b1e24 | |||
| 54df3eb276 | |||
| 981eef1145 | |||
| 1adeb429cc | |||
| 4e8e860810 | |||
| 422e6a0291 | |||
| d858805563 | |||
| c927b36917 | |||
| 1aa71aaea4 | |||
| acb0f1cdb0 | |||
| d0d83092e5 | |||
| efcc909023 |
29
README.md
@ -3,7 +3,8 @@
|
|||||||
## 开发环境
|
## 开发环境
|
||||||
|
|
||||||
- flutter:3.19.6
|
- flutter:3.19.6
|
||||||
|
- OpenJdk 17
|
||||||
|
- Xcode 16.3
|
||||||
|
|
||||||
## 目录说明
|
## 目录说明
|
||||||
|
|
||||||
@ -14,16 +15,24 @@
|
|||||||
- routes:路由
|
- routes:路由
|
||||||
- views:页面
|
- views:页面
|
||||||
|
|
||||||
|
|
||||||
## 多flavor配置
|
## 多flavor配置
|
||||||
- 配置文件在[flavorizr.yaml](flavorizr.yaml)
|
|
||||||
> 增加flavor环境所需要的命令参考:[flavorizr.yaml](flavorizr.yaml)文件中的说明
|
|
||||||
>
|
|
||||||
> 文档链接:https://pub.dev/packages/flutter_flavorizr
|
|
||||||
>
|
|
||||||
> 注意该插件最好在mac环境下运行
|
|
||||||
|
|
||||||
- 项目运行
|
- 配置文件在[flavorizr.yaml](flavorizr.yaml)
|
||||||
|
|
||||||
|
> 增加flavor环境所需要的命令参考:[flavorizr.yaml](flavorizr.yaml)文件中的说明
|
||||||
|
>
|
||||||
|
> 文档链接:https://pub.dev/packages/flutter_flavorizr
|
||||||
|
>
|
||||||
|
> 注意该插件最好在mac环境下运行
|
||||||
|
>
|
||||||
|
> 确保依赖、环境安装完成之后,执行`flutter pub run flutter_flavorizr`进行生成,注意这一步会覆盖原有的内容
|
||||||
|
|
||||||
|
### 生成.jks文件,用于android的flavor签名
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
flutter run --flavor <flavor昵称>
|
keytool -genkeypair -v -keystore <文件昵称>.jks -alias <别名> \
|
||||||
|
-keyalg RSA -keysize 2048 -validity 10000 \
|
||||||
|
-dname "CN=<通用名,通常是公司或产品名>, OU=<组织单位,如部门名称>, O=<组织/公司全名>, L=深圳, S=广东, C=CN" \
|
||||||
|
-storepass <密码> \
|
||||||
|
-keypass <密码>
|
||||||
```
|
```
|
||||||
2
android/.gitignore
vendored
@ -8,6 +8,4 @@ GeneratedPluginRegistrant.java
|
|||||||
|
|
||||||
# Remember to never publicly share your keystore.
|
# Remember to never publicly share your keystore.
|
||||||
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
|
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
|
||||||
key.properties
|
|
||||||
**/*.keystore
|
**/*.keystore
|
||||||
**/*.jks
|
|
||||||
|
|||||||
@ -30,6 +30,12 @@ def flutterVersionName = localProperties.getProperty('flutter.versionName')
|
|||||||
if (flutterVersionName == null) {
|
if (flutterVersionName == null) {
|
||||||
flutterVersionName = '1.0'
|
flutterVersionName = '1.0'
|
||||||
}
|
}
|
||||||
|
// 获取签名密码
|
||||||
|
def keystoreProperties = new Properties()
|
||||||
|
def keystorePropertiesFile = rootProject.file('key.properties')
|
||||||
|
if (keystorePropertiesFile.exists()) {
|
||||||
|
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
|
||||||
|
}
|
||||||
|
|
||||||
// Android配置块
|
// Android配置块
|
||||||
android {
|
android {
|
||||||
@ -75,17 +81,39 @@ android {
|
|||||||
// 设置支持的ABI架构
|
// 设置支持的ABI架构
|
||||||
ndk {
|
ndk {
|
||||||
// abiFilters "arm64-v8a"
|
// abiFilters "arm64-v8a"
|
||||||
abiFilters "armeabi", "armeabi-v7a", "arm64-v8a", "x86","x86_64"
|
abiFilters "armeabi", "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 👇 添加 signingConfigs
|
||||||
|
// 对应flavorizr.gradle中的 signingConfig 属性
|
||||||
|
signingConfigs {
|
||||||
|
debug {
|
||||||
|
// 使用默认 debug 签名(无需配置)
|
||||||
|
}
|
||||||
|
sky {
|
||||||
|
keyAlias keystoreProperties['sky.keyAlias']
|
||||||
|
keyPassword keystoreProperties['sky.keyPassword']
|
||||||
|
storeFile keystoreProperties['sky.storeFile'] ? file(keystoreProperties['sky.storeFile']) : null
|
||||||
|
storePassword keystoreProperties['sky.storePassword']
|
||||||
|
}
|
||||||
|
|
||||||
|
xhj {
|
||||||
|
keyAlias keystoreProperties['xhj.keyAlias']
|
||||||
|
keyPassword keystoreProperties['xhj.keyPassword']
|
||||||
|
storeFile keystoreProperties['xhj.storeFile'] ? file(keystoreProperties['sky.storeFile']) : null
|
||||||
|
storePassword keystoreProperties['xhj.storePassword']
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 构建类型配置
|
// 构建类型配置
|
||||||
buildTypes {
|
buildTypes {
|
||||||
// 发布版本配置
|
debug {
|
||||||
release {
|
|
||||||
// 签名配置,使用调试密钥
|
|
||||||
signingConfig signingConfigs.debug
|
signingConfig signingConfigs.debug
|
||||||
}
|
}
|
||||||
|
release {
|
||||||
|
// release 类型根据 flavor 使用不同签名
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,27 +2,17 @@ android {
|
|||||||
flavorDimensions += "flavor-type"
|
flavorDimensions += "flavor-type"
|
||||||
|
|
||||||
productFlavors {
|
productFlavors {
|
||||||
dev {
|
|
||||||
dimension "flavor-type"
|
|
||||||
applicationId "com.starlock.work.dev"
|
|
||||||
signingConfig signingConfigs.pre
|
|
||||||
resValue "string", "app_name", "星锁-dev"
|
|
||||||
}
|
|
||||||
pre {
|
|
||||||
dimension "flavor-type"
|
|
||||||
applicationId "com.starlock.work.pre"
|
|
||||||
signingConfig signingConfigs.pre
|
|
||||||
resValue "string", "app_name", "星锁"
|
|
||||||
}
|
|
||||||
sky {
|
sky {
|
||||||
dimension "flavor-type"
|
dimension "flavor-type"
|
||||||
applicationId "com.skychip.work"
|
applicationId "top.skychip.work"
|
||||||
signingConfig signingConfigs.sky
|
signingConfig signingConfigs.sky
|
||||||
resValue "string", "app_name", "星勤-sky"
|
resValue "string", "app_name", "星勤-sky"
|
||||||
}
|
}
|
||||||
|
|
||||||
xhj {
|
xhj {
|
||||||
dimension "flavor-type"
|
dimension "flavor-type"
|
||||||
applicationId "com.xhjcn.work"
|
applicationId "ltd.xhjcn.work"
|
||||||
signingConfig signingConfigs.xhj
|
signingConfig signingConfigs.xhj
|
||||||
resValue "string", "app_name", "星勤-xhj"
|
resValue "string", "app_name", "星勤-xhj"
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
android/app/sky-release-key.jks
Normal file
|
Before Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 9.2 KiB |
|
Before Width: | Height: | Size: 13 KiB |
@ -1,29 +1,71 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
<application android:label="@string/app_name" android:name="${applicationName}" android:icon="@mipmap/ic_launcher">
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
<activity android:name=".MainActivity" android:exported="true" android:launchMode="singleTop" android:theme="@style/LaunchTheme" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:hardwareAccelerated="true" android:windowSoftInputMode="adjustResize">
|
|
||||||
<!-- Specifies an Android theme to apply to this Activity as soon as
|
|
||||||
the Android process has started. This theme is visible to the user
|
|
||||||
while the Flutter UI initializes. After that, this theme continues
|
|
||||||
to determine the Window background behind the Flutter UI. -->
|
|
||||||
<meta-data android:name="io.flutter.embedding.android.NormalTheme" android:resource="@style/NormalTheme"/>
|
|
||||||
<intent-filter>
|
|
||||||
<action android:name="android.intent.action.MAIN"/>
|
|
||||||
<category android:name="android.intent.category.LAUNCHER"/>
|
|
||||||
</intent-filter>
|
|
||||||
</activity>
|
|
||||||
<!-- Don't delete the meta-data below.
|
|
||||||
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
|
|
||||||
<meta-data android:name="flutterEmbedding" android:value="2"/>
|
|
||||||
</application>
|
|
||||||
<!-- Required to query activities that can process text, see:
|
|
||||||
https://developer.android.com/training/package-visibility?hl=en and
|
|
||||||
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
|
|
||||||
|
|
||||||
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
|
|
||||||
<queries>
|
|
||||||
<intent>
|
<!--允许访问网络,必选权限-->
|
||||||
<action android:name="android.intent.action.PROCESS_TEXT"/>
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
<data android:mimeType="text/plain"/>
|
<!-- 写权限 -->
|
||||||
</intent>
|
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||||
</queries>
|
<!-- 读权限 -->
|
||||||
|
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||||
|
<!-- 系统通知 -->
|
||||||
|
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
||||||
|
|
||||||
|
<!-- 蓝牙相关权限 -->
|
||||||
|
<!-- Android 12以下需要的蓝牙权限 -->
|
||||||
|
<uses-permission android:name="android.permission.BLUETOOTH" />
|
||||||
|
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
|
||||||
|
|
||||||
|
<!-- Android 12及以上需要的蓝牙权限 -->
|
||||||
|
<uses-permission android:name="android.permission.BLUETOOTH_SCAN"
|
||||||
|
android:usesPermissionFlags="neverForLocation" />
|
||||||
|
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
|
||||||
|
<uses-permission android:name="android.permission.BLUETOOTH_ADVERTISE" />
|
||||||
|
|
||||||
|
<!-- 位置权限(Android 12以下蓝牙扫描需要) -->
|
||||||
|
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||||
|
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
||||||
|
|
||||||
|
<application
|
||||||
|
android:name="${applicationName}"
|
||||||
|
android:icon="@mipmap/ic_launcher"
|
||||||
|
android:label="@string/app_name">
|
||||||
|
<activity
|
||||||
|
android:name=".MainActivity"
|
||||||
|
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
||||||
|
android:exported="true"
|
||||||
|
android:hardwareAccelerated="true"
|
||||||
|
android:launchMode="singleTop"
|
||||||
|
android:theme="@style/LaunchTheme"
|
||||||
|
android:windowSoftInputMode="adjustResize">
|
||||||
|
<!-- Specifies an Android theme to apply to this Activity as soon as
|
||||||
|
the Android process has started. This theme is visible to the user
|
||||||
|
while the Flutter UI initializes. After that, this theme continues
|
||||||
|
to determine the Window background behind the Flutter UI. -->
|
||||||
|
<meta-data
|
||||||
|
android:name="io.flutter.embedding.android.NormalTheme"
|
||||||
|
android:resource="@style/NormalTheme" />
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
|
</intent-filter>
|
||||||
|
</activity>
|
||||||
|
<!-- Don't delete the meta-data below.
|
||||||
|
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
|
||||||
|
<meta-data
|
||||||
|
android:name="flutterEmbedding"
|
||||||
|
android:value="2" />
|
||||||
|
</application>
|
||||||
|
<!-- Required to query activities that can process text, see:
|
||||||
|
https://developer.android.com/training/package-visibility?hl=en and
|
||||||
|
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
|
||||||
|
|
||||||
|
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
|
||||||
|
<queries>
|
||||||
|
<intent>
|
||||||
|
<action android:name="android.intent.action.PROCESS_TEXT" />
|
||||||
|
<data android:mimeType="text/plain" />
|
||||||
|
</intent>
|
||||||
|
</queries>
|
||||||
</manifest>
|
</manifest>
|
||||||
|
Before Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 9.4 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 9.3 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 55 KiB |
BIN
android/app/xhj-release-key.jks
Normal file
@ -1,4 +1,4 @@
|
|||||||
org.gradle.jvmargs=-Xmx1536M
|
org.gradle.jvmargs=-Xmx1536M
|
||||||
android.useAndroidX=true
|
android.useAndroidX=true
|
||||||
android.enableJetifier=true
|
android.enableJetifier=true
|
||||||
android.enableR8 = true
|
android.enableR8 = true
|
||||||
|
|||||||
@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
|
|||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https://mirrors.cloud.tencent.com/gradle/gradle-7.4-all.zip
|
distributionUrl=https://mirrors.cloud.tencent.com/gradle/gradle-8.5-all.zip
|
||||||
|
|||||||
10
android/key.properties
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# sky ????
|
||||||
|
sky.storePassword=RHFn9LJcWHFxKmt
|
||||||
|
sky.keyPassword=RHFn9LJcWHFxKmt
|
||||||
|
sky.keyAlias=sky
|
||||||
|
sky.storeFile=sky-release-key.jks
|
||||||
|
# xhj ????
|
||||||
|
xhj.storePassword=qoQGNcPCD0wtrV8
|
||||||
|
xhj.keyPassword=qoQGNcPCD0wtrV8
|
||||||
|
xhj.keyAlias=xhj
|
||||||
|
xhj.storeFile=xhj-release-key.jks
|
||||||
BIN
assets/icon/access_authorization.png
Normal file
|
After Width: | Height: | Size: 886 B |
BIN
assets/icon/access_management.png
Normal file
|
After Width: | Height: | Size: 738 B |
BIN
assets/icon/announcement.png
Normal file
|
After Width: | Height: | Size: 563 B |
BIN
assets/icon/approval_record.png
Normal file
|
After Width: | Height: | Size: 764 B |
BIN
assets/icon/attendance_setting.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
assets/icon/attendance_statistics.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
assets/icon/bar/home.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
assets/icon/bar/home_selected.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
assets/icon/bar/mine.png
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
assets/icon/bar/mine_selected.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
assets/icon/bar/notification.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
assets/icon/bar/notification_selected.png
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
assets/icon/broadcast.png
Normal file
|
After Width: | Height: | Size: 619 B |
BIN
assets/icon/business_trip.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
assets/icon/call_relationship.png
Normal file
|
After Width: | Height: | Size: 833 B |
BIN
assets/icon/call_reminder.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
assets/icon/device_management.png
Normal file
|
After Width: | Height: | Size: 502 B |
BIN
assets/icon/go_out.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
assets/icon/icon_menu.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
assets/icon/icon_one_key_door.png
Normal file
|
After Width: | Height: | Size: 199 B |
BIN
assets/icon/icon_one_key_door_key.png
Normal file
|
After Width: | Height: | Size: 431 B |
BIN
assets/icon/icon_table_menu.png
Normal file
|
After Width: | Height: | Size: 662 B |
BIN
assets/icon/icon_vip.png
Normal file
|
After Width: | Height: | Size: 918 B |
BIN
assets/icon/info_publish.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
assets/icon/initiate_approval.png
Normal file
|
After Width: | Height: | Size: 857 B |
BIN
assets/icon/intelligent_analysis.png
Normal file
|
After Width: | Height: | Size: 949 B |
BIN
assets/icon/intelligent_inspection.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
assets/icon/intercom_device.png
Normal file
|
After Width: | Height: | Size: 894 B |
BIN
assets/icon/leave_request.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
assets/icon/make_up_card.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
assets/icon/mobile_checkin.png
Normal file
|
After Width: | Height: | Size: 986 B |
BIN
assets/icon/my_attendance.png
Normal file
|
After Width: | Height: | Size: 480 B |
BIN
assets/icon/my_visitor.png
Normal file
|
After Width: | Height: | Size: 887 B |
BIN
assets/icon/one_click_open_door.png
Normal file
|
After Width: | Height: | Size: 712 B |
BIN
assets/icon/password_open_door.png
Normal file
|
After Width: | Height: | Size: 728 B |
BIN
assets/icon/person_capture.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
assets/icon/personnel_management.png
Normal file
|
After Width: | Height: | Size: 840 B |
BIN
assets/icon/team_qrcode.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
assets/icon/traffic_record.png
Normal file
|
After Width: | Height: | Size: 887 B |
BIN
assets/icon/vehicle_management.png
Normal file
|
After Width: | Height: | Size: 972 B |
BIN
assets/icon/video_center.png
Normal file
|
After Width: | Height: | Size: 707 B |
BIN
assets/icon/video_search.png
Normal file
|
After Width: | Height: | Size: 616 B |
BIN
assets/icon/visitor_invitation.png
Normal file
|
After Width: | Height: | Size: 903 B |
BIN
assets/icon/visitor_management.png
Normal file
|
After Width: | Height: | Size: 949 B |
BIN
assets/images/bg_one_key_door.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
assets/images/default_avatar.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
assets/images/mockImage.jpg
Normal file
|
After Width: | Height: | Size: 14 KiB |
@ -1,92 +1,25 @@
|
|||||||
# 用于编译出不同的APPID
|
|
||||||
|
|
||||||
# 生成:意思是将本文件定义的配置,生成对应的代码,或者原生的配置、构建过程、文件资源等
|
|
||||||
# 风味用法:dart run flutter_flavorizr -p <processor_1>,<processor_2>
|
|
||||||
|
|
||||||
# 以下行为都是覆盖,所以如果不是很清楚自己在做什么,请不要随意运行,以免覆盖有用的文件
|
|
||||||
# 安卓图标:dart run flutter_flavorizr -p android:icons
|
|
||||||
# 安卓构建参数集配置:dart run flutter_flavorizr -p android:androidManifest
|
|
||||||
# 安卓构建目标配置:dart run flutter_flavorizr -p android:buildGradle
|
|
||||||
# 用法-生成iOS图标:dart run flutter_flavorizr -p ios:icons
|
|
||||||
|
|
||||||
# Scheme 定义了构建目标、测试、运行、调试和分析应用程序的方式。它是Xcode中一个关键的组件,用于配置不同的构建设置和运行环境。
|
|
||||||
# 可以有针对不同目的的多个Schemes,例如一个用于调试的Scheme、一个用于发布的Scheme,以及用于不同测试环境的Scheme。
|
|
||||||
# 用法 :dart run flutter_flavorizr -p ios:schema
|
|
||||||
|
|
||||||
# XCConfig文件是Xcode配置文件,用于外部化和管理项目的构建设置。通过使用这些文件,可以更容易地管理和共享构建配置。
|
|
||||||
# 可以为不同的构建环境(如Debug和Release)或不同的应用flavor配置多个XCConfig文件。
|
|
||||||
# 用法:dart run flutter_flavorizr -p ios:xcconfig
|
|
||||||
|
|
||||||
# Build Target定义了一个构建过程,它描述了如何编译和链接构建应用程序的源代码。每个Target可以有不同的配置和目的(例如,一个应用程序Target、一个单元测试Target)。
|
|
||||||
# 可能包括应用程序本身的Target、测试Target、用于不同flavor的Target,或者针对不同平台(如iOS和macOS)的Target。
|
|
||||||
# 用法:dart run flutter_flavorizr -p ios:buildTargets
|
|
||||||
|
|
||||||
# Plist文件用于存储应用程序的配置信息,如应用版本号、显示名称等。它是一个XML文件,Xcode在构建应用程序时会读取它
|
|
||||||
# 每个Target通常有自己的Info.plist文件,还可能有其他Plist文件来管理不同的配置和设置。
|
|
||||||
# 用法:dart run flutter_flavorizr -p ios:plist
|
|
||||||
|
|
||||||
# LaunchScreen(启动屏幕)是应用启动时显示的界面,通常包含应用的Logo和名称。它在应用加载期间显示,提供更好的用户体验。
|
|
||||||
# 可以针对不同的设备和屏幕尺寸配置多个LaunchScreen,或者为不同的版本或flavor提供不同的启动屏幕。
|
|
||||||
# 用法:dart run flutter_flavorizr -p ios:launchScreen
|
|
||||||
|
|
||||||
|
|
||||||
# 项目运行说明:添加不同风味后,不能再使用flutter默认的运行方式`flutter run`,而是需要指定运行的风味
|
|
||||||
# flutter run --flavor <flavor> -t lib/main_<flavor>.dart
|
|
||||||
# 注意,这里有 入口文件(main_<flavor>.dart) 和 口味(<flavor>) 两个参数
|
|
||||||
# 其中入口文件在代码中指定运行时的差异,例如 页面上的名称、颜色、API请求的域名等
|
|
||||||
# 而 口味 指定 构建差异,例如 APPID、Logo、应用名称等
|
|
||||||
# 下面是4个运行示例:
|
|
||||||
# flutter run --flavor dev -t lib/main_dev.dart
|
|
||||||
# flutter run --flavor pre -t lib/main_pre.dart
|
|
||||||
# flutter run --flavor sky -t lib/main_sky_full.dart
|
|
||||||
# flutter run --flavor xhj -t lib/main_xhj_full.dart
|
|
||||||
|
|
||||||
# 下面是安卓发布编译命令
|
|
||||||
# flutter build apk --split-per-abi --release --flavor sky -t lib/main_sky_full.dart
|
|
||||||
# flutter build apk --release --flavor sky -t lib/main_sky_full.dart
|
|
||||||
|
|
||||||
app:
|
app:
|
||||||
android:
|
android:
|
||||||
flavorDimensions: "flavor-type"
|
flavorDimensions: "flavor-type"
|
||||||
flavors:
|
flavors:
|
||||||
dev:
|
|
||||||
app:
|
|
||||||
name: "星勤-dev"
|
|
||||||
icon: "assets/logo/dev.png"
|
|
||||||
android:
|
|
||||||
applicationId: "com.starlock.work.dev"
|
|
||||||
customConfig:
|
|
||||||
signingConfig: signingConfigs.pre
|
|
||||||
ios:
|
|
||||||
bundleId: "com.starlock.work.dev"
|
|
||||||
pre:
|
|
||||||
app:
|
|
||||||
name: "星勤-pre"
|
|
||||||
icon: "assets/logo/pre.png"
|
|
||||||
android:
|
|
||||||
applicationId: "com.starlock.work.pre"
|
|
||||||
customConfig:
|
|
||||||
signingConfig: signingConfigs.pre
|
|
||||||
ios:
|
|
||||||
bundleId: "com.starlock.work.pre"
|
|
||||||
sky:
|
sky:
|
||||||
app:
|
app:
|
||||||
name: "星勤-sky"
|
name: "星勤-sky"
|
||||||
icon: "assets/logo/sky.png"
|
icon: "assets/logo/sky.png"
|
||||||
android:
|
android:
|
||||||
applicationId: "com.skychip.work"
|
applicationId: "top.skychip.work"
|
||||||
customConfig:
|
customConfig:
|
||||||
signingConfig: signingConfigs.sky
|
signingConfig: signingConfigs.sky
|
||||||
ios:
|
ios:
|
||||||
bundleId: "com.skychip.work"
|
bundleId: "top.skychip.work"
|
||||||
xhj:
|
xhj:
|
||||||
app:
|
app:
|
||||||
name: "星勤-xhj"
|
name: "星勤-xhj"
|
||||||
icon: "assets/logo/xhj.png"
|
icon: "assets/logo/xhj.png"
|
||||||
android:
|
android:
|
||||||
applicationId: "com.xhjcn.work"
|
applicationId: "ltd.xhjcn.work"
|
||||||
customConfig:
|
customConfig:
|
||||||
signingConfig: signingConfigs.xhj
|
signingConfig: signingConfigs.xhj
|
||||||
ios:
|
ios:
|
||||||
bundleId: "com.xhjcn.work"
|
bundleId: "ltd.xhjcn.work"
|
||||||
ide: idea
|
ide: idea
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
|
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug-sky.xcconfig"
|
||||||
#include "Generated.xcconfig"
|
#include "Generated.xcconfig"
|
||||||
|
|
||||||
ASSET_PREFIX=sky
|
ASSET_PREFIX=sky
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
|
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.profile-sky.xcconfig"
|
||||||
#include "Generated.xcconfig"
|
#include "Generated.xcconfig"
|
||||||
|
|
||||||
ASSET_PREFIX=sky
|
ASSET_PREFIX=sky
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
|
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release-sky.xcconfig"
|
||||||
#include "Generated.xcconfig"
|
#include "Generated.xcconfig"
|
||||||
|
|
||||||
ASSET_PREFIX=sky
|
ASSET_PREFIX=sky
|
||||||
BUNDLE_NAME=星勤-sky
|
BUNDLE_NAME=星勤-sky
|
||||||
BUNDLE_DISPLAY_NAME=星勤-sky
|
BUNDLE_DISPLAY_NAME=星勤-sky
|
||||||
@ -1,4 +1,4 @@
|
|||||||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
|
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug-xhj.xcconfig"
|
||||||
#include "Generated.xcconfig"
|
#include "Generated.xcconfig"
|
||||||
|
|
||||||
ASSET_PREFIX=xhj
|
ASSET_PREFIX=xhj
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
|
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.profile-xhj.xcconfig"
|
||||||
#include "Generated.xcconfig"
|
#include "Generated.xcconfig"
|
||||||
|
|
||||||
ASSET_PREFIX=xhj
|
ASSET_PREFIX=xhj
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
|
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release-xhj.xcconfig"
|
||||||
#include "Generated.xcconfig"
|
#include "Generated.xcconfig"
|
||||||
|
|
||||||
ASSET_PREFIX=xhj
|
ASSET_PREFIX=xhj
|
||||||
BUNDLE_NAME=星勤-xhj
|
BUNDLE_NAME=星勤-xhj
|
||||||
BUNDLE_DISPLAY_NAME=星勤-xhj
|
BUNDLE_DISPLAY_NAME=星勤-xhj
|
||||||
34
ios/Podfile
@ -5,9 +5,12 @@
|
|||||||
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
|
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
|
||||||
|
|
||||||
project 'Runner', {
|
project 'Runner', {
|
||||||
'Debug' => :debug,
|
'Debug-sky' => :debug,
|
||||||
'Profile' => :release,
|
'Profile-sky' => :release,
|
||||||
'Release' => :release,
|
'Release-sky' => :release,
|
||||||
|
'Debug-xhj' => :debug,
|
||||||
|
'Profile-xhj' => :release,
|
||||||
|
'Release-xhj' => :release,
|
||||||
}
|
}
|
||||||
|
|
||||||
def flutter_root
|
def flutter_root
|
||||||
@ -40,5 +43,30 @@ end
|
|||||||
post_install do |installer|
|
post_install do |installer|
|
||||||
installer.pods_project.targets.each do |target|
|
installer.pods_project.targets.each do |target|
|
||||||
flutter_additional_ios_build_settings(target)
|
flutter_additional_ios_build_settings(target)
|
||||||
|
target.build_configurations.each do |config|
|
||||||
|
# You can remove unused permissions here
|
||||||
|
# for more information: https://github.com/Baseflow/flutter-permission-handler/blob/main/permission_handler_apple/ios/Classes/PermissionHandlerEnums.h
|
||||||
|
# e.g. when you don't need camera permission, just add 'PERMISSION_CAMERA=0'
|
||||||
|
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
|
||||||
|
'$(inherited)',
|
||||||
|
|
||||||
|
## dart: PermissionGroup.camera
|
||||||
|
'PERMISSION_CAMERA=1',
|
||||||
|
|
||||||
|
## dart: PermissionGroup.photos
|
||||||
|
'PERMISSION_PHOTOS=1',
|
||||||
|
|
||||||
|
## dart: PermissionGroup.bluetooth
|
||||||
|
'PERMISSION_BLUETOOTH=1',
|
||||||
|
|
||||||
|
## dart: PermissionGroup.MICROPHONE
|
||||||
|
'PERMISSION_MICROPHONE=1',
|
||||||
|
|
||||||
|
## dart: PermissionGroup.location
|
||||||
|
'PERMISSION_LOCATION=1',
|
||||||
|
'PERMISSION_LOCATION_WHENINUSE=0',
|
||||||
|
]
|
||||||
|
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -1,29 +1,42 @@
|
|||||||
PODS:
|
PODS:
|
||||||
- Flutter (1.0.0)
|
- Flutter (1.0.0)
|
||||||
|
- flutter_blue_plus_darwin (0.0.2):
|
||||||
|
- Flutter
|
||||||
|
- FlutterMacOS
|
||||||
- permission_handler_apple (9.3.0):
|
- permission_handler_apple (9.3.0):
|
||||||
- Flutter
|
- Flutter
|
||||||
- shared_preferences_foundation (0.0.1):
|
- shared_preferences_foundation (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
|
- starcloud (0.0.1):
|
||||||
|
- Flutter
|
||||||
|
|
||||||
DEPENDENCIES:
|
DEPENDENCIES:
|
||||||
- Flutter (from `Flutter`)
|
- Flutter (from `Flutter`)
|
||||||
|
- flutter_blue_plus_darwin (from `.symlinks/plugins/flutter_blue_plus_darwin/darwin`)
|
||||||
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
|
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
|
||||||
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
|
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
|
||||||
|
- starcloud (from `.symlinks/plugins/starcloud/ios`)
|
||||||
|
|
||||||
EXTERNAL SOURCES:
|
EXTERNAL SOURCES:
|
||||||
Flutter:
|
Flutter:
|
||||||
:path: Flutter
|
:path: Flutter
|
||||||
|
flutter_blue_plus_darwin:
|
||||||
|
:path: ".symlinks/plugins/flutter_blue_plus_darwin/darwin"
|
||||||
permission_handler_apple:
|
permission_handler_apple:
|
||||||
:path: ".symlinks/plugins/permission_handler_apple/ios"
|
:path: ".symlinks/plugins/permission_handler_apple/ios"
|
||||||
shared_preferences_foundation:
|
shared_preferences_foundation:
|
||||||
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"
|
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"
|
||||||
|
starcloud:
|
||||||
|
:path: ".symlinks/plugins/starcloud/ios"
|
||||||
|
|
||||||
SPEC CHECKSUMS:
|
SPEC CHECKSUMS:
|
||||||
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
|
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
|
||||||
|
flutter_blue_plus_darwin: 20a08bfeaa0f7804d524858d3d8744bcc1b6dbc3
|
||||||
permission_handler_apple: 4ed2196e43d0651e8ff7ca3483a069d469701f2d
|
permission_handler_apple: 4ed2196e43d0651e8ff7ca3483a069d469701f2d
|
||||||
shared_preferences_foundation: 9e1978ff2562383bd5676f64ec4e9aa8fa06a6f7
|
shared_preferences_foundation: 9e1978ff2562383bd5676f64ec4e9aa8fa06a6f7
|
||||||
|
starcloud: 0d2034397e2a0d81b8c187b99bd2de7371ea5b2d
|
||||||
|
|
||||||
PODFILE CHECKSUM: 819463e6a0290f5a72f145ba7cde16e8b6ef0796
|
PODFILE CHECKSUM: 41883e5e56033ab6e4e0f607734d753c5bb7c460
|
||||||
|
|
||||||
COCOAPODS: 1.16.2
|
COCOAPODS: 1.16.2
|
||||||
|
|||||||
@ -0,0 +1,122 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"size" : "20x20",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"filename" : "Icon-App-20x20@2x.png",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "20x20",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"filename" : "Icon-App-20x20@3x.png",
|
||||||
|
"scale" : "3x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "29x29",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"filename" : "Icon-App-29x29@1x.png",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "29x29",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"filename" : "Icon-App-29x29@2x.png",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "29x29",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"filename" : "Icon-App-29x29@3x.png",
|
||||||
|
"scale" : "3x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "40x40",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"filename" : "Icon-App-40x40@2x.png",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "40x40",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"filename" : "Icon-App-40x40@3x.png",
|
||||||
|
"scale" : "3x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "60x60",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"filename" : "Icon-App-60x60@2x.png",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "60x60",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"filename" : "Icon-App-60x60@3x.png",
|
||||||
|
"scale" : "3x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "20x20",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"filename" : "Icon-App-20x20@1x.png",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "20x20",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"filename" : "Icon-App-20x20@2x.png",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "29x29",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"filename" : "Icon-App-29x29@1x.png",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "29x29",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"filename" : "Icon-App-29x29@2x.png",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "40x40",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"filename" : "Icon-App-40x40@1x.png",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "40x40",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"filename" : "Icon-App-40x40@2x.png",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "76x76",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"filename" : "Icon-App-76x76@1x.png",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "76x76",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"filename" : "Icon-App-76x76@2x.png",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "83.5x83.5",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"filename" : "Icon-App-83.5x83.5@2x.png",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "1024x1024",
|
||||||
|
"idiom" : "ios-marketing",
|
||||||
|
"filename" : "Icon-App-1024x1024@1x.png",
|
||||||
|
"scale" : "1x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"version" : 1,
|
||||||
|
"author" : "xcode"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 909 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 6.9 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 6.5 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 42 KiB |
23
ios/Runner/Assets.xcassets/skyDevLaunchImage.imageset/Contents.json
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"filename" : "LaunchImage.png",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"filename" : "LaunchImage@2x.png",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"filename" : "LaunchImage@3x.png",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"version" : 1,
|
||||||
|
"author" : "xcode"
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
ios/Runner/Assets.xcassets/skyDevLaunchImage.imageset/LaunchImage.png
vendored
Normal file
|
After Width: | Height: | Size: 68 B |