小赖 4 years ago
commit 599664d7e0

@ -0,0 +1,18 @@
## 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.**
## AMap 3D Map
-keep class com.amap.api.maps.**{*;}
-keep class com.autonavi.**{*;}
-keep class com.amap.api.trace.**{*;}
## AMap Location
-keep class com.amap.api.location.**{*;}
-keep class com.amap.api.fence.**{*;}
-keep class com.autonavi.aps.amapapi.model.**{*;}

@ -28,7 +28,8 @@ void main() async {
// await AmapCore.init(''); // await AmapCore.init('');
// await AmapLocation.instance.init(iosKey: ''); // await AmapLocation.instance.init(iosKey: '');
JPush jpush = new JPush(); JPush jpush = new JPush();
DevUtil.setDev(true); const isProduct = const bool.fromEnvironment('ISPRODUCT');
DevUtil.setDev(!isProduct);
jpush.addEventHandler( jpush.addEventHandler(
// //
onReceiveNotification: (Map<String, dynamic> message) async { onReceiveNotification: (Map<String, dynamic> message) async {

@ -13,3 +13,20 @@ build() {
@Task() @Task()
clean() => defaultClean(); clean() => defaultClean();
@Task()
buildApk() async {
await runAsync('flutter', arguments: [
'build',
'apk',
'--target-platform=android-arm64',
'--dart-define',
'ISPRODUCT=true'
]);
}
@Task()
buildIos() async {
await runAsync('flutter',
arguments: ['build', 'ios', '--dart-define', 'BUILD_TYPE=PRODUCT']);
}

Loading…
Cancel
Save