2026-02-16 10:08:09 +00:00
|
|
|
|
import java.util.Properties
|
|
|
|
|
|
|
2026-01-11 08:17:29 +00:00
|
|
|
|
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")
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-02-16 10:08:09 +00:00
|
|
|
|
// Release signing: key.properties から読み込み(存在しない場合はdebug署名にフォールバック)
|
2026-02-16 10:17:41 +00:00
|
|
|
|
// key.properties の配置場所: android/key.properties(.gitignore で除外済み)
|
|
|
|
|
|
val keyPropertiesFile = rootProject.file("key.properties")
|
2026-02-16 10:08:09 +00:00
|
|
|
|
val keyProperties = Properties()
|
|
|
|
|
|
if (keyPropertiesFile.exists()) {
|
|
|
|
|
|
keyProperties.load(keyPropertiesFile.inputStream())
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-01-11 08:17:29 +00:00
|
|
|
|
android {
|
2026-01-30 08:39:06 +00:00
|
|
|
|
namespace = "com.posimai.ponshu_room"
|
2026-01-11 08:17:29 +00:00
|
|
|
|
compileSdk = 36
|
|
|
|
|
|
ndkVersion = flutter.ndkVersion
|
|
|
|
|
|
|
|
|
|
|
|
compileOptions {
|
|
|
|
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
|
|
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
kotlinOptions {
|
|
|
|
|
|
jvmTarget = JavaVersion.VERSION_17.toString()
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
defaultConfig {
|
2026-02-16 10:08:09 +00:00
|
|
|
|
// Lite版のアプリID(Pro版: com.posimai.ponshu_room)
|
2026-01-30 11:21:27 +00:00
|
|
|
|
applicationId = "com.posimai.ponshu_room_lite"
|
2026-01-11 08:17:29 +00:00
|
|
|
|
// 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
|
2026-01-13 00:57:18 +00:00
|
|
|
|
ndk {
|
|
|
|
|
|
abiFilters.add("arm64-v8a")
|
|
|
|
|
|
}
|
2026-01-30 11:21:27 +00:00
|
|
|
|
// multiDexEnabled = true
|
2026-01-11 08:17:29 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-02-16 10:08:09 +00:00
|
|
|
|
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
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-01-11 08:17:29 +00:00
|
|
|
|
buildTypes {
|
2026-01-30 11:21:27 +00:00
|
|
|
|
getByName("release") {
|
2026-02-16 10:08:09 +00:00
|
|
|
|
// key.properties が存在すればrelease署名、なければdebug署名(開発用)
|
|
|
|
|
|
signingConfig = if (keyPropertiesFile.exists()) {
|
|
|
|
|
|
signingConfigs.getByName("release")
|
|
|
|
|
|
} else {
|
|
|
|
|
|
signingConfigs.getByName("debug")
|
|
|
|
|
|
}
|
2026-01-30 11:21:27 +00:00
|
|
|
|
isMinifyEnabled = false
|
|
|
|
|
|
isShrinkResources = false
|
2026-01-11 08:17:29 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
flutter {
|
|
|
|
|
|
source = "../.."
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
dependencies {
|
2026-01-30 11:21:27 +00:00
|
|
|
|
// 日本語OCR認識のためのML Kitライブラリ(Lite版では廃止)
|
|
|
|
|
|
// implementation("com.google.mlkit:text-recognition-japanese:16.0.1")
|
2026-01-11 08:17:29 +00:00
|
|
|
|
}
|