Skip to content
Open
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
35 changes: 30 additions & 5 deletions android/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if (keystorePropertiesFile.exists()) {
android {
namespace = "app.cogwheel.conduit"
compileSdk = 36
ndkVersion = "29.0.14206865"
ndkVersion = flutter.ndkVersion

defaultConfig {
applicationId = "app.cogwheel.conduit"
Expand All @@ -35,10 +35,10 @@ android {
isCoreLibraryDesugaringEnabled = true
}

kotlinOptions {
// Generate JVM bytecode targeting Java 17
jvmTarget = JavaVersion.VERSION_17.toString()
}
// kotlinOptions {
// // Generate JVM bytecode targeting Java 17
// jvmTarget = JavaVersion.VERSION_17.toString()
// }

signingConfigs {
if (keystorePropertiesFile.exists()) {
Expand Down Expand Up @@ -68,6 +68,31 @@ android {
applicationIdSuffix = ".debug"
}
}
// exclude some common metadata files that inflate APK size
packagingOptions {
jniLibs { useLegacyPackaging = true }
resources {
excludes +=
setOf(
"META-INF/*.kotlin_module",
"META-INF/*.version",
"META-INF/AL2.0",
"META-INF/LGPL2.1",
"META-INF/LICENSE*",
"META-INF/NOTICE*",
"META-INF/DEPENDENCIES",
"META-INF/proguard/*",
"META-INF/gradle/incremental.annotation.processors"
)
}
}
}

// AGP +9 migration
kotlin {
compilerOptions {
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
}
}

dependencies {
Expand Down
2 changes: 2 additions & 0 deletions android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
android.useAndroidX=true
android.enableJetifier=true
# to fix Could not close incremental caches
kotlin.incremental=false
# Keep legacy Kotlin/AGP behavior until Flutter plugins migrate to built-in Kotlin.
android.builtInKotlin=false
android.newDsl=false
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-all.zip
4 changes: 2 additions & 2 deletions android/settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ pluginManagement {

plugins {
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
id("com.android.application") version "8.11.1" apply false
id("org.jetbrains.kotlin.android") version "2.2.20" apply false
id("com.android.application") version "9.0.1" apply false
id("org.jetbrains.kotlin.android") version "2.3.20" apply false
}

include(":app")
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ dependencies:
# UI Components - Markdown Rendering
markdown: ^7.3.0
pdfrx: ^2.4.3
flutter_inappwebview: ^6.1.5
socket_io_client: ^3.1.2
flutter_inappwebview: ^6.2.0-beta.3
socket_io_client: 3.1.2

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 pubspec.lock still resolves 3.1.4, not 3.1.2

The committed pubspec.lock still pins socket_io_client to 3.1.4 (the sha256 and version fields are unchanged from the base commit). Any CI pipeline running dart pub get --enforce-lockfile — which many reproduce-build setups use — will fail immediately because 3.1.4 doesn't satisfy the new exact constraint 3.1.2. The lock file must be regenerated with flutter pub get and committed alongside this change for the fix to be complete and for the lock file to match what the PR description claims was already done.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Using an exact pin (3.1.2) completely blocks any future patch releases that fix unrelated bugs. A tighter upper bound accomplishes the same goal of excluding the broken 3.1.5 while still allowing safe earlier patches.

Suggested change
socket_io_client: 3.1.2
socket_io_client: ">=3.1.2 <3.1.5"

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

yaml: ^3.1.2


Expand Down