58 lines
1.4 KiB
Groovy
58 lines
1.4 KiB
Groovy
plugins {
|
|
id "com.android.application"
|
|
id "kotlin-android"
|
|
id "dev.flutter.flutter-gradle-plugin"
|
|
}
|
|
|
|
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') ?: '1'
|
|
def flutterVersionName = localProperties.getProperty('flutter.versionName') ?: '1.0'
|
|
|
|
android {
|
|
namespace "com.example.coffee_iot_flutter"
|
|
compileSdk 36
|
|
ndkVersion flutter.ndkVersion
|
|
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_17
|
|
targetCompatibility JavaVersion.VERSION_17
|
|
}
|
|
|
|
kotlinOptions {
|
|
jvmTarget = '17'
|
|
}
|
|
|
|
defaultConfig {
|
|
applicationId "com.example.coffee_iot_flutter"
|
|
minSdk flutter.minSdkVersion
|
|
targetSdk 35
|
|
versionCode flutterVersionCode.toInteger()
|
|
versionName flutterVersionName
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
signingConfig signingConfigs.debug
|
|
}
|
|
}
|
|
}
|
|
|
|
// Force pin versi androidx agar kompatibel AGP 8.6.1
|
|
configurations.all {
|
|
resolutionStrategy {
|
|
force 'androidx.browser:browser:1.8.0'
|
|
force 'androidx.core:core:1.15.0'
|
|
force 'androidx.core:core-ktx:1.15.0'
|
|
}
|
|
}
|
|
|
|
flutter {
|
|
source '../..'
|
|
} |