2024-03-20 17:55:32 +08:00
|
|
|
|
plugins {
|
|
|
|
|
id "com.android.application"
|
|
|
|
|
id "kotlin-android"
|
|
|
|
|
id "dev.flutter.flutter-gradle-plugin"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2023-12-22 21:23:24 +08:00
|
|
|
|
def localProperties = new Properties()
|
|
|
|
|
def localPropertiesFile = rootProject.file('local.properties')
|
|
|
|
|
if (localPropertiesFile.exists()) {
|
|
|
|
|
localPropertiesFile.withReader('UTF-8') { reader ->
|
|
|
|
|
localProperties.load(reader)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
|
|
|
|
|
if (flutterVersionCode == null) {
|
|
|
|
|
flutterVersionCode = '1'
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
def flutterVersionName = localProperties.getProperty('flutter.versionName')
|
|
|
|
|
if (flutterVersionName == null) {
|
|
|
|
|
flutterVersionName = '1.0'
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
android {
|
2024-03-20 17:55:32 +08:00
|
|
|
|
compileSdkVersion 34
|
2023-12-22 21:23:24 +08:00
|
|
|
|
|
2024-03-20 17:55:32 +08:00
|
|
|
|
lint {
|
2023-12-22 21:23:24 +08:00
|
|
|
|
disable 'InvalidPackage'
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
defaultConfig {
|
|
|
|
|
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
|
|
|
|
applicationId "com.amap.flutter.amap_map_example"
|
|
|
|
|
minSdkVersion flutter.minSdkVersion
|
2023-12-23 11:31:14 +08:00
|
|
|
|
targetSdkVersion 33
|
2023-12-22 21:23:24 +08:00
|
|
|
|
versionCode flutterVersionCode.toInteger()
|
|
|
|
|
versionName flutterVersionName
|
|
|
|
|
}
|
|
|
|
|
signingConfigs {
|
|
|
|
|
debug {
|
|
|
|
|
//keystore中key的别名
|
|
|
|
|
keyAlias 'androiddebugkey'
|
|
|
|
|
//keystore中key的密码
|
|
|
|
|
keyPassword 'android'
|
|
|
|
|
//keystore的文件路径,可以是绝对路径也可以是相对路径
|
|
|
|
|
storeFile file('../debug.keystore')
|
|
|
|
|
//keystore的密码l
|
|
|
|
|
storePassword 'android'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//关闭混淆, 否则在运行release包后可能出现运行崩溃, TODO后续进行混淆配置
|
|
|
|
|
minifyEnabled false //删除无用代码
|
|
|
|
|
shrinkResources false //删除无用资源
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
sourceSets {
|
|
|
|
|
main {
|
|
|
|
|
jniLibs.srcDirs = ['libs']
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-12-26 11:56:49 +08:00
|
|
|
|
ndkVersion '25.1.8937393'
|
2023-12-22 21:23:24 +08:00
|
|
|
|
}
|
|
|
|
|
dependencies {
|
|
|
|
|
//demo中引入高德地图SDK
|
2024-06-27 15:01:40 +08:00
|
|
|
|
implementation 'com.amap.api:3dmap-location-search:10.0.700_loc6.4.5_sea9.7.2'
|
2023-12-22 21:23:24 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
flutter {
|
|
|
|
|
source '../..'
|
|
|
|
|
}
|