This commit is contained in:
+57
-27
@@ -1,44 +1,74 @@
|
||||
plugins {
|
||||
id "com.android.application"
|
||||
id "kotlin-android"
|
||||
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
|
||||
id "org.jetbrains.kotlin.android"
|
||||
id "dev.flutter.flutter-gradle-plugin"
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "com.example.workinghours"
|
||||
compileSdk = flutter.compileSdkVersion
|
||||
ndkVersion = flutter.ndkVersion
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = JavaVersion.VERSION_1_8
|
||||
}
|
||||
namespace "at.windesign.workinghours" // <— NAMESPACE
|
||||
compileSdk 35
|
||||
|
||||
defaultConfig {
|
||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||
applicationId = "com.example.workinghours"
|
||||
// You can update the following values to match your application needs.
|
||||
// For more information, see: https://flutter.dev/to/review-gradle-config.
|
||||
minSdk = flutter.minSdkVersion
|
||||
targetSdk = flutter.targetSdkVersion
|
||||
versionCode = flutter.versionCode
|
||||
versionName = flutter.versionName
|
||||
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 {
|
||||
// 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
|
||||
minifyEnabled false
|
||||
shrinkResources false
|
||||
// proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
|
||||
// eine einzige APK (keine ABI-Splits), damit Flutter sie findet
|
||||
splits {
|
||||
abi {
|
||||
enable false
|
||||
reset()
|
||||
universalApk true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
flutter {
|
||||
source = "../.."
|
||||
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")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user