Skip to content

Commit

Permalink
Simplify jar filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
aalmiray committed Nov 9, 2020
1 parent c872815 commit 2998aea
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,18 @@ subprojects { subproj ->
exclude '**/*.md'
exclude '**/*.txt'
}
}
}

subproj.gradle.addBuildListener(new BuildAdapter() {
@Override
void projectsEvaluated(Gradle gradle) {
subproj.tasks.withType(Jar).each { Jar jar ->
project.rootProject.gradle.addBuildListener(new BuildAdapter() {
@Override
void projectsEvaluated(Gradle gradle) {
gradle.rootProject.childProjects.values()
.grep({ p -> p.name.endsWith('-pack') })
.each { p ->
p.tasks.withType(Jar).each { Jar jar ->
jar.configure {
exclude '**/*.css'
exclude '**/*.otf'
exclude '**/*.eot'
exclude '**/*.svg'
Expand All @@ -123,6 +129,5 @@ subprojects { subproj ->
}
}
}
})
}
}
})

0 comments on commit 2998aea

Please sign in to comment.