Skip to content

Instantly share code, notes, and snippets.

@pgilad pgilad/build.gradle
Last active Dec 26, 2018

Embed
What would you like to do?
How to create reproducible builds in spring using buildInfo
tasks.withType(AbstractArchiveTask) {
preserveFileTimestamps = false
reproducibleFileOrder = true
}
springBoot {
mainClassName = 'com.blazemeter.dagger.DaggerApplication'
buildInfo {
properties {
time = null
}
// Watch https://github.com/spring-projects/spring-boot/issues/14494
// Remove comments because they add modified timestamps
doLast {
File f = new File(destinationDir, 'build-info.properties')
f.text = f.filterLine { !it.startsWith('#') }
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.