Skip to content

Commit 6612498

Browse files
author
haileyajohnson
authored
Merge pull request #807 from lesserwhirls/license
[5.x]: Include LICENSE in jars published to nexus
2 parents 5a53d1d + e04b3dc commit 6612498

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

gradle/any/archiving.gradle

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
// Safe for root project: no plugins applied.
2+
import java.nio.file.Paths
3+
4+
def license = Paths.get(rootDir.absolutePath, 'LICENSE')
25

36
tasks.withType(Jar).all { // Applies to Jar, War, Ear and ShadowJar tasks.
47
// Fails the build when an attempt is made to add a duplicate entry to an archive.
@@ -25,4 +28,8 @@ tasks.withType(Jar).all { // Applies to Jar, War, Ear and ShadowJar tasks.
2528
// Gradle's incremental build machinery.
2629
manifest.attributes 'Built-On': project.buildTimestamp // Defined in root project.
2730
}
31+
32+
from(license) {
33+
into 'META-INF/'
34+
}
2835
}

0 commit comments

Comments
 (0)