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 plugin: 'kotlin-android' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" def keystorePropertiesFile = rootProject.file("key.properties") def keystoreProperties = new Properties() keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) android { compileSdkVersion 31 sourceSets { main.java.srcDirs += 'src/main/kotlin' } lintOptions { disable 'InvalidPackage' } defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "com.example.ysairplane2" minSdkVersion 19 targetSdkVersion 31 versionCode flutterVersionCode.toInteger() versionName flutterVersionName manifestPlaceholders = [ JPUSH_PKGNAME: "com.example.ysairplane2", JPUSH_APPKEY : "9a0d84408a11c073527fdaeb", /*NOTE: JPush 上注册的包名对应的 Appkey.*/ JPUSH_CHANNEL: "developer-default", /*暂时填写默认值即可.*/ ] multiDexEnabled true } signingConfigs { release { keyAlias keystoreProperties['keyAlias'] keyPassword keystoreProperties['keyPassword'] storeFile file(keystoreProperties['storeFile']) storePassword keystoreProperties['storePassword'] } } buildTypes { release { minifyEnabled false shrinkResources false consumerProguardFiles "proguard-rules.pro" signingConfig signingConfigs.release } debug { signingConfig signingConfigs.release } } // buildTypes { // release { // minifyEnabled false // shrinkResources false // consumerProguardFiles "proguard-rules.pro" // signingConfig signingConfigs.release // } // } } flutter { source '../..' } dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation 'com.tencent.map:tencent-map-vector-sdk:4.3.4' implementation 'com.tencent.map.geolocation:TencentLocationSdk-openplatform:7.2.6' }