Skip to content

Commit 320c693

Browse files
committed
Revert "Add snippet to ensure baseline.profm file is sorted"
This reverts commit 1db1a00. The issue has been long resolved making this fix no longer required.
1 parent eee1172 commit 320c693

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

app/build.gradle

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
import com.android.tools.profgen.ArtProfileKt
2-
import com.android.tools.profgen.ArtProfileSerializer
3-
import com.android.tools.profgen.DexFile
4-
51
plugins {
62
id "com.android.application"
73
id "kotlin-android"
@@ -336,25 +332,3 @@ static String getGitWorkingBranch() {
336332
return ""
337333
}
338334
}
339-
340-
// fix reproducible builds
341-
project.afterEvaluate {
342-
tasks.compileReleaseArtProfile.doLast {
343-
outputs.files.each { file ->
344-
if (file.toString().endsWith(".profm")) {
345-
println("Sorting ${file} ...")
346-
def version = ArtProfileSerializer.valueOf("METADATA_0_0_2")
347-
def profile = ArtProfileKt.ArtProfile(file)
348-
def keys = new ArrayList(profile.profileData.keySet())
349-
def sortedData = new LinkedHashMap()
350-
Collections.sort keys, new DexFile.Companion()
351-
keys.each { key -> sortedData[key] = profile.profileData[key] }
352-
new FileOutputStream(file).with {
353-
write(version.magicBytes$profgen)
354-
write(version.versionBytes$profgen)
355-
version.write$profgen(it, sortedData, "")
356-
}
357-
}
358-
}
359-
}
360-
}

0 commit comments

Comments
 (0)