Skip to content

Commit

Permalink
Merge pull request #5312 from bjhargrave/gradle-configureeach
Browse files Browse the repository at this point in the history
gradle: Use configureEach on task groups
  • Loading branch information
bjhargrave committed Jul 11, 2022
2 parents cd6f687 + b5c2b0a commit 78c1a88
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions gradle-plugins/biz.aQute.bnd.gradle/build.gradle.kts
Expand Up @@ -183,24 +183,24 @@ publishing {
// Handle JPMS options
val jpmsOptions: List<String>? by rootProject.extra
jpmsOptions?.let {
tasks.withType<GroovyCompile> {
tasks.withType<GroovyCompile>().configureEach {
groovyOptions.fork(mapOf("jvmArgs" to it))
}
}

// Disable gradle module metadata
tasks.withType<GenerateModuleMetadata> {
tasks.withType<GenerateModuleMetadata>().configureEach {
enabled = false
}

// Reproducible jars
tasks.withType<AbstractArchiveTask> {
tasks.withType<AbstractArchiveTask>().configureEach {
isPreserveFileTimestamps = false
isReproducibleFileOrder = true
}

// Reproducible javadoc
tasks.withType<Javadoc> {
tasks.withType<Javadoc>().configureEach {
options {
this as StandardJavadocDocletOptions // unsafe cast
isNoTimestamp = true
Expand Down

0 comments on commit 78c1a88

Please sign in to comment.