@@ -11,6 +11,7 @@ val clonerModules = listOf(
11
11
project(" :jdk8" ),
12
12
project(" :jdk9" ),
13
13
project(" :jdk9-module" ),
14
+ project(" :jdk15" ),
14
15
project(" :jdk16" ),
15
16
)
16
17
@@ -34,14 +35,14 @@ jarTasks.forEach {
34
35
mapOf (
35
36
" Implementation-Title" to project.name,
36
37
" Implementation-Version" to project.version,
38
+ " Multi-Release" to true ,
37
39
" Automatic-Module-Name" to " io.github.sugarcubes.cloner" ,
38
40
" Created-By" to
39
41
System .getProperty(" java.version" ) + " " + System .getProperty(" java.specification.vendor" ),
40
42
)
41
43
)
42
44
43
45
clonerModules.forEach {
44
- from(it.sourceSets.main.get().output)
45
46
manifest {
46
47
attributes(it.tasks.jar.get().manifest.attributes)
47
48
}
@@ -52,9 +53,26 @@ jarTasks.forEach {
52
53
53
54
tasks.named<Jar >(" jar" ) {
54
55
56
+ from(project(" :jdk8" ).sourceSets.main.get().output)
57
+
58
+ into(" META-INF/versions/9" ) {
59
+ from(project(" :jdk9" ).sourceSets.main.get().output)
60
+ from(project(" :jdk9-module" ).sourceSets.main.get().output) {
61
+ // exclude placeholder
62
+ exclude(" **/$$$.*" )
63
+ }
64
+ }
65
+
66
+ into(" META-INF/versions/15" ) {
67
+ from(project(" :jdk15" ).sourceSets.main.get().output)
68
+ }
69
+
70
+ into(" META-INF/versions/16" ) {
71
+ from(project(" :jdk16" ).sourceSets.main.get().output)
72
+ }
73
+
55
74
clonerModules.forEach {
56
75
dependsOn(it.tasks.named<Jar >(" jar" ))
57
- from(it.sourceSets.main.get().output)
58
76
manifest {
59
77
attributes(it.tasks.jar.get().manifest.attributes)
60
78
}
@@ -87,7 +105,7 @@ tasks.withType<Javadoc> {
87
105
// opts.addBooleanOption("J--add-exports=java.base/jdk.internal.misc=io.github.sugarcubes.cloner", true)
88
106
89
107
// exclude placeholder
90
- exclude(" **/_* .*" )
108
+ exclude(" **/$$$ .*" )
91
109
92
110
exclude(" **/JdkInternalMiscUnsafeBridge.*" )
93
111
}
@@ -97,10 +115,10 @@ tasks.named<Jar>("sourcesJar") {
97
115
from(it.sourceSets.main.get().allSource)
98
116
}
99
117
100
- exclude( " **/*.class " )
118
+ duplicatesStrategy = DuplicatesStrategy . INCLUDE
101
119
102
120
// exclude placeholder
103
- exclude(" **/_* .*" )
121
+ exclude(" **/$$$ .*" )
104
122
}
105
123
106
124
publishing {
0 commit comments