Skip to content

Commit 5f5f18e

Browse files
committed
Fix #887: use module-info.java natively
1 parent 39d30f2 commit 5f5f18e

File tree

5 files changed

+62
-22
lines changed

5 files changed

+62
-22
lines changed

pom.xml

+6-6
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,12 @@
9090
<artifactId>jackson-annotations</artifactId>
9191
</dependency>
9292

93+
<dependency>
94+
<groupId>org.jetbrains</groupId>
95+
<artifactId>annotations</artifactId>
96+
<version>26.0.1</version>
97+
<scope>provided</scope>
98+
</dependency>
9399
<dependency>
94100
<groupId>org.jetbrains.kotlin</groupId>
95101
<artifactId>kotlin-stdlib</artifactId>
@@ -207,12 +213,6 @@
207213
</configuration>
208214
</plugin>
209215

210-
<!-- 02-Nov-2020, tatu: Add JDK9+ module info with Moditect -->
211-
<plugin>
212-
<groupId>org.moditect</groupId>
213-
<artifactId>moditect-maven-plugin</artifactId>
214-
</plugin>
215-
216216
<!-- 05-Jul-2020, tatu: Add generation of Gradle Module Metadata -->
217217
<plugin>
218218
<groupId>de.jjohannes</groupId>

release-notes/VERSION

+1
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,5 @@ Former maintainers:
2424

2525
3.0.0 (not yet released)
2626

27+
#887: Change 3.0 to use `module-info.java` directly [JSTEP-11]
2728
- Minimum Java baseline: Java 17

src/main/java/module-info.java

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Kotlin module-info for Main artifact
2+
module com.fasterxml.jackson.kotlin
3+
{
4+
requires java.desktop;
5+
6+
requires kotlin.reflect;
7+
requires kotlin.stdlib;
8+
9+
requires com.fasterxml.jackson.annotation;
10+
requires tools.jackson.databind;
11+
12+
exports tools.jackson.module.kotlin;
13+
14+
// No 0-arg constructor, cannot register as a Service via SPI
15+
//provides tools.jackson.databind.JacksonModule with
16+
// tools.jackson.module.kotlin.KotlinModule;
17+
}

src/moditect/module-info.java

-16
This file was deleted.

src/test/kotlin/module-info.java

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// Kotline module-info for (unit) Tests
2+
module com.fasterxml.jackson.kotlin
3+
{
4+
// Since we are not split from Main artifact, will not
5+
// need to depend on Main artifact -- but need its dependencies
6+
7+
requires java.desktop;
8+
9+
requires kotlin.reflect;
10+
requires kotlin.stdlib;
11+
requires org.jetbrains.annotations;
12+
13+
requires com.fasterxml.jackson.annotation;
14+
requires tools.jackson.databind;
15+
16+
// Additional test lib/framework dependencies
17+
requires junit; // JUnit 4
18+
19+
// Other test deps
20+
21+
// Further, need to open up test packages for JUnit et al
22+
23+
opens tools.jackson.module.kotlin;
24+
opens tools.jackson.module.kotlin.kogeraIntegration;
25+
opens tools.jackson.module.kotlin.kogeraIntegration.deser;
26+
opens tools.jackson.module.kotlin.kogeraIntegration.deser.valueClass;
27+
opens tools.jackson.module.kotlin.kogeraIntegration.deser.valueClass.deserializer;
28+
opens tools.jackson.module.kotlin.kogeraIntegration.deser.valueClass.deserializer.byAnnotation;
29+
opens tools.jackson.module.kotlin.kogeraIntegration.deser.valueClass.deserializer.byAnnotation.specifiedForProperty;
30+
opens tools.jackson.module.kotlin.kogeraIntegration.deser.valueClass.jsonCreator;
31+
opens tools.jackson.module.kotlin.kogeraIntegration.deser.valueClass.parameterSize.nonNullObject;
32+
opens tools.jackson.module.kotlin.kogeraIntegration.deser.valueClass.parameterSize.nullableObject;
33+
opens tools.jackson.module.kotlin.kogeraIntegration.deser.valueClass.parameterSize.primitive;
34+
opens tools.jackson.module.kotlin.test;
35+
opens tools.jackson.module.kotlin.test.github;
36+
opens tools.jackson.module.kotlin.test.github.failing;
37+
opens tools.jackson.module.kotlin.test.github.parameterSize;
38+
}

0 commit comments

Comments
 (0)