Files
cutdex/android/app/build.gradle.kts
T
lingjhf 27e77fff39 feat: initial Cutdex application
Add the Flutter video editing application with project management, media
import, timeline editing, preview, AI assistance, diagnostics and settings.

Include shared UI and native host packages, platform runners, application
tests and release tooling.

Provide usage and contribution guides, the MIT license and third-party
notices. Exclude local credentials, build outputs and validation data.
2026-10-05 23:36:23 +08:00

89 lines
2.9 KiB
Kotlin

plugins {
id("com.android.application")
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
id("dev.flutter.flutter-gradle-plugin")
}
// Match native libraries to Flutter's requested targets; the media runtime is 64-bit only.
val supportedAndroidAbis = mapOf(
"android-arm64" to "arm64-v8a",
"android-x64" to "x86_64",
)
val requestedAndroidPlatforms = (findProperty("target-platform") as? String)
?.split(",") ?: supportedAndroidAbis.keys.toList()
val enabledAndroidAbis = requestedAndroidPlatforms.mapNotNull(supportedAndroidAbis::get)
check(enabledAndroidAbis.isNotEmpty()) {
"Cutdex requires Android ARM64 or x86_64. Use --target-platform android-arm64,android-x64."
}
android {
namespace = "com.example.cutdex"
compileSdk = flutter.compileSdkVersion
ndkVersion = flutter.ndkVersion
buildFeatures {
resValues = true
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId = "com.example.cutdex"
// You can update the following values to match your application needs.
// For more information, see: https://flutter.dev/to/review-gradle-config.
minSdk = 31
targetSdk = flutter.targetSdkVersion
// Uses the version code from pubspec.yaml. When using split APKs, 1000 * ABI_VERSION
// is added automatically by Flutter. (https://developer.android.com/studio/build/configure-apk-splits#configure-APK-versions)
// You can force using the value of versionCode by specifying the `-P force-version-code-ignoring-abi=true`
// flag during build.
versionCode = flutter.versionCode
versionName = flutter.versionName
}
flavorDimensions += "environment"
productFlavors {
create("development") {
dimension = "environment"
applicationIdSuffix = ".dev"
resValue("string", "app_name", "Cutdex Dev")
}
create("production") {
dimension = "environment"
resValue("string", "app_name", "Cutdex")
}
}
buildTypes {
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")
}
}
if (splits.abi.isEnable) {
splits.abi.reset()
splits.abi.include(*enabledAndroidAbis.toTypedArray())
} else {
defaultConfig.ndk {
abiFilters.clear()
abiFilters += enabledAndroidAbis
}
}
}
kotlin {
compilerOptions {
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
}
}
flutter {
source = "../.."
}