Skip to content

Commit

Permalink
Tweak dex.useLegacyPackaging setup
Browse files Browse the repository at this point in the history
  • Loading branch information
MateusRodCosta committed Oct 12, 2024
1 parent 00205be commit 1a08986
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,14 @@ android {
compose = true
}
packaging {
dex {
// This is set to false starting with minSdk >= 28, but I want uncompressed DEX files with minSdk 26
// According to https://developer.android.com/build/releases/past-releases/agp-4-2-0-release-notes#dex-files-uncompressed-in-apks-when-minsdk-=-28-or-higher:
//
// > This causes an increase in APK size, but it results in a smaller installation size on the device, and the download size is roughly the same.
//
// Currently this makes the APK ~1MB heavier
//
useLegacyPackaging = false
}
// This is set to false starting with minSdk >= 28, but I want uncompressed DEX files with minSdk 26
// According to https://developer.android.com/build/releases/past-releases/agp-4-2-0-release-notes#dex-files-uncompressed-in-apks-when-minsdk-=-28-or-higher:
//
// > This causes an increase in APK size, but it results in a smaller installation size on the device, and the download size is roughly the same.
//
// Currently this makes the APK ~1MB heavier
//
dex.useLegacyPackaging = false
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
}
Expand Down

0 comments on commit 1a08986

Please sign in to comment.