Skip to content

Commit 9453a84

Browse files
committed
#150 Include license file in the META-INF of published artifacts
1 parent 59644cd commit 9453a84

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

buildSrc/src/main/groovy/published-java-module.gradle

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,19 @@ java {
1818

1919
def moduleNameBase = project.name.startsWith( 'hibernate-' ) ? name.drop( 'hibernate-'.length() ): name
2020
def moduleName = "org.hibernate.$moduleNameBase".replace('-','.')
21+
def rootDir = project(":").projectDir
2122

2223
tasks.named("jar") {
2324
manifest {
2425
attributes(
2526
'Automatic-Module-Name': moduleName
2627
)
2728
}
29+
metaInf {
30+
from(rootDir, {
31+
include "LICENSE"
32+
})
33+
}
2834
}
2935

3036
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)