File tree Expand file tree Collapse file tree 3 files changed +35
-0
lines changed Expand file tree Collapse file tree 3 files changed +35
-0
lines changed Original file line number Diff line number Diff line change
1
+ import org.gradle.jvm.tasks.Jar
1
2
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
2
3
3
4
plugins {
@@ -53,6 +54,24 @@ kotlin {
53
54
}
54
55
}
55
56
57
+ java {
58
+ sourceSets {
59
+ val java9 by java.sourceSets.creating
60
+ val a by configurations.commonMainApi
61
+ configurations.getByName(" jvmJava9Api" ).extendsFrom(a)
62
+ }
63
+ }
64
+
65
+ tasks.getByName(" jvmJar" , Jar ::class ) {
66
+ manifest {
67
+ attributes(" Multi-Release" to " true" )
68
+ }
69
+ into(" META-INF/versions/9" ) {
70
+ val java9 by sourceSets.getting
71
+ from(java9.output)
72
+ }
73
+ }
74
+
56
75
tasks.withType<Test > {
57
76
testLogging {
58
77
events(" passed" , " skipped" , " failed" )
@@ -65,3 +84,7 @@ tasks.withType<JavaCompile> {
65
84
sourceCompatibility = " 1.8"
66
85
}
67
86
87
+ tasks.getByName(" compileJava9Java" , JavaCompile ::class ) {
88
+ targetCompatibility = " 1.9"
89
+ sourceCompatibility = " 1.9"
90
+ }
Original file line number Diff line number Diff line change
1
+ module space .iseki .bencoding {
2
+ requires kotlin .stdlib ;
3
+ requires kotlinx .serialization .core ;
4
+ exports space .iseki .bencoding ;
5
+ }
Original file line number Diff line number Diff line change
1
+ package space .iseki .bencoding ;
2
+
3
+ /**
4
+ * Placeholder class for JPMS
5
+ */
6
+ class PlaceHolder {
7
+ }
You can’t perform that action at this time.
0 commit comments