- Add .gitea/workflows/ci.yml: lint -> test -> build-android -> build-ios pipeline - Flutter 3.41.x aligned with devcontainer (was 3.27.x) - Java 17 (temurin) with Gradle build cache - flutter precache --android + SDK license acceptance (CI crash fixes) - Conditional release signing via ANDROID_KEYSTORE_* secrets - Pre-build gates (analyze + test) skip expensive build on failure - Conditional whitelabel build script (only when theme.json exists) - APK + AAB artifact upload (90-day retention) - Add .gitea/workflows/release.yml: tag-triggered release pipeline - Lint -> test -> build-android -> build-ios -> publish-release - Gitea Release creation with APK attachment - Fixed Gitea API auth (was leaking placeholder '***' token) - Apple signing support via APPLE_CERTIFICATE_* secrets - Update android/app/build.gradle.kts: conditional release signing - signingConfigs.release block loads from key.properties when present - Falls back to debug signing when key.properties absent - Backward compatible with local dev (no secrets required)
73 lines
2.4 KiB
Kotlin
Executable File
73 lines
2.4 KiB
Kotlin
Executable File
plugins {
|
|
id("com.android.application")
|
|
id("kotlin-android")
|
|
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
|
|
id("dev.flutter.flutter-gradle-plugin")
|
|
}
|
|
|
|
dependencies {
|
|
implementation("com.google.android.gms:play-services-cast-framework:22.1.0")
|
|
implementation("androidx.mediarouter:mediarouter:1.7.0")
|
|
implementation("androidx.appcompat:appcompat:1.7.0")
|
|
implementation("androidx.media:media:1.7.0")
|
|
}
|
|
|
|
// Load release signing properties if key.properties exists (set by CI pipeline)
|
|
val keystorePropertiesFile = rootProject.file("key.properties")
|
|
val keystoreProperties = java.util.Properties()
|
|
if (keystorePropertiesFile.exists()) {
|
|
keystoreProperties.load(java.io.FileInputStream(keystorePropertiesFile))
|
|
}
|
|
|
|
android {
|
|
namespace = "com.example.kryz_go_flutter"
|
|
compileSdk = flutter.compileSdkVersion
|
|
ndkVersion = flutter.ndkVersion
|
|
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
}
|
|
|
|
kotlinOptions {
|
|
jvmTarget = JavaVersion.VERSION_17.toString()
|
|
}
|
|
|
|
defaultConfig {
|
|
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
|
applicationId = "com.example.kryz_go_flutter"
|
|
// 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
|
|
}
|
|
|
|
signingConfigs {
|
|
create("release") {
|
|
if (keystorePropertiesFile.exists()) {
|
|
keyAlias = keystoreProperties["keyAlias"] as String
|
|
keyPassword = keystoreProperties["keyPassword"] as String
|
|
storeFile = file(keystoreProperties["storeFile"] as String)
|
|
storePassword = keystoreProperties["storePassword"] as String
|
|
}
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
// Use release signing if key.properties exists, otherwise fall back to debug.
|
|
if (keystorePropertiesFile.exists()) {
|
|
signingConfig = signingConfigs.getByName("release")
|
|
} else {
|
|
signingConfig = signingConfigs.getByName("debug")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
flutter {
|
|
source = "../.."
|
|
}
|