Skip to content

Commit 68f8631

Browse files
committed
moving to JPMS
1 parent 1181ae3 commit 68f8631

File tree

5 files changed

+47
-8
lines changed

5 files changed

+47
-8
lines changed

.gitignore

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,10 @@
4949
#.idea/
5050
#build/
5151

52-
#.idea/
52+
#.idea/
53+
# Project exclude paths
54+
/.gradle/
55+
/build/
56+
/out/
57+
/out/production/classes/
58+
/out/test/classes/

.idea/modules.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules/kotlin-unsigned.iml

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build.gradle

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,39 @@ task javadocJar(type: Jar, dependsOn: javadoc) {
3434

3535
artifacts {
3636
archives sourcesJar
37-
archives javadocJar
37+
// archives javadocJar
38+
}
39+
40+
compileKotlin {
41+
// Enable Kotlin compilation to Java 8 class files with method parameter name metadata
42+
kotlinOptions{
43+
jvmTarget = "1.8"
44+
// javaParameters = true
45+
}
46+
// As per https://stackoverflow.com/a/47669720
47+
// See also https://discuss.kotlinlang.org/t/kotlin-support-for-java-9-module-system/2499/9
48+
// destinationDir = compileJava.destinationDir
49+
}
50+
51+
compileTestKotlin {
52+
kotlinOptions{
53+
jvmTarget = "1.8"
54+
// javaParameters = true
55+
}
56+
}
57+
58+
compileJava {
59+
dependsOn(':compileKotlin')
60+
doFirst {
61+
options.compilerArgs = ['--module-path', classpath.asPath,]
62+
classpath = files()
63+
}
3864
}
3965

4066
jar {
41-
inputs.property("moduleName", moduleName)
42-
manifest.attributes('Automatic-Module-Name': moduleName)
67+
// inputs.property("moduleName", moduleName)
68+
// manifest.attributes('Automatic-Module-Name': moduleName)
69+
// duplicatesStrategy = DuplicatesStrategy.EXCLUDE
4370
}
4471

4572
test.useJUnitPlatform()

src/main/java/module-info.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module com.github.kotlin_graphics.kotlin_unsigned {
2+
requires kotlin.stdlib;
3+
// requires kotlin.stdlib.jdk8;
4+
5+
exports unsigned;
6+
}

0 commit comments

Comments
 (0)