Skip to content

Commit

Permalink
Modularize 2.x.
Browse files Browse the repository at this point in the history
  • Loading branch information
SimY4 committed Apr 7, 2023
1 parent 096463c commit 5135f87
Show file tree
Hide file tree
Showing 23 changed files with 77 additions and 25 deletions.
12 changes: 12 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ plugins {
id 'me.champeau.jmh' version '0.7.0' apply false
id 'net.ltgt.errorprone' version '3.0.1' apply false
id 'net.researchgate.release' version '3.0.2'
id 'org.beryx.jar' version '2.0.0' apply false
}

subprojects {
Expand Down Expand Up @@ -45,6 +46,17 @@ 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
}
}

test {
useJUnitPlatform()

Expand Down
1 change: 0 additions & 1 deletion gradle/publish-jar.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ jar {
'Created-By': "${System.properties['java.version']} (${System.properties['java.vendor']} ${System.properties['java.vm.version']})",
'Implementation-Title': project.name,
'Implementation-Version': project.version,
'Automatic-Module-Name': moduleName,
]
}
}
2 changes: 0 additions & 2 deletions xpath-to-json-gson/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
ext.moduleName = 'com.github.simych.xpath.gson'

apply from: rootProject.file('gradle/benchmark-jmh.gradle')

sourceCompatibility = JavaVersion.VERSION_1_7
Expand Down
9 changes: 9 additions & 0 deletions xpath-to-json-gson/src/main/module/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module com.github.simych.xpath.gson {
requires transitive com.github.simych.xpath.core;
requires com.google.gson;

exports com.github.simy4.xpath.gson.spi;

provides com.github.simy4.xpath.spi.NavigatorSpi with
com.github.simy4.xpath.gson.spi.GsonNavigatorSpi;
}
2 changes: 0 additions & 2 deletions xpath-to-json-jackson/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
ext.moduleName = 'com.github.simych.xpath.jackson'

apply from: rootProject.file('gradle/benchmark-jmh.gradle')

sourceCompatibility = JavaVersion.VERSION_1_8
Expand Down
7 changes: 7 additions & 0 deletions xpath-to-json-jackson/src/main/module/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module com.github.simych.xpath.jackson {
requires transitive com.github.simych.xpath.core;
requires com.fasterxml.jackson.databind;

provides com.github.simy4.xpath.spi.NavigatorSpi with
com.github.simy4.xpath.jackson.spi.JacksonNavigatorSpi;
}
2 changes: 0 additions & 2 deletions xpath-to-json-jakarta/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
ext.moduleName = 'com.github.simych.xpath.jakarta'

apply from: rootProject.file('gradle/benchmark-jmh.gradle')

sourceCompatibility = JavaVersion.VERSION_1_8
Expand Down
7 changes: 7 additions & 0 deletions xpath-to-json-jakarta/src/main/module/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module com.github.simych.xpath.json {
requires transitive com.github.simych.xpath.core;
requires jakarta.json;

provides com.github.simy4.xpath.spi.NavigatorSpi with
com.github.simy4.xpath.json.spi.JakartaJsonNavigatorSpi;
}
2 changes: 0 additions & 2 deletions xpath-to-xml-core/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
ext.moduleName = 'com.github.simych.xpath.core'

apply from: rootProject.file('gradle/check-mutationcoverage.gradle')

dependencies {
Expand Down
10 changes: 10 additions & 0 deletions xpath-to-xml-core/src/main/module/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module com.github.simych.xpath.core {
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;

uses com.github.simy4.xpath.spi.NavigatorSpi;
}
2 changes: 0 additions & 2 deletions xpath-to-xml-dom/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
ext.moduleName = 'com.github.simych.xpath.dom'

apply from: rootProject.file('gradle/benchmark-jmh.gradle')

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

provides com.github.simy4.xpath.spi.NavigatorSpi with
com.github.simy4.xpath.dom.spi.DomNavigatorSpi;
}
2 changes: 0 additions & 2 deletions xpath-to-xml-dom4j/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
ext.moduleName = 'com.github.simych.xpath.dom4j'

apply from: rootProject.file('gradle/benchmark-jmh.gradle')

sourceCompatibility = JavaVersion.VERSION_1_8
Expand Down
7 changes: 7 additions & 0 deletions xpath-to-xml-dom4j/src/main/module/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module com.github.simych.xpath.dom4j {
requires transitive com.github.simych.xpath.core;
requires org.dom4j;

provides com.github.simy4.xpath.spi.NavigatorSpi with
com.github.simy4.xpath.dom4j.spi.Dom4jNavigatorSpi;
}
2 changes: 0 additions & 2 deletions xpath-to-xml-jdom/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
ext.moduleName = 'com.github.simych.xpath.jdom'

apply from: rootProject.file('gradle/benchmark-jmh.gradle')

dependencies {
Expand Down
7 changes: 7 additions & 0 deletions xpath-to-xml-jdom/src/main/module/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module com.github.simych.xpath.jdom {
requires transitive com.github.simych.xpath.core;
requires org.jdom2;

provides com.github.simy4.xpath.spi.NavigatorSpi with
com.github.simy4.xpath.jdom.spi.JDomNavigatorSpi;
}
2 changes: 0 additions & 2 deletions xpath-to-xml-scala/build-2.12.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
ext.moduleName = 'com.github.simych.xpath.scala'

apply plugin: 'scala'

buildDir = 'build-2.12'
Expand Down
2 changes: 0 additions & 2 deletions xpath-to-xml-scala/build-2.13.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
ext.moduleName = 'com.github.simych.xpath.scala'

apply plugin: 'scala'

buildDir = 'build-2.13'
Expand Down
2 changes: 0 additions & 2 deletions xpath-to-xml-scala/build-3.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
ext.moduleName = 'com.github.simych.xpath.scala'

apply plugin: 'scala'
apply from: rootProject.file('gradle/benchmark-jmh.gradle')

Expand Down
2 changes: 0 additions & 2 deletions xpath-to-xml-test/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
ext.moduleName = 'com.github.simych.xpath.test'

sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11

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

exports com.github.simy4.xpath.fixtures;
exports com.github.simy4.xpath.helpers;
}
2 changes: 0 additions & 2 deletions xpath-to-xml-xom/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
ext.moduleName = 'com.github.simych.xpath.xom'

apply from: rootProject.file('gradle/benchmark-jmh.gradle')

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

provides com.github.simy4.xpath.spi.NavigatorSpi with com.github.simy4.xpath.xom.spi.XomNavigatorSpi;
}

0 comments on commit 5135f87

Please sign in to comment.