Skip to content

Commit

Permalink
Merge pull request #921 from s1ck/master
Browse files Browse the repository at this point in the history
Remove org.apache related pom files from META-INF
  • Loading branch information
s1ck authored Jun 3, 2019
2 parents a255e32 + ae08812 commit 1dc2580
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
23 changes: 23 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ subprojects {
}
}

task licenseFile {
outputs.file(project.parent.file('LICENSE.txt'))
}

task dependencySearch(type: DependencyInsightReportTask) {
description 'Searches all projects for a dependency'
group 'help'
Expand All @@ -102,6 +106,25 @@ subprojects {
}
}
}

// copied from https://stackoverflow.com/a/38058671/568723
task depSize {
description 'Lists all dependencies sorted by their size'
doLast {
final formatStr = "%,10.2f"
final conf = configurations.default
final size = conf.collect { it.length() / (1024 * 1024) }.sum()
final out = new StringBuffer()
out << 'Total dependencies size:'.padRight(45)
out << "${String.format(formatStr, size)} Mb\n\n"
conf.sort { -it.length() }
.each {
out << "${it.name}".padRight(45)
out << "${String.format(formatStr, (it.length() / 1024))} kb\n"
}
println(out)
}
}
}

apply from: 'build.publishing.gradle'
Expand Down
4 changes: 4 additions & 0 deletions okapi-shade/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,15 @@ shadowJar {
exclude(dependency("$it:"))
}
}
exclude "META-INF/maven/org.apache*/**"
exclude "META-INF/versions/**/*"
exclude "META-INF/services/**/*"
exclude "META-INF/NOTICE*"
exclude "META-INF/LICENSE*"
exclude "META-INF/DEPENDENCIES*"
exclude "utf8.json"

metaInf { from tasks.licenseFile }
}

assemble.dependsOn shadowJar

0 comments on commit 1dc2580

Please sign in to comment.