File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -108,6 +108,13 @@ task generateLicenses(type: nl.javadude.gradle.plugins.license.DownloadLicenses)
108108 // Works around issue where the plugin looks at the deprecated 'compile'
109109 // configuration by default.
110110 dependencyConfiguration = ' runtimeClasspath'
111+
112+ // Excludes dependencies on subprojects. These should not be in the license
113+ // report since they are part of this library. The license-report plugin
114+ // will accept regexes here as well, but explicitly listing projects ensures
115+ // the exclusion is precise.
116+ excludeDependencies = rootProject. allprojects
117+ .collect { it. group + ' :' + it. name + ' :' + it. version }
111118}
112119
113120task verifyLicenses () {
@@ -253,7 +260,12 @@ task copyThirdPartySources(type: Copy) {
253260
254261// Copies the third party binaries to the third_party folder.
255262task copyThirdPartyBinaries (type : Copy ) {
256- from configurations. runtimeClasspath
263+ from configurations. runtimeClasspath {
264+ // Excludes JARs for the root project and its subprojects.
265+ exclude(
266+ rootProject. allprojects. collect { it. name + " -" + it. version + " .jar" }
267+ )
268+ }
257269 into tasks. generateThirdPartyDirectory. thirdPartyDir
258270}
259271
You can’t perform that action at this time.
0 commit comments