Skip to content

Commit 4a0169d

Browse files
Warkdevremkop
authored andcommitted
Update build.gradle
- Add org.beryx.jar plugin to allow META-INF/versions/9 folder to be created when doing a jar of this subproject. (see moditect/moditect#67 & https://dzone.com/articles/how-to-create-modular-jars-that-target-a-java-rele) - Change compatibility level to Java 1.8 to trigger the plugin. - Update of the Manifest title.
1 parent 11c4839 commit 4a0169d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

picocli-core-module/build.gradle

+7-7
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@ plugins {
44
id 'maven-publish'
55
id 'com.jfrog.bintray'
66
id 'java-library'
7+
id 'org.beryx.jar' version '1.1.3'
78
}
89

910
group 'info.picocli'
1011
description 'Picocli JPMS module.'
1112
version "$projectVersion"
1213
ext.moduleName = 'info.picocli'
13-
sourceCompatibility = JavaVersion.VERSION_1_9
14-
targetCompatibility = JavaVersion.VERSION_1_9
14+
sourceCompatibility = JavaVersion.VERSION_1_8
15+
targetCompatibility = JavaVersion.VERSION_1_8
1516

1617
task copyRootProjectCode(type: Copy) {
1718
from("${rootProject.projectDir}/src/main/java"){
@@ -35,14 +36,13 @@ test {
3536
exclude 'picocli'
3637
}
3738

38-
task fatJar(type: Jar) {
39+
jar {
3940
manifest {
40-
attributes 'Implementation-Title': 'Gradle Jar File Example',
41-
'Implementation-Version': version
41+
attributes 'Implementation-Title': 'Picocli-core-module',
42+
'Implementation-Version': version
4243
}
4344
baseName = project.name + '-all'
44-
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
45-
with jar
45+
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
4646
}
4747

4848
compileJava.dependsOn(copyRootProjectCode)

0 commit comments

Comments
 (0)