Skip to content

Commit 30a8735

Browse files
committed
Apply License File to Each Jar
Closes gh-1176
1 parent fb082d3 commit 30a8735

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

buildSrc/src/main/groovy/io/spring/gradle/convention/SpringModulePlugin.groovy

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import org.gradle.api.JavaVersion
2020
import org.gradle.api.Project
2121
import org.gradle.api.plugins.JavaLibraryPlugin
2222
import org.gradle.api.plugins.PluginManager
23+
import org.gradle.api.tasks.bundling.Jar
2324
import org.springframework.gradle.maven.SpringMavenPlugin
2425

2526
/**
@@ -40,6 +41,11 @@ class SpringModulePlugin extends AbstractSpringJavaPlugin {
4041
if (!Utils.isRelease(project)) {
4142
deployArtifacts.dependsOn project.tasks.artifactoryPublish
4243
}
44+
project.tasks.withType(Jar) {
45+
from(project.rootProject.files('LICENSE.txt')) {
46+
into('META-INF')
47+
}
48+
}
4349
}
4450

4551
}

0 commit comments

Comments
 (0)