Revert "Add snippet to ensure baseline.profm file is sorted"
This reverts commit 7e5c5f5e7f.
The issue has been long resolved making this fix no longer required.
This commit is contained in:
parent
883fa96f64
commit
0934f62fe7
1 changed files with 0 additions and 26 deletions
|
|
@ -1,7 +1,3 @@
|
||||||
import com.android.tools.profgen.ArtProfileKt
|
|
||||||
import com.android.tools.profgen.ArtProfileSerializer
|
|
||||||
import com.android.tools.profgen.DexFile
|
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id "com.android.application"
|
id "com.android.application"
|
||||||
id "kotlin-android"
|
id "kotlin-android"
|
||||||
|
|
@ -336,25 +332,3 @@ static String getGitWorkingBranch() {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// fix reproducible builds
|
|
||||||
project.afterEvaluate {
|
|
||||||
tasks.compileReleaseArtProfile.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, "")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue