def localProperties = new Properties() def localPropertiesFile = rootProject.file('local.properties') if (localPropertiesFile.exists()) { localPropertiesFile.withReader('UTF-8') { reader -> localProperties.load(reader) } } def flutterRoot = localProperties.getProperty('flutter.sdk') if (flutterRoot == null) { throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") } def flutterVersionCode = localProperties.getProperty('flutter.versionCode') if (flutterVersionCode == null) { flutterVersionCode = '1' } def flutterVersionName = localProperties.getProperty('flutter.versionName') if (flutterVersionName == null) { flutterVersionName = '1.0' } apply plugin: 'com.android.application' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { compileSdkVersion 28 lintOptions { disable 'InvalidPackage' } defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "com.hanson.e7langapp" minSdkVersion 16 targetSdkVersion 28 versionCode flutterVersionCode.toInteger() versionName flutterVersionName manifestPlaceholders = [ aliyunPushAppKey: "30849262", //阿里云推送appkey aliyunPushAppSecret:"a302e75da52a91910b5cbf01854791b1",//阿里云推送appsecret pushChannelId:"\\1", //安卓8.0后推送需指定渠道id,后台发送推送需要指定相同值(配置中纯数字需要加\\反斜线) pushChannelName:"channelname", //安卓8.0后推送需指定用户可以看到的通知渠道的名字.,后台发送推送需要指定相同值(配置中纯数字需要加\\反斜线) pushChannelDescrition:"channeldesc", //安卓8.0后推送需指定用户可以看到的通知渠道的描述.,后台发送推送需要指定相同值(配置中纯数字需要加\\反斜线) miPushAppId:"\\2882303761517669764", //小米推送Appid (配置中纯数字需要加\\反斜线) miPushAppKey:"\\5691766985764", //小米推送AppKey (配置中纯数字需要加\\反斜线) huaweiPushAppId:"", //华为推送AppId (配置中纯数字需要加\\反斜线) vivoPushAppId:"", //vivo推送AppId (配置中纯数字需要加\\反斜线) vivoPushAppKey:"", //vivo推送AppKey (配置中纯数字需要加\\反斜线) oppoPushAppKey:"", //oppo推送AppKey (配置中纯数字需要加\\反斜线) oppoPushAppSecret:"", //oppo推送AppKey (配置中纯数字需要加\\反斜线) meizhuPushAppId:"", //魅族推送AppId (配置中纯数字需要加\\反斜线) meizhuPushAppKey:"",//魅族推送AppKey (配置中纯数字需要加\\反斜线) ] ndk { // abiFilters 'armeabi' abiFilters "armeabi", "armeabi-v7a" , "arm64-v8a", "x86", "x86_64", "mips", "mips64" } } 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.debug } } } dependencies { } flutter { source '../..' }