Skip to content

Commit d777dc0

Browse files
committed
Add module-info.java modules to most modules. Note that kotlinx.io does
not properly publish its module-info so is not enabled at the moment.
1 parent 7682c03 commit d777dc0

File tree

13 files changed

+138
-67
lines changed

13 files changed

+138
-67
lines changed
Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,29 @@
11
module net.devrieze.xmlutil.core {
22
requires transitive kotlin.stdlib;
3-
requires kotlinx.serialization.core;
4-
requires java.xml;
3+
requires static kotlinx.serialization.core;
4+
requires static java.xml;
55

66
exports nl.adaptivity.xmlutil;
77
exports nl.adaptivity.xmlutil.core;
8+
exports nl.adaptivity.xmlutil.core.impl to
9+
net.devrieze.xmlutil.core.jdk, net.devrieze.xmlutil.serialization;
10+
exports nl.adaptivity.xmlutil.core.impl.idom to
11+
net.devrieze.xmlutil.serialization;
12+
exports nl.adaptivity.xmlutil.core.impl.multiplatform to
13+
io.github.pdvrieze.testutil, net.devrieze.xmlutil.serialization,
14+
io.github.pdvrieze.xmlutil.xmlschema, net.devrieze.xmlutil.xmlserializable;
15+
exports nl.adaptivity.xmlutil.core.internal to
16+
net.devrieze.xmlutil.serialization, io.github.pdvrieze.xmlutil.xmlschema;
817
exports nl.adaptivity.xmlutil.dom;
918
exports nl.adaptivity.xmlutil.dom2;
1019
exports nl.adaptivity.xmlutil.util;
20+
exports nl.adaptivity.xmlutil.util.impl to
21+
net.devrieze.xmlutil.serialization;
22+
23+
// Note that while a generic implementation is provided, this is not published (so providers
24+
// can better override it).
25+
uses nl.adaptivity.xmlutil.XmlStreamingFactory;
26+
27+
provides nl.adaptivity.xmlutil.util.SerializationProvider
28+
with nl.adaptivity.xmlutil.util.DefaultSerializationProvider;
1129
}

core/jdk/build.gradle.kts

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
/*
2-
* Copyright (c) 2024.
2+
* Copyright (c) 2024-2025.
33
*
44
* This file is part of xmlutil.
55
*
6-
* This file is licenced to you under the Apache License, Version 2.0 (the
7-
* "License"); you may not use this file except in compliance
8-
* with the License. You should have received a copy of the license with the source distribution.
9-
* Alternatively, you may obtain a copy of the License at
6+
* This file is licenced to you under the Apache License, Version 2.0
7+
* (the "License"); you may not use this file except in compliance
8+
* with the License. You should have received a copy of the license
9+
* with the source distribution. Alternatively, you may obtain a copy
10+
* of the License at
1011
*
1112
* http://www.apache.org/licenses/LICENSE-2.0
1213
*
13-
* Unless required by applicable law or agreed to in writing,
14-
* software distributed under the License is distributed on an
15-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16-
* KIND, either express or implied. See the License for the
17-
* specific language governing permissions and limitations
18-
* under the License.
14+
* Unless required by applicable law or agreed to in writing, software
15+
* distributed under the License is distributed on an "AS IS" BASIS,
16+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
17+
* implied. See the License for the specific language governing
18+
* permissions and limitations under the License.
1919
*/
2020

2121
import kotlinx.validation.ExperimentalBCVApi
@@ -40,8 +40,6 @@ config {
4040
dokkaOverrideTarget = "Jdk"
4141
}
4242

43-
val autoModuleName = "net.devrieze.xmlutil.core.jdk"
44-
4543
kotlin {
4644
explicitApi()
4745

@@ -51,9 +49,6 @@ kotlin {
5149
rename { "xmlutil-proguard.pro" }
5250
into("META-INF/proguard")
5351
}
54-
manifest {
55-
attributes("Automatic-Module-Name" to autoModuleName)
56-
}
5752
}
5853

5954
mavenPublication {
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module net.devrieze.xmlutil.core.jdk {
2+
requires transitive net.devrieze.xmlutil.core;
3+
requires static java.xml;
4+
5+
exports nl.adaptivity.xmlutil.jdk;
6+
7+
provides nl.adaptivity.xmlutil.XmlStreamingFactory
8+
with nl.adaptivity.xmlutil.jdk.StAXStreamingFactory;
9+
}

gradle/libs.versions.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
[versions]
22
apiVersion = "2.0"
3-
binaryValidator = "0.16.3"
4-
dateTime = "0.6.1"
3+
binaryValidator = "0.16.3" # 0.18.0
4+
dateTime = "0.6.1" # 0.7.0
55
dokka = "2.0.0"
66
javaVersion = "8"
77
jmh = "0.7.2"
88
jmh-core = "1.37"
9-
benchmark = "0.4.11"
9+
benchmark = "0.4.11" #0.4.14
1010
junit5-jupiter = "5.11.4"
1111
kotlin = "2.2.0"
1212
kotlinx-serialization = "1.8.1"
13-
kotlinx-io = "0.5.4"
13+
kotlinx-io = "0.8.0"
1414
kxml2 = "2.3.0"
1515
woodstox = "7.1.0"
1616
xmlutil = "0.91.2-SNAPSHOT"

serialization-io/build.gradle.kts

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
/*
2-
* Copyright (c) 2024.
2+
* Copyright (c) 2024-2025.
33
*
44
* This file is part of xmlutil.
55
*
6-
* This file is licenced to you under the Apache License, Version 2.0 (the
7-
* "License"); you may not use this file except in compliance
8-
* with the License. You should have received a copy of the license with the source distribution.
9-
* Alternatively, you may obtain a copy of the License at
6+
* This file is licenced to you under the Apache License, Version 2.0
7+
* (the "License"); you may not use this file except in compliance
8+
* with the License. You should have received a copy of the license
9+
* with the source distribution. Alternatively, you may obtain a copy
10+
* of the License at
1011
*
1112
* http://www.apache.org/licenses/LICENSE-2.0
1213
*
13-
* Unless required by applicable law or agreed to in writing,
14-
* software distributed under the License is distributed on an
15-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16-
* KIND, either express or implied. See the License for the
17-
* specific language governing permissions and limitations
18-
* under the License.
14+
* Unless required by applicable law or agreed to in writing, software
15+
* distributed under the License is distributed on an "AS IS" BASIS,
16+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
17+
* implied. See the License for the specific language governing
18+
* permissions and limitations under the License.
1919
*/
2020

2121
import net.devrieze.gradle.ext.addNativeTargets
@@ -36,6 +36,10 @@ plugins {
3636

3737
val autoModuleName = "net.devrieze.xmlutil.serialization.kxio"
3838

39+
config {
40+
generateJavaModules = false
41+
}
42+
3943
kotlin {
4044
explicitApi()
4145
applyDefaultXmlUtilHierarchyTemplate()
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module net.devrieze.xmlutil.serialization.kxio {
2+
requires transitive net.devrieze.xmlutil.serialization;
3+
requires transitive kotlinx.io.core;
4+
5+
exports net.devrieze.xmlutil.serialization.kxio;
6+
}

serialization/build.gradle.kts

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
/*
2-
* Copyright (c) 2024.
2+
* Copyright (c) 2024-2025.
33
*
44
* This file is part of xmlutil.
55
*
6-
* This file is licenced to you under the Apache License, Version 2.0 (the
7-
* "License"); you may not use this file except in compliance
8-
* with the License. You should have received a copy of the license with the source distribution.
9-
* Alternatively, you may obtain a copy of the License at
6+
* This file is licenced to you under the Apache License, Version 2.0
7+
* (the "License"); you may not use this file except in compliance
8+
* with the License. You should have received a copy of the license
9+
* with the source distribution. Alternatively, you may obtain a copy
10+
* of the License at
1011
*
1112
* http://www.apache.org/licenses/LICENSE-2.0
1213
*
13-
* Unless required by applicable law or agreed to in writing,
14-
* software distributed under the License is distributed on an
15-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16-
* KIND, either express or implied. See the License for the
17-
* specific language governing permissions and limitations
18-
* under the License.
14+
* Unless required by applicable law or agreed to in writing, software
15+
* distributed under the License is distributed on an "AS IS" BASIS,
16+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
17+
* implied. See the License for the specific language governing
18+
* permissions and limitations under the License.
1919
*/
2020

2121

@@ -45,21 +45,11 @@ base {
4545
archivesName = "serialization"
4646
}
4747

48-
val autoModuleName = "net.devrieze.xmlutil.serialization"
49-
50-
5148
kotlin {
5249
applyDefaultXmlUtilHierarchyTemplate()
5350
explicitApi()
5451

5552
jvm {
56-
compilations.all {
57-
tasks.named<Jar>("jvmJar") {
58-
manifest {
59-
attributes("Automatic-Module-Name" to autoModuleName)
60-
}
61-
}
62-
}
6353

6454
/*
6555
val woodstoxCompilation = compilations.create("woodstoxTest") {
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module net.devrieze.xmlutil.serialization {
2+
requires transitive net.devrieze.xmlutil.core;
3+
requires transitive kotlinx.serialization.core;
4+
requires java.xml;
5+
6+
exports nl.adaptivity.xmlutil.serialization;
7+
exports nl.adaptivity.xmlutil.serialization.structure;
8+
}

serialutil/build.gradle.kts

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
/*
2-
* Copyright (c) 2024.
2+
* Copyright (c) 2024-2025.
33
*
44
* This file is part of xmlutil.
55
*
6-
* This file is licenced to you under the Apache License, Version 2.0 (the
7-
* "License"); you may not use this file except in compliance
8-
* with the License. You should have received a copy of the license with the source distribution.
9-
* Alternatively, you may obtain a copy of the License at
6+
* This file is licenced to you under the Apache License, Version 2.0
7+
* (the "License"); you may not use this file except in compliance
8+
* with the License. You should have received a copy of the license
9+
* with the source distribution. Alternatively, you may obtain a copy
10+
* of the License at
1011
*
1112
* http://www.apache.org/licenses/LICENSE-2.0
1213
*
13-
* Unless required by applicable law or agreed to in writing,
14-
* software distributed under the License is distributed on an
15-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16-
* KIND, either express or implied. See the License for the
17-
* specific language governing permissions and limitations
18-
* under the License.
14+
* Unless required by applicable law or agreed to in writing, software
15+
* distributed under the License is distributed on an "AS IS" BASIS,
16+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
17+
* implied. See the License for the specific language governing
18+
* permissions and limitations under the License.
1919
*/
2020

2121
@file:Suppress("PropertyName")
@@ -46,8 +46,6 @@ config {
4646
createAndroidCompatComponent = true
4747
}
4848

49-
val autoModuleName = "net.devrieze.serialutil"
50-
5149
kotlin {
5250
applyDefaultXmlUtilHierarchyTemplate()
5351
jvm()
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module net.devrieze.serialutil {
2+
requires transitive kotlinx.serialization.core;
3+
4+
exports nl.adaptivity.serialutil;
5+
exports nl.adaptivity.serialutil.encoders;
6+
}

0 commit comments

Comments
 (0)