AI_Drawing/android/app/build.gradle
2024-06-03 15:30:15 +08:00

86 lines
2.4 KiB
Groovy
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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"
android {
compileSdkVersion 33
ndkVersion flutter.ndkVersion
signingConfigs {
//签名的配置
signConfig {
storeFile file("aiDraw.jks")
storePassword '123456'
keyAlias 'aiDraw'
keyPassword '123456'
}
}
lintOptions {
//如打包出现Failed to transform libs.jar to match attributes
checkReleaseBuilds false
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.hissai.draw"
minSdkVersion 19
targetSdkVersion 33
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
multiDexEnabled true
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
signingConfig signingConfigs.signConfig //打包命令行gradlew assembleRelease
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
//关闭混淆
minifyEnabled false //删除无用代码
shrinkResources false //删除无用资源
}
debug {
signingConfig signingConfigs.signConfig
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.6.1'
}
}
flutter {
source '../..'
}