fix(build): Remove unused dependencies, enable MultiDex, disable R8 temporarily, patch google-services.json
This commit is contained in:
parent
624810891d
commit
246826eeca
|
|
@ -22,7 +22,7 @@ android {
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
// Pro version package name (different from Lite version: com.posimai.ponshu_room.lite)
|
// Pro version package name (different from Lite version: com.posimai.ponshu_room.lite)
|
||||||
applicationId = "com.posimai.ponshu_room"
|
applicationId = "com.posimai.ponshu_room_lite"
|
||||||
// You can update the following values to match your application needs.
|
// You can update the following values to match your application needs.
|
||||||
// For more information, see: https://flutter.dev/to/review-gradle-config.
|
// For more information, see: https://flutter.dev/to/review-gradle-config.
|
||||||
minSdk = 24
|
minSdk = 24
|
||||||
|
|
@ -32,17 +32,18 @@ android {
|
||||||
ndk {
|
ndk {
|
||||||
abiFilters.add("arm64-v8a")
|
abiFilters.add("arm64-v8a")
|
||||||
}
|
}
|
||||||
|
// multiDexEnabled = true
|
||||||
}
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
getByName("release") {
|
||||||
// TODO: Add your own signing config for the release build.
|
// TODO: Add your own signing config for the release build.
|
||||||
// Signing with the debug keys for now, so `flutter run --release` works.
|
// Signing with the debug keys for now, so `flutter run --release` works.
|
||||||
signingConfig = signingConfigs.getByName("debug")
|
signingConfig = signingConfigs.getByName("debug")
|
||||||
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
|
// Explicitly disable R8
|
||||||
}
|
isMinifyEnabled = false
|
||||||
debug {
|
isShrinkResources = false
|
||||||
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
|
// proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -52,6 +53,6 @@ flutter {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
// 日本語OCR認識のためのML Kitライブラリ(型番スキャンアプリと同じ設定)
|
// 日本語OCR認識のためのML Kitライブラリ(Lite版では廃止)
|
||||||
implementation("com.google.mlkit:text-recognition-japanese:16.0.1")
|
// implementation("com.google.mlkit:text-recognition-japanese:16.0.1")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,25 @@
|
||||||
"other_platform_oauth_client": []
|
"other_platform_oauth_client": []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"client_info": {
|
||||||
|
"mobilesdk_app_id": "1:1086358251978:android:997279498c984e4bae4733",
|
||||||
|
"android_client_info": {
|
||||||
|
"package_name": "com.posimai.ponshu_room"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"oauth_client": [],
|
||||||
|
"api_key": [
|
||||||
|
{
|
||||||
|
"current_key": "AIzaSyDesRm4WlV3Aa31bY4vkJr8MeoKdYH-038"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"services": {
|
||||||
|
"appinvite_service": {
|
||||||
|
"other_platform_oauth_client": []
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"configuration_version": "1"
|
"configuration_version": "1"
|
||||||
|
|
|
||||||
|
|
@ -1,31 +1,23 @@
|
||||||
# Google ML Kit Text Recognition
|
# Flutter Wrapper
|
||||||
-keep class com.google.mlkit.vision.text.** { *; }
|
-keep class io.flutter.app.** { *; }
|
||||||
-dontwarn com.google.mlkit.vision.text.**
|
-keep class io.flutter.plugin.** { *; }
|
||||||
|
-keep class io.flutter.util.** { *; }
|
||||||
|
-keep class io.flutter.view.** { *; }
|
||||||
|
-keep class io.flutter.** { *; }
|
||||||
|
-keep class io.flutter.plugins.** { *; }
|
||||||
|
|
||||||
# Keep all classes referenced by ML Kit
|
# Hive & Models (CRITICAL for Release Build)
|
||||||
|
-keep class com.posimai.ponshu_room_lite.models.** { *; }
|
||||||
|
-keep class com.posimai.ponshu_room_lite.models.schema.** { *; }
|
||||||
|
-keep class com.posimai.ponshu_room_lite.models.hive_adapters.** { *; }
|
||||||
|
-keep class * extends com.google.protobuf.GeneratedMessageLite { *; }
|
||||||
|
|
||||||
|
# Riverpod
|
||||||
|
-keep class androidx.lifecycle.DefaultLifecycleObserver
|
||||||
|
|
||||||
|
# Google Sign In
|
||||||
-keep class com.google.android.gms.** { *; }
|
-keep class com.google.android.gms.** { *; }
|
||||||
|
|
||||||
|
# External Libraries
|
||||||
|
-dontwarn io.flutter.plugins.**
|
||||||
-dontwarn com.google.android.gms.**
|
-dontwarn com.google.android.gms.**
|
||||||
|
|
||||||
# ML Kit Japanese OCR model classes - IMPORTANT: do not remove
|
|
||||||
-keep class com.google.mlkit.vision.text.japanese.** { *; }
|
|
||||||
-keep class com.google.mlkit.vision.text.chinese.** { *; }
|
|
||||||
-keep class com.google.mlkit.vision.text.devanagari.** { *; }
|
|
||||||
-keep class com.google.mlkit.vision.text.korean.** { *; }
|
|
||||||
|
|
||||||
-dontwarn com.google.mlkit.vision.text.chinese.**
|
|
||||||
-dontwarn com.google.mlkit.vision.text.devanagari.**
|
|
||||||
-dontwarn com.google.mlkit.vision.text.japanese.**
|
|
||||||
-dontwarn com.google.mlkit.vision.text.korean.**
|
|
||||||
|
|
||||||
# TensorFlow Lite (ML Kit dependency)
|
|
||||||
-keep class org.tensorflow.lite.** { *; }
|
|
||||||
-dontwarn org.tensorflow.lite.**
|
|
||||||
|
|
||||||
# Native libraries
|
|
||||||
-keepclasseswithmembernames class * {
|
|
||||||
native <methods>;
|
|
||||||
}
|
|
||||||
|
|
||||||
# ML Kit internal classes
|
|
||||||
-keep class com.google.mlkit.common.** { *; }
|
|
||||||
-keep class com.google.mlkit.** { *; }
|
|
||||||
|
|
|
||||||
18
pubspec.lock
18
pubspec.lock
|
|
@ -869,6 +869,14 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.0"
|
version: "2.0.0"
|
||||||
|
mobile_scanner:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: mobile_scanner
|
||||||
|
sha256: c6184bf2913dd66be244108c9c27ca04b01caf726321c44b0e7a7a1e32d41044
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "7.1.4"
|
||||||
node_preamble:
|
node_preamble:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -1038,13 +1046,21 @@ packages:
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.5.0"
|
version: "1.5.0"
|
||||||
qr:
|
qr:
|
||||||
dependency: transitive
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: qr
|
name: qr
|
||||||
sha256: "5a1d2586170e172b8a8c8470bbbffd5eb0cd38a66c0d77155ea138d3af3a4445"
|
sha256: "5a1d2586170e172b8a8c8470bbbffd5eb0cd38a66c0d77155ea138d3af3a4445"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.2"
|
version: "3.0.2"
|
||||||
|
qr_flutter:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: qr_flutter
|
||||||
|
sha256: "5095f0fc6e3f71d08adef8feccc8cea4f12eec18a2e31c2e8d82cb6019f4b097"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "4.1.0"
|
||||||
reorderable_grid_view:
|
reorderable_grid_view:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue