ponshu-room-lite/android/app/build.gradle.kts

81 lines
2.5 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import java.util.Properties
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")
id("com.google.gms.google-services")
}
// Release signing: key.properties から読み込み存在しない場合はdebug署名にフォールバック
// key.properties の配置場所: android/key.properties.gitignore で除外済み)
val keyPropertiesFile = rootProject.file("key.properties")
val keyProperties = Properties()
if (keyPropertiesFile.exists()) {
keyProperties.load(keyPropertiesFile.inputStream())
}
android {
namespace = "com.posimai.ponshu_room"
compileSdk = 36
ndkVersion = flutter.ndkVersion
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.toString()
}
defaultConfig {
// Lite版のアプリIDPro版: com.posimai.ponshu_room
applicationId = "com.posimai.ponshu_room_lite"
// You can update the following values to match your application needs.
// For more information, see: https://flutter.dev/to/review-gradle-config.
minSdk = 24
targetSdk = 34
versionCode = flutter.versionCode
versionName = flutter.versionName
ndk {
abiFilters.add("arm64-v8a")
}
// multiDexEnabled = true
}
signingConfigs {
if (keyPropertiesFile.exists()) {
create("release") {
keyAlias = keyProperties["keyAlias"] as String
keyPassword = keyProperties["keyPassword"] as String
storeFile = file(keyProperties["storeFile"] as String)
storePassword = keyProperties["storePassword"] as String
}
}
}
buildTypes {
getByName("release") {
// key.properties が存在すればrelease署名、なければdebug署名開発用
signingConfig = if (keyPropertiesFile.exists()) {
signingConfigs.getByName("release")
} else {
signingConfigs.getByName("debug")
}
isMinifyEnabled = false
isShrinkResources = false
}
}
}
flutter {
source = "../.."
}
dependencies {
// 日本語OCR認識のためのML KitライブラリLite版では廃止
// implementation("com.google.mlkit:text-recognition-japanese:16.0.1")
}