From e82744ba05db7277d5948a0e7e34a551a726555b Mon Sep 17 00:00:00 2001 From: Niels van Velzen Date: Sat, 27 Apr 2024 17:33:26 +0200 Subject: [PATCH] Remove baseline workaround (#1365) We temporarily added this to fix reproducible builds. We've since upgrades to a newer version of the Android Gradle Plugin that fixes the bug we worked around. As such we can remove it. --- app/baselineWorkaround.gradle | 39 ----------------------------------- app/build.gradle.kts | 3 --- 2 files changed, 42 deletions(-) delete mode 100644 app/baselineWorkaround.gradle diff --git a/app/baselineWorkaround.gradle b/app/baselineWorkaround.gradle deleted file mode 100644 index 7edfd6ef9..000000000 --- a/app/baselineWorkaround.gradle +++ /dev/null @@ -1,39 +0,0 @@ -buildscript { - repositories { - mavenCentral() - google() - } - - dependencies { - classpath libs.android.gradle - } -} - -import com.android.tools.profgen.ArtProfileKt -import com.android.tools.profgen.ArtProfileSerializer -import com.android.tools.profgen.DexFile - -/** - * This is a temporary workaround for https://issuetracker.google.com/issues/231837768 - * which will be fixed in AGP 8.1.0, at which point the workaround may be deleted. - */ -project.afterEvaluate { - tasks.compileLibreReleaseArtProfile.doLast { - outputs.files.each { file -> - if (file.toString().endsWith(".profm")) { - println("Sorting ${file}") - def version = ArtProfileSerializer.valueOf("METADATA_0_0_2") - def profile = ArtProfileKt.ArtProfile(file) - def keys = new ArrayList(profile.profileData.keySet()) - def sortedData = new LinkedHashMap() - Collections.sort keys, new DexFile.Companion() - keys.each { key -> sortedData[key] = profile.profileData[key] } - new FileOutputStream(file).with { - write(version.magicBytes$profgen) - write(version.versionBytes$profgen) - version.write$profgen(it, sortedData, "") - } - } - } - } -} diff --git a/app/build.gradle.kts b/app/build.gradle.kts index e9e0789d1..369baea5f 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -10,9 +10,6 @@ plugins { alias(libs.plugins.android.junit5) } -// Apply workaround -apply("baselineWorkaround.gradle") - detekt { buildUponDefaultConfig = true allRules = false