口味:xie改为local
@ -36,8 +36,8 @@ android {
|
||||
keyAlias = 'starlock'
|
||||
keyPassword '123456'
|
||||
}
|
||||
// 下面的xie、pre、sky、xhj 都是自定义变量,自身不起任何作用,而是看哪里引用了它们
|
||||
xie {
|
||||
// 下面的local、pre、sky、xhj 都是自定义变量,自身不起任何作用,而是看哪里引用了它们
|
||||
local {
|
||||
storeFile file("starlock.keystore")
|
||||
storePassword '123456'
|
||||
keyAlias = 'starlock'
|
||||
@ -68,12 +68,12 @@ android {
|
||||
flavorDimensions "flavor-type"
|
||||
|
||||
productFlavors {
|
||||
xie {
|
||||
local {
|
||||
dimension "flavor-type"
|
||||
applicationId "com.starlock.lock.xie"
|
||||
applicationId "com.starlock.lock.local"
|
||||
signingConfig signingConfigs.pre
|
||||
resValue "string", "app_name", "星锁-xie"
|
||||
manifestPlaceholders.JPUSH_PKGNAME = "com.starlock.lock.xie"
|
||||
resValue "string", "app_name", "星锁-local"
|
||||
manifestPlaceholders.JPUSH_PKGNAME = "com.starlock.lock.local"
|
||||
}
|
||||
dev {
|
||||
dimension "flavor-type"
|
||||
@ -182,7 +182,7 @@ android {
|
||||
// 真实的解决办法
|
||||
minifyEnabled false
|
||||
shrinkResources false
|
||||
productFlavors.xie.signingConfig signingConfigs.pre
|
||||
productFlavors.local.signingConfig signingConfigs.pre
|
||||
productFlavors.dev.signingConfig signingConfigs.pre
|
||||
productFlavors.pre.signingConfig signingConfigs.pre
|
||||
productFlavors.sky.signingConfig signingConfigs.sky
|
||||
|
||||
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 9.2 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
@ -53,16 +53,16 @@ app:
|
||||
flavorDimensions: "flavor-type"
|
||||
|
||||
flavors:
|
||||
xie:
|
||||
local:
|
||||
app:
|
||||
name: "星锁-xie"
|
||||
name: "星锁-local"
|
||||
icon: "assets/icon/dev.png"
|
||||
android:
|
||||
applicationId: "com.starlock.lock.xie"
|
||||
applicationId: "com.starlock.lock.local"
|
||||
customConfig:
|
||||
signingConfig: signingConfigs.pre
|
||||
ios:
|
||||
bundleId: "com.starlock.lock.xie"
|
||||
bundleId: "com.starlock.lock.local"
|
||||
dev:
|
||||
app:
|
||||
name: "星锁-dev"
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import 'package:get/get.dart';
|
||||
|
||||
enum Flavor {
|
||||
xie,
|
||||
local,
|
||||
dev,
|
||||
pre,
|
||||
sky,
|
||||
@ -25,8 +25,8 @@ class F {
|
||||
|
||||
static String get title {
|
||||
switch (appFlavor) {
|
||||
case Flavor.xie:
|
||||
return '星锁-xie';
|
||||
case Flavor.local:
|
||||
return '星锁-local';
|
||||
case Flavor.dev:
|
||||
return '星锁-dev';
|
||||
case Flavor.pre:
|
||||
@ -42,8 +42,8 @@ class F {
|
||||
|
||||
static String get navTitle {
|
||||
switch (appFlavor) {
|
||||
case Flavor.xie:
|
||||
return '${"starLock".tr}-xie';
|
||||
case Flavor.local:
|
||||
return '${"starLock".tr}-local';
|
||||
case Flavor.dev:
|
||||
return '${"starLock".tr}-dev';
|
||||
case Flavor.pre:
|
||||
@ -59,10 +59,8 @@ class F {
|
||||
|
||||
static String get apiPrefix {
|
||||
switch (appFlavor) {
|
||||
// case Flavor.ge:
|
||||
// return 'https://ge.lock.star-lock.cn';
|
||||
case Flavor.xie:
|
||||
return 'http://192.168.1.15:8022';
|
||||
case Flavor.local:
|
||||
return 'https://ge.lock.star-lock.cn';
|
||||
case Flavor.dev:
|
||||
return 'https://dev.lock.star-lock.cn';
|
||||
case Flavor.pre:
|
||||
@ -80,7 +78,7 @@ class F {
|
||||
// StarLockAMapKey
|
||||
static StarLockAMapKey get aMapKey {
|
||||
switch (appFlavor) {
|
||||
case Flavor.xie:
|
||||
case Flavor.local:
|
||||
case Flavor.dev:
|
||||
return const StarLockAMapKey(
|
||||
androidKey: 'b56b681ee89f4db43a5aa1879ae8cbfe',
|
||||
|
||||
@ -3,6 +3,6 @@ import 'flavors.dart';
|
||||
import 'main.dart' as runner;
|
||||
|
||||
Future<void> main() async {
|
||||
F.appFlavor = Flavor.xie;
|
||||
F.appFlavor = Flavor.local;
|
||||
await runner.main();
|
||||
}
|
||||