Skip to content

Commit 61f86c3

Browse files
committed
Modularize scala modules.
1 parent 5135f87 commit 61f86c3

File tree

5 files changed

+39
-15
lines changed

5 files changed

+39
-15
lines changed

build.gradle

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ plugins {
1010

1111
subprojects {
1212
apply plugin: 'java-library'
13+
apply plugin: 'org.beryx.jar'
1314
apply from: rootProject.file('gradle/check-checkstyle.gradle')
1415
apply from: rootProject.file('gradle/check-codecoverage.gradle')
1516
apply from: rootProject.file('gradle/check-errorprone.gradle')
@@ -46,15 +47,11 @@ subprojects {
4647
options.release = 11
4748
}
4849

49-
if (!it.name.startsWith('xpath-to-xml-scala')) {
50-
apply plugin: 'org.beryx.jar'
51-
52-
moduleConfig {
53-
moduleInfoPath = 'src/main/module/module-info.java'
54-
multiReleaseVersion = 11
55-
version = project.version
56-
neverCompileModuleInfo = true
57-
}
50+
moduleConfig {
51+
moduleInfoPath = 'src/main/module/module-info.java'
52+
multiReleaseVersion = 11
53+
version = project.version
54+
neverCompileModuleInfo = true
5855
}
5956

6057
test {
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
module com.github.simych.xpath.core {
2-
requires transitive java.xml;
2+
requires transitive java.xml;
33

4-
exports com.github.simy4.xpath;
5-
exports com.github.simy4.xpath.navigator;
6-
exports com.github.simy4.xpath.spi;
7-
exports com.github.simy4.xpath.util;
4+
exports com.github.simy4.xpath;
5+
exports com.github.simy4.xpath.navigator;
6+
exports com.github.simy4.xpath.spi;
7+
exports com.github.simy4.xpath.util;
88

9-
uses com.github.simy4.xpath.spi.NavigatorSpi;
9+
uses com.github.simy4.xpath.spi.NavigatorSpi;
1010
}

xpath-to-xml-scala/build-3.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ dependencies {
2323
testImplementation libs.bundles.scalatest.v3
2424
}
2525

26+
moduleConfig {
27+
moduleInfoPath = 'src/main/module-3/module-info.java'
28+
}
29+
2630
javadocJar {
2731
dependsOn scaladoc
2832
from scaladoc
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
module com.github.simych.xpath.scala {
2+
requires transitive com.github.simych.xpath.core;
3+
requires org.scala.lang.scala3.library;
4+
requires scala.library;
5+
requires scala.xml;
6+
7+
exports com.github.simy4.xpath.scala;
8+
exports com.github.simy4.xpath.scala.impl;
9+
10+
provides com.github.simy4.xpath.spi.NavigatorSpi with
11+
com.github.simy4.xpath.scala.spi.ScalaXmlNavigatorSpi;
12+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module com.github.simych.xpath.scala {
2+
requires transitive com.github.simych.xpath.core;
3+
requires scala.library;
4+
requires scala.xml;
5+
6+
exports com.github.simy4.xpath.scala;
7+
exports com.github.simy4.xpath.scala.impl;
8+
9+
provides com.github.simy4.xpath.spi.NavigatorSpi with
10+
com.github.simy4.xpath.scala.spi.ScalaXmlNavigatorSpi;
11+
}

0 commit comments

Comments
 (0)