Skip to content

Commit

Permalink
Modularize scala modules.
Browse files Browse the repository at this point in the history
  • Loading branch information
SimY4 committed Apr 7, 2023
1 parent 5135f87 commit 61f86c3
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 15 deletions.
15 changes: 6 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ plugins {

subprojects {
apply plugin: 'java-library'
apply plugin: 'org.beryx.jar'
apply from: rootProject.file('gradle/check-checkstyle.gradle')
apply from: rootProject.file('gradle/check-codecoverage.gradle')
apply from: rootProject.file('gradle/check-errorprone.gradle')
Expand Down Expand Up @@ -46,15 +47,11 @@ subprojects {
options.release = 11
}

if (!it.name.startsWith('xpath-to-xml-scala')) {
apply plugin: 'org.beryx.jar'

moduleConfig {
moduleInfoPath = 'src/main/module/module-info.java'
multiReleaseVersion = 11
version = project.version
neverCompileModuleInfo = true
}
moduleConfig {
moduleInfoPath = 'src/main/module/module-info.java'
multiReleaseVersion = 11
version = project.version
neverCompileModuleInfo = true
}

test {
Expand Down
12 changes: 6 additions & 6 deletions xpath-to-xml-core/src/main/module/module-info.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
module com.github.simych.xpath.core {
requires transitive java.xml;
requires transitive java.xml;

exports com.github.simy4.xpath;
exports com.github.simy4.xpath.navigator;
exports com.github.simy4.xpath.spi;
exports com.github.simy4.xpath.util;
exports com.github.simy4.xpath;
exports com.github.simy4.xpath.navigator;
exports com.github.simy4.xpath.spi;
exports com.github.simy4.xpath.util;

uses com.github.simy4.xpath.spi.NavigatorSpi;
uses com.github.simy4.xpath.spi.NavigatorSpi;
}
4 changes: 4 additions & 0 deletions xpath-to-xml-scala/build-3.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ dependencies {
testImplementation libs.bundles.scalatest.v3
}

moduleConfig {
moduleInfoPath = 'src/main/module-3/module-info.java'
}

javadocJar {
dependsOn scaladoc
from scaladoc
Expand Down
12 changes: 12 additions & 0 deletions xpath-to-xml-scala/src/main/module-3/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module com.github.simych.xpath.scala {
requires transitive com.github.simych.xpath.core;
requires org.scala.lang.scala3.library;
requires scala.library;
requires scala.xml;

exports com.github.simy4.xpath.scala;
exports com.github.simy4.xpath.scala.impl;

provides com.github.simy4.xpath.spi.NavigatorSpi with
com.github.simy4.xpath.scala.spi.ScalaXmlNavigatorSpi;
}
11 changes: 11 additions & 0 deletions xpath-to-xml-scala/src/main/module/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module com.github.simych.xpath.scala {
requires transitive com.github.simych.xpath.core;
requires scala.library;
requires scala.xml;

exports com.github.simy4.xpath.scala;
exports com.github.simy4.xpath.scala.impl;

provides com.github.simy4.xpath.spi.NavigatorSpi with
com.github.simy4.xpath.scala.spi.ScalaXmlNavigatorSpi;
}

0 comments on commit 61f86c3

Please sign in to comment.