You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
96 lines
2.5 KiB
Groovy
96 lines
2.5 KiB
Groovy
plugins {
|
|
id "com.android.application"
|
|
id "org.jetbrains.kotlin.android"
|
|
id "dev.flutter.flutter-gradle-plugin"
|
|
}
|
|
|
|
def keystoreProperties = new Properties()
|
|
def keystoreFile = rootProject.file("key.properties")
|
|
if (keystoreFile.exists()) {
|
|
keystoreProperties.load(new FileInputStream(keystoreFile))
|
|
}
|
|
|
|
android {
|
|
namespace "at.windesign.workinghours" // <— NAMESPACE
|
|
compileSdk 35
|
|
|
|
signingConfigs {
|
|
release {
|
|
if (keystoreFile.exists()) {
|
|
storeFile file(keystoreProperties["storeFile"])
|
|
storePassword keystoreProperties["storePassword"]
|
|
keyAlias keystoreProperties["keyAlias"]
|
|
keyPassword keystoreProperties["keyPassword"]
|
|
}
|
|
}
|
|
}
|
|
|
|
defaultConfig {
|
|
applicationId "at.windesign.workinghours" // <— APP ID
|
|
minSdk 21
|
|
targetSdk 35
|
|
versionCode 1
|
|
versionName "1.0"
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_17
|
|
targetCompatibility JavaVersion.VERSION_17
|
|
}
|
|
|
|
buildTypes {
|
|
debug {
|
|
minifyEnabled false
|
|
shrinkResources false
|
|
}
|
|
release {
|
|
minifyEnabled false
|
|
shrinkResources false
|
|
}
|
|
// release {
|
|
// signingConfig signingConfigs.release
|
|
// minifyEnabled false // bei Bedarf true + ProGuard/R8 rules
|
|
// shrinkResources false // bei Bedarf true
|
|
// }
|
|
}
|
|
|
|
// eine einzige APK (keine ABI-Splits), damit Flutter sie findet
|
|
splits {
|
|
abi {
|
|
enable false
|
|
reset()
|
|
universalApk true
|
|
}
|
|
}
|
|
}
|
|
|
|
kotlin {
|
|
jvmToolchain(17)
|
|
}
|
|
|
|
flutter {
|
|
source "../.."
|
|
}
|
|
|
|
dependencies {
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:1.9.22"
|
|
}
|
|
|
|
// --- Mirror the built APK into Flutter's expected output dir -----------------
|
|
def flutterOutDir = file("$rootDir/../build/app/outputs/flutter-apk")
|
|
|
|
tasks.register("mirrorDebugApkToFlutter", Copy) {
|
|
// Quelle: wo deine APK aktuell liegt
|
|
from("$buildDir/outputs/apk/debug/app-debug.apk")
|
|
into(flutterOutDir)
|
|
doFirst { flutterOutDir.mkdirs() }
|
|
}
|
|
|
|
// Hänge den Copy-Task an, sobald die Tasks existieren
|
|
afterEvaluate {
|
|
// Falls assembleDebug existiert, danach spiegeln
|
|
tasks.findByName("assembleDebug")?.finalizedBy("mirrorDebugApkToFlutter")
|
|
// Sicherungsnetz: packageDebug gibt es auf jeden Fall
|
|
tasks.findByName("packageDebug")?.finalizedBy("mirrorDebugApkToFlutter")
|
|
}
|