Removes the bugfix for reproducible builds since it has been fixed.
This commit is contained in:
+2
-32
@@ -1,3 +1,5 @@
|
|||||||
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
alias(libs.plugins.androidApplication)
|
alias(libs.plugins.androidApplication)
|
||||||
alias(libs.plugins.jetbrainsKotlinAndroid)
|
alias(libs.plugins.jetbrainsKotlinAndroid)
|
||||||
@@ -293,35 +295,3 @@ dependencies {
|
|||||||
debugImplementation libs.androidx.ui.test.manifest
|
debugImplementation libs.androidx.ui.test.manifest
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://gitlab.com/fdroid/wiki/-/wikis/HOWTO:-diff-&-fix-APKs-for-Reproducible-Builds#differing-assetsdexoptbaselineprofm-easy-to-fix
|
|
||||||
// NB: Android Studio can't find the imports; this does not affect the
|
|
||||||
// actual build since Gradle can find them just fine.
|
|
||||||
import com.android.tools.profgen.ArtProfileKt
|
|
||||||
import com.android.tools.profgen.ArtProfileSerializer
|
|
||||||
import com.android.tools.profgen.DexFile
|
|
||||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
|
||||||
|
|
||||||
project.afterEvaluate {
|
|
||||||
tasks.each { task ->
|
|
||||||
if (task.name.startsWith("compile") && task.name.endsWith("ReleaseArtProfile")) {
|
|
||||||
task.doLast {
|
|
||||||
outputs.files.each { file ->
|
|
||||||
if (file.name.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, "")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user