Merge branch 'develop' into release

This commit is contained in:
Liuyf 2025-01-24 13:45:31 +08:00
commit 12e886c4b7
10 changed files with 203 additions and 36 deletions

View File

@ -172,7 +172,7 @@ create-release:
url: '${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/StarLock/${CI_COMMIT_TAG}/starlock-xhj-release-${CI_COMMIT_TAG}.apk'
link_type: 'package'
- name: 'xhj bundle binary package'
url: '${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/StarLock/${CI_COMMIT_TAG}/starlock-xhj-release-${CI_COMMIT_TAG}.aab'
url: '${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/StarLock/${CI_COMMIT_TAG}/starlock-xhj_bundle-release-${CI_COMMIT_TAG}.aab'
link_type: 'package'
- name: 'sky apk binary package'
url: '${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/StarLock/${CI_COMMIT_TAG}/starlock-sky-release-${CI_COMMIT_TAG}.apk'

View File

@ -146,9 +146,14 @@ android {
xhj_bundle {
dimension "flavor-type"
applicationId "ltd.xhjcn.lock"
signingConfig signingConfigs.xhj_bundle
resValue "string", "app_name", "Star Lock"
manifestPlaceholders.JPUSH_PKGNAME = "ltd.xhjcn.lock"
manifestPlaceholders = [
JPUSH_PKGNAME : "ltd.xhjcn.lock",
JPUSH_APPKEY : "5ccdb9b8d3faaae66ba5d02e",
JPUSH_CHANNEL : "flutter_channel",
]
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules-xhj.pro'
}

View File

@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
platform :ios, '12.0'
platform :ios, '13.0'
#use_modular_headers!
use_frameworks! :linkage => :static
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.

View File

@ -77,6 +77,49 @@ PODS:
- file_picker (0.0.1):
- DKImagePickerController/PhotoGallery
- Flutter
- Firebase/Analytics (11.0.0):
- Firebase/Core
- Firebase/Core (11.0.0):
- Firebase/CoreOnly
- FirebaseAnalytics (~> 11.0.0)
- Firebase/CoreOnly (11.0.0):
- FirebaseCore (= 11.0.0)
- firebase_analytics (11.3.0):
- Firebase/Analytics (= 11.0.0)
- firebase_core
- Flutter
- firebase_core (3.4.0):
- Firebase/CoreOnly (= 11.0.0)
- Flutter
- FirebaseAnalytics (11.0.0):
- FirebaseAnalytics/AdIdSupport (= 11.0.0)
- FirebaseCore (~> 11.0)
- FirebaseInstallations (~> 11.0)
- GoogleUtilities/AppDelegateSwizzler (~> 8.0)
- GoogleUtilities/MethodSwizzler (~> 8.0)
- GoogleUtilities/Network (~> 8.0)
- "GoogleUtilities/NSData+zlib (~> 8.0)"
- nanopb (~> 3.30910.0)
- FirebaseAnalytics/AdIdSupport (11.0.0):
- FirebaseCore (~> 11.0)
- FirebaseInstallations (~> 11.0)
- GoogleAppMeasurement (= 11.0.0)
- GoogleUtilities/AppDelegateSwizzler (~> 8.0)
- GoogleUtilities/MethodSwizzler (~> 8.0)
- GoogleUtilities/Network (~> 8.0)
- "GoogleUtilities/NSData+zlib (~> 8.0)"
- nanopb (~> 3.30910.0)
- FirebaseCore (11.0.0):
- FirebaseCoreInternal (~> 11.0)
- GoogleUtilities/Environment (~> 8.0)
- GoogleUtilities/Logger (~> 8.0)
- FirebaseCoreInternal (11.7.0):
- "GoogleUtilities/NSData+zlib (~> 8.0)"
- FirebaseInstallations (11.4.0):
- FirebaseCore (~> 11.0)
- GoogleUtilities/Environment (~> 8.0)
- GoogleUtilities/UserDefaults (~> 8.0)
- PromisesObjC (~> 2.4)
- Flutter (1.0.0)
- flutter_blue_plus (0.0.1):
- Flutter
@ -104,11 +147,58 @@ PODS:
- google_maps_flutter_ios (0.0.1):
- Flutter
- GoogleMaps (< 9.0)
- GoogleAppMeasurement (11.0.0):
- GoogleAppMeasurement/AdIdSupport (= 11.0.0)
- GoogleUtilities/AppDelegateSwizzler (~> 8.0)
- GoogleUtilities/MethodSwizzler (~> 8.0)
- GoogleUtilities/Network (~> 8.0)
- "GoogleUtilities/NSData+zlib (~> 8.0)"
- nanopb (~> 3.30910.0)
- GoogleAppMeasurement/AdIdSupport (11.0.0):
- GoogleAppMeasurement/WithoutAdIdSupport (= 11.0.0)
- GoogleUtilities/AppDelegateSwizzler (~> 8.0)
- GoogleUtilities/MethodSwizzler (~> 8.0)
- GoogleUtilities/Network (~> 8.0)
- "GoogleUtilities/NSData+zlib (~> 8.0)"
- nanopb (~> 3.30910.0)
- GoogleAppMeasurement/WithoutAdIdSupport (11.0.0):
- GoogleUtilities/AppDelegateSwizzler (~> 8.0)
- GoogleUtilities/MethodSwizzler (~> 8.0)
- GoogleUtilities/Network (~> 8.0)
- "GoogleUtilities/NSData+zlib (~> 8.0)"
- nanopb (~> 3.30910.0)
- GoogleMaps (6.2.1):
- GoogleMaps/Maps (= 6.2.1)
- GoogleMaps/Base (6.2.1)
- GoogleMaps/Maps (6.2.1):
- GoogleMaps/Base
- GoogleUtilities/AppDelegateSwizzler (8.0.2):
- GoogleUtilities/Environment
- GoogleUtilities/Logger
- GoogleUtilities/Network
- GoogleUtilities/Privacy
- GoogleUtilities/Environment (8.0.2):
- GoogleUtilities/Privacy
- GoogleUtilities/Logger (8.0.2):
- GoogleUtilities/Environment
- GoogleUtilities/Privacy
- GoogleUtilities/MethodSwizzler (8.0.2):
- GoogleUtilities/Logger
- GoogleUtilities/Privacy
- GoogleUtilities/Network (8.0.2):
- GoogleUtilities/Logger
- "GoogleUtilities/NSData+zlib"
- GoogleUtilities/Privacy
- GoogleUtilities/Reachability
- "GoogleUtilities/NSData+zlib (8.0.2)":
- GoogleUtilities/Privacy
- GoogleUtilities/Privacy (8.0.2)
- GoogleUtilities/Reachability (8.0.2):
- GoogleUtilities/Logger
- GoogleUtilities/Privacy
- GoogleUtilities/UserDefaults (8.0.2):
- GoogleUtilities/Logger
- GoogleUtilities/Privacy
- image_gallery_saver (2.0.2):
- Flutter
- image_picker_ios (0.0.1):
@ -123,6 +213,11 @@ PODS:
- JPush (= 5.3.0)
- just_audio (0.0.1):
- Flutter
- nanopb (3.30910.0):
- nanopb/decode (= 3.30910.0)
- nanopb/encode (= 3.30910.0)
- nanopb/decode (3.30910.0)
- nanopb/encode (3.30910.0)
- network_info_plus (0.0.1):
- Flutter
- open_filex (0.0.2):
@ -134,6 +229,7 @@ PODS:
- FlutterMacOS
- permission_handler_apple (9.3.0):
- Flutter
- PromisesObjC (2.4.0)
- SDWebImage (5.19.2):
- SDWebImage/Core (= 5.19.2)
- SDWebImage/Core (5.19.2)
@ -177,6 +273,8 @@ DEPENDENCIES:
- connectivity_plus (from `.symlinks/plugins/connectivity_plus/darwin`)
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
- file_picker (from `.symlinks/plugins/file_picker/ios`)
- firebase_analytics (from `.symlinks/plugins/firebase_analytics/ios`)
- firebase_core (from `.symlinks/plugins/firebase_core/ios`)
- Flutter (from `Flutter`)
- flutter_blue_plus (from `.symlinks/plugins/flutter_blue_plus/ios`)
- flutter_bugly (from `.symlinks/plugins/flutter_bugly/ios`)
@ -222,10 +320,19 @@ SPEC REPOS:
- Bugly
- DKImagePickerController
- DKPhotoGallery
- Firebase
- FirebaseAnalytics
- FirebaseCore
- FirebaseCoreInternal
- FirebaseInstallations
- GoogleAppMeasurement
- GoogleMaps
- GoogleUtilities
- ios-voice-processor
- JCore
- JPush
- nanopb
- PromisesObjC
- SDWebImage
- SwiftyGif
- Toast
@ -258,6 +365,10 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/device_info_plus/ios"
file_picker:
:path: ".symlinks/plugins/file_picker/ios"
firebase_analytics:
:path: ".symlinks/plugins/firebase_analytics/ios"
firebase_core:
:path: ".symlinks/plugins/firebase_core/ios"
Flutter:
:path: Flutter
flutter_blue_plus:
@ -336,6 +447,13 @@ SPEC CHECKSUMS:
DKPhotoGallery: b3834fecb755ee09a593d7c9e389d8b5d6deed60
EMASRest: 8df6f87836767a9415ad5cc4af739bc9d215b475
file_picker: ce3938a0df3cc1ef404671531facef740d03f920
Firebase: 9f574c08c2396885b5e7e100ed4293d956218af9
firebase_analytics: 1a66fe8d4375eccff44671ea37897683a78b2675
firebase_core: ceec591a66629daaee82d3321551692c4a871493
FirebaseAnalytics: 27eb78b97880ea4a004839b9bac0b58880f5a92a
FirebaseCore: 3cf438f431f18c12cdf2aaf64434648b63f7e383
FirebaseCoreInternal: d6c17dafc8dc33614733a8b52df78fcb4394c881
FirebaseInstallations: 6ef4a1c7eb2a61ee1f74727d7f6ce2e72acf1414
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
flutter_blue_plus: 4837da7d00cf5d441fdd6635b3a57f936778ea96
flutter_bugly: bf35df32a9c5d50b8aacdd35bd8ddc5b55150dae
@ -346,7 +464,9 @@ SPEC CHECKSUMS:
fluttertoast: e9a18c7be5413da53898f660530c56f35edfba9c
fluwx: c18fd6c16b03a2187cd07d6e48e32a7801962849
google_maps_flutter_ios: f135b968a67c05679e0a53538e900b5c174b0d99
GoogleAppMeasurement: 6e49ffac7d3f2c3ded9cc663f912a13b67bbd0de
GoogleMaps: 20d7b12be49a14287f797e88e0e31bc4156aaeb4
GoogleUtilities: 26a3abef001b6533cf678d3eb38fd3f614b7872d
image_gallery_saver: cb43cc43141711190510e92c460eb1655cd343cb
image_picker_ios: c560581cceedb403a6ff17f2f816d7fea1421fc1
ios-voice-processor: 8e32d7f980a06d392d128ef1cd19cf6ddcaca3c1
@ -354,11 +474,13 @@ SPEC CHECKSUMS:
JPush: b71f497a3c1b825c7843fd97f290b05d5cd75f2e
jpush_flutter: c87be254790933c0363684169ef9d3d279a5adc5
just_audio: baa7252489dbcf47a4c7cc9ca663e9661c99aafa
nanopb: fad817b59e0457d11a5dfbde799381cd727c1275
network_info_plus: 6d0c3eb8367b8164fa3fb0c19875e3f59d49697f
open_filex: 6e26e659846ec990262224a12ef1c528bb4edbe4
package_info_plus: 6c92f08e1f853dc01228d6f553146438dafcd14e
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
SDWebImage: dfe95b2466a9823cf9f0c6d01217c06550d7b29a
shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78
sqflite: 673a0e54cc04b7d6dba8d24fb8095b31c3a99eec
@ -373,6 +495,6 @@ SPEC CHECKSUMS:
webview_flutter_wkwebview: 2a23822e9039b7b1bc52e5add778e5d89ad488d1
WechatOpenSDK-XCFramework: 36fb2bea0754266c17184adf4963d7e6ff98b69f
PODFILE CHECKSUM: a4d4747e9f246a7c5b9d643d5efa33799112963a
PODFILE CHECKSUM: 728f9c851a19709391c77c54ed3556e484b54db6
COCOAPODS: 1.14.3

View File

@ -1080,7 +1080,7 @@
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = NAQ5PL2DYC;
INFOPLIST_FILE = Runner/info_sky.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = (
/usr/lib/swift,
"$(inherited)",
@ -1178,7 +1178,7 @@
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = NAQ5PL2DYC;
INFOPLIST_FILE = Runner/info_xhj.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = (
/usr/lib/swift,
"$(inherited)",
@ -1205,7 +1205,7 @@
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = NAQ5PL2DYC;
INFOPLIST_FILE = Runner/info_sky.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = (
/usr/lib/swift,
"$(inherited)",
@ -1231,7 +1231,7 @@
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = P8997RW3V8;
INFOPLIST_FILE = Runner/info_xhj.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = (
/usr/lib/swift,
"$(inherited)",
@ -1477,7 +1477,7 @@
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = NAQ5PL2DYC;
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = (
/usr/lib/swift,
"$(inherited)",
@ -1575,7 +1575,7 @@
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = NAQ5PL2DYC;
INFOPLIST_FILE = Runner/info_sky.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = (
/usr/lib/swift,
"$(inherited)",
@ -1673,7 +1673,7 @@
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = NAQ5PL2DYC;
INFOPLIST_FILE = Runner/info_sky.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = (
/usr/lib/swift,
"$(inherited)",
@ -1771,7 +1771,7 @@
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = P8997RW3V8;
INFOPLIST_FILE = Runner/info_xhj.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = (
/usr/lib/swift,
"$(inherited)",
@ -1869,7 +1869,7 @@
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = P8997RW3V8;
INFOPLIST_FILE = Runner/info_xhj.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = (
/usr/lib/swift,
"$(inherited)",

View File

@ -4,14 +4,15 @@ import 'package:firebase_core/firebase_core.dart'
show Firebase, FirebaseOptions;
import 'package:flutter/foundation.dart'
show defaultTargetPlatform, kIsWeb, TargetPlatform;
import 'package:star_lock/flavors.dart';
class DefaultFirebaseOptions {
static FirebaseOptions get currentPlatform {
switch (defaultTargetPlatform) {
case TargetPlatform.android:
return android;
case TargetPlatform.iOS:
return ios;
switch (F.appFlavor) {
case Flavor.sky:
return sky_android;
case Flavor.xhj_bundle:
return xhj_android;
default:
throw UnsupportedError(
'DefaultFirebaseOptions are not supported for this platform.',
@ -19,14 +20,22 @@ class DefaultFirebaseOptions {
}
}
static const FirebaseOptions android = FirebaseOptions(
static const FirebaseOptions sky_android = FirebaseOptions(
apiKey: 'AIzaSyC-3-ABWuy9LrYyAw_KxDRto4DanQ0sq9g',
appId: '1:281500445726:android:ddf52ac7b7f83cf5c4d20f',
messagingSenderId: '281500445726',
projectId: 'skychip2023-ecdff',
projectId: 'smart-lock-12b8c',
storageBucket: 'skychip2023-ecdff.firebasestorage.app',
);
static const FirebaseOptions xhj_android = FirebaseOptions(
apiKey: 'AIzaSyAm8dJlBY5hjslJDVDBNd2bkWrJlGjAMqw',
appId: '1:448746601330:android:1a8056175e1dad5e317beb',
messagingSenderId: '448746601330',
projectId: 'smart-lock-12b8c',
storageBucket: 'smart-lock-12b8c.firebasestorage.app',
);
static const FirebaseOptions ios = FirebaseOptions(
apiKey: 'AIzaSyACbp5aUKhLU1SMg8iIdm9WmNX7wxI7fVc',
appId: '1:281500445726:ios:b194ccffb92fb86cc4d20f',
@ -51,9 +60,14 @@ class FirebaseHelper {
}
Future<void> initApp() async {
await Firebase.initializeApp(
options: DefaultFirebaseOptions.currentPlatform,
);
const bool isProductVmMode = bool.fromEnvironment('dart.vm.product');
if (F.isProductionEnv &&
isProductVmMode &&
defaultTargetPlatform == TargetPlatform.android) {
await Firebase.initializeApp(
options: DefaultFirebaseOptions.currentPlatform,
);
}
}
Future<void> initSdk() async {

View File

@ -8,6 +8,7 @@ enum Flavor {
sky_dev,
sky_pre,
xhj,
xhj_bundle,
xhj_dev,
xhj_pre,
}
@ -48,6 +49,7 @@ class F {
static bool get isXHJ =>
appFlavor == Flavor.xhj ||
appFlavor == Flavor.xhj_bundle ||
appFlavor == Flavor.xhj_dev ||
appFlavor == Flavor.xhj_pre;
@ -71,6 +73,7 @@ class F {
case Flavor.dev:
case Flavor.pre:
case Flavor.xhj:
case Flavor.xhj_bundle:
default:
return xhjCall();
}
@ -89,6 +92,7 @@ class F {
case Flavor.sky_pre:
return '锁通通'.tr;
case Flavor.xhj:
case Flavor.xhj_bundle:
case Flavor.xhj_dev:
case Flavor.xhj_pre:
return '星星锁'.tr;
@ -110,6 +114,7 @@ class F {
case Flavor.sky_pre:
return '锁通通'.tr;
case Flavor.xhj:
case Flavor.xhj_bundle:
case Flavor.xhj_dev:
case Flavor.xhj_pre:
return '星星锁'.tr;
@ -136,6 +141,7 @@ class F {
case Flavor.sky:
return 'https://lock.skychip.top';
case Flavor.xhj:
case Flavor.xhj_bundle:
return 'https://lock.xhjcn.ltd';
// return 'https://pre.lock.star-lock.cn';
default:
@ -186,6 +192,9 @@ class F {
return const StarLockAMapKey(
androidKey: '9dd8073a2e96870b206269bb562a887a',
iosKey: 'c70047e60ce704d945ea89d6c2763b82');
case Flavor.xhj_bundle:
return const StarLockAMapKey(
androidKey: 'c47fa8e1d9e2a25321dbee75e1ff7790', iosKey: '');
default:
return const StarLockAMapKey(
androidKey: 'no valied key',
@ -250,6 +259,28 @@ class F {
}
}
// StarLockAMapKey
static String get jPushKey {
switch (appFlavor) {
case Flavor.local:
case Flavor.dev:
case Flavor.pre:
return '';
case Flavor.sky_dev:
case Flavor.sky_pre:
case Flavor.sky:
return '7ff37d174c1a568a89e98dad';
case Flavor.xhj_dev:
case Flavor.xhj_pre:
case Flavor.xhj:
return '251fc8074820d122b6de58d2';
case Flavor.xhj_bundle:
return '5ccdb9b8d3faaae66ba5d02e';
default:
return '';
}
}
//
static bool get isProductionEnv {
switch (appFlavor) {
@ -259,6 +290,7 @@ class F {
return false;
case Flavor.sky:
case Flavor.xhj:
case Flavor.xhj_bundle:
return true;
default:
return false;

View File

@ -4,7 +4,7 @@ import 'flavors.dart';
import 'main.dart' as runner;
Future<void> main() async {
F.appFlavor = Flavor.xhj;
F.appFlavor = Flavor.xhj_bundle;
F.isLite = true;
// AppLog.log('xhj_lite调用了main函数');
await runner.main();

View File

@ -24,18 +24,12 @@ class XSJPushProvider {
return;
}
String appKey;
if (F.isSKY) {
appKey = '7ff37d174c1a568a89e98dad';
} else {
appKey = '251fc8074820d122b6de58d2';
}
print('jPushKey ${F.jPushKey}');
jpush.setup(
appKey: appKey,
appKey: F.jPushKey,
channel: 'flutter_channel',
production: false,
debug: false,
production: F.isProductionEnv,
debug: !F.isProductionEnv,
);
jpush.applyPushAuthority(

View File

@ -15,9 +15,9 @@ class FlavorsImg extends StatelessWidget {
@override
Widget build(BuildContext context) {
myFilter = ColorFilterGenerator(name: 'xhj', filters: <List<double>>[
if (black) ColorFilterAddons.addictiveColor(-255, -255, -255) else ColorFilterAddons.addictiveColor(1, 22, 93),
if (black) ColorFilterAddons.addictiveColor(-255, -255, -255) else ColorFilterAddons.addictiveColor(1 , 22, 93),
]);
if (F.appFlavor != Flavor.xhj) {
if (F.appFlavor != Flavor.xhj && F.appFlavor != Flavor.xhj_bundle) {
return child;
}
return ColorFiltered(