Skip to content
Merged

fixed #148

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions mobile/android/app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
plugins {
id("com.android.application")
id("dev.flutter.flutter-gradle-plugin")
id("org.jetbrains.kotlin.android")
// Restored because Flutter 3.13 still strictly requires it.
id("org.jetbrains.kotlin.android")
}

configurations.all {
Expand Down Expand Up @@ -34,10 +35,8 @@ android {
buildTypes {
getByName("release") {
signingConfig = signingConfigs.getByName("debug")

isMinifyEnabled = true
isShrinkResources = true

proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
Expand All @@ -50,6 +49,7 @@ flutter {
source = "../.."
}

// Restored to support Flutter 3.13 Kotlin compilation
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
compilerOptions {
jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17)
Expand All @@ -64,10 +64,13 @@ androidComponents {
val abi = output.filters.find {
it.filterType == com.android.build.api.variant.FilterConfiguration.FilterType.ABI
}?.identifier

val baseAbiCode = abiCodes[abi]
if (baseAbiCode != null) {
// Multiplies main version code by 10 and appends the specific architecture suffix matching formula
output.versionCode.set((output.versionCode.get() ?: 1) * 10 + baseAbiCode)
// FIXED: We read flutter.versionCode directly instead of mapping output.versionCode to itself.
// This breaks the circular loop while still giving you the correct architecture suffix.
val baseVersionCode = flutter.versionCode
output.versionCode.set(baseVersionCode * 10 + baseAbiCode)
}
}
}
Expand All @@ -86,10 +89,11 @@ project.afterEvaluate {

for (dir in searchDirs) {
if (dir.exists()) {
dir.walkTopDown().forEach { file ->
if (file.isDirectory && file.absolutePath.endsWith("com/google/android/play/core")) {
dir.walkBottomUp().forEach { file ->
val normalizedPath = file.absolutePath.replace('\\', '/')
if (file.isDirectory && normalizedPath.endsWith("com/google/android/play/core")) {
file.deleteRecursively()
logger.lifecycle("Successfully removed vendor-shaded tracking package: ${file.absolutePath}")
logger.lifecycle("Successfully removed vendor-shaded tracking package: $normalizedPath")
}
}
}
Expand Down
12 changes: 6 additions & 6 deletions mobile/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -266,18 +266,18 @@ packages:
dependency: "direct main"
description:
name: flutter_secure_storage
sha256: "7686b1d6a29985dcbb808c59518226e603e3bfa7c0ddfd1a0d00e4cda77c868e"
sha256: "15e8c8fe269fdf7d469b23008ab3df521c8b826ed345820532364c31bdebace6"
url: "https://pub.dev"
source: hosted
version: "10.3.1"
version: "11.0.0"
flutter_secure_storage_darwin:
dependency: transitive
description:
name: flutter_secure_storage_darwin
sha256: "82329fa5cdf343773b1b6897dea959105a29f092454259edff92f9f6637e8149"
sha256: ac6d76a752de0cd738334eb4b21743fc4943f449f5b6e308f18838b048c02ac0
url: "https://pub.dev"
source: hosted
version: "0.3.2"
version: "0.4.0"
flutter_secure_storage_linux:
dependency: transitive
description:
Expand Down Expand Up @@ -801,10 +801,10 @@ packages:
dependency: transitive
description:
name: synchronized
sha256: "61894a1956de6b4fc1aefd0892e109514a1a706cbece3ac59decd90ff5a7a423"
sha256: "3a7b5d17422dd0f8d5c6c14feaa5a1c65638b9455f871a96f08437562c046931"
url: "https://pub.dev"
source: hosted
version: "3.4.1+1"
version: "3.4.1+2"
term_glyph:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion mobile/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ dependencies:
provider: ^6.1.5+1
launcher_name: ^1.0.2
flutter_launcher_icons: ^0.14.4
flutter_secure_storage: ^10.3.1
flutter_secure_storage: ^11.0.0
dio: ^5.11.0
flutter_markdown_plus: ^1.0.12
intl: ^0.20.3
Expand Down
Loading