80 lines
2.8 KiB
Kotlin
80 lines
2.8 KiB
Kotlin
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
|
|
|
plugins {
|
|
id("com.android.application")
|
|
|
|
// This supposedly needs removed in Gradle/AGP 9 but works fine.
|
|
id("org.jetbrains.kotlin.android") // id("kotlin-android")
|
|
|
|
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
|
|
id("dev.flutter.flutter-gradle-plugin")
|
|
}
|
|
|
|
android {
|
|
namespace = "com.hyperling.sunset_alarm"
|
|
compileSdk = flutter.compileSdkVersion
|
|
ndkVersion = flutter.ndkVersion
|
|
|
|
|
|
|
|
compileOptions {
|
|
isCoreLibraryDesugaringEnabled = true
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
}
|
|
|
|
// This supposedly needs removed in Gradle/AGP 9, but then uses 21 and fails to build.
|
|
kotlin {
|
|
compilerOptions {
|
|
jvmTarget.set(JvmTarget.JVM_17)
|
|
}
|
|
}
|
|
|
|
defaultConfig {
|
|
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
|
applicationId = "com.hyperling.sunset_alarm"
|
|
// 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
|
|
}
|
|
|
|
buildTypes {
|
|
getByName("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.getByName("debug")
|
|
|
|
/// 20260928 - Without minifying.
|
|
/// Built build/app/outputs/flutter-apk/app-release.apk (54.3MB)
|
|
/// Built build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk (17.2MB)
|
|
/// Built build/app/outputs/flutter-apk/app-arm64-v8a-release.apk (19.8MB)
|
|
/// Built build/app/outputs/flutter-apk/app-x86_64-release.apk (21.2MB)
|
|
|
|
isMinifyEnabled = true
|
|
isShrinkResources = true
|
|
proguardFiles(
|
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
|
"proguard-rules.pro"
|
|
)
|
|
|
|
/// 20260928 - With minifying, helped some, but also used
|
|
/// in combination with `--obfuscate --split-debug-info=./debug-info/`
|
|
/// Built build/app/outputs/flutter-apk/app-release.apk (54.3MB)
|
|
/// Built build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk (16.1MB)
|
|
/// Built build/app/outputs/flutter-apk/app-arm64-v8a-release.apk (18.8MB)
|
|
/// Built build/app/outputs/flutter-apk/app-x86_64-release.apk (20.3MB)
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.5")
|
|
}
|
|
|
|
flutter {
|
|
source = "../.."
|
|
}
|