Skip to content

Commit 5046b9b

Browse files
committed
Merge branch '2.x' into 3.x
2 parents 2c73248 + 535b10a commit 5046b9b

File tree

95 files changed

+2153
-666
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+2153
-666
lines changed
Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,37 @@
11
name: Build and Test
22

3-
on: [ push, pull_request ]
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
- 1.x
8+
- 2.x
9+
- 3.x
10+
push:
11+
branches:
12+
- master
13+
- 1.x
14+
- 2.x
15+
- 3.x
16+
- feature/**
417

518
jobs:
619
build:
720
runs-on: ubuntu-latest
821

922
steps:
10-
- uses: actions/checkout@v4
23+
- uses: actions/checkout@v5
1124
- name: Set up JDK 11
12-
uses: actions/setup-java@v4
25+
uses: actions/setup-java@v5
1326
with:
1427
distribution: temurin
1528
java-version: 11
1629
- name: Set up Gradle
17-
uses: gradle/actions/setup-gradle@v3
30+
uses: gradle/actions/setup-gradle@v5
1831
- name: ⚙️ Run build
19-
run: ./gradlew build --no-daemon --scan
32+
run: ./gradlew build --no-daemon --scan --write-locks
2033
- name: Publish Test Report
21-
uses: mikepenz/action-junit-report@v4
34+
uses: mikepenz/action-junit-report@v5
2235
if: always()
2336
with:
2437
report_paths: '**/build/test-results/*/*.xml'
@@ -29,6 +42,6 @@ jobs:
2942
paths: '**/build/test-results/*/*.xml'
3043
if: always()
3144
- name: Code Coverage
32-
uses: codecov/codecov-action@v4
45+
uses: codecov/codecov-action@v5
3346
with:
3447
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ jobs:
1212
&& !contains(toJSON(github.event.commits.*.message), '[skip release]')
1313

1414
steps:
15-
- uses: actions/checkout@v4
15+
- uses: actions/checkout@v5
1616
- name: Set up JDK 11
17-
uses: actions/setup-java@v4
17+
uses: actions/setup-java@v5
1818
with:
1919
distribution: temurin
2020
java-version: 11
2121
- name: Set up Gradle
22-
uses: gradle/actions/setup-gradle@v3
22+
uses: gradle/actions/setup-gradle@v5
2323
- name: 🚀 Run release
2424
run: |
2525
echo "sonatypeUsername=$SONATYPE_USERNAME" >> gradle.properties

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# XPath-to-XML
2-
[![Build Status](https://github.com/SimY4/xpath-to-xml/workflows/Build%20and%20Test/badge.svg?branch=3.x)](https://github.com/SimY4/xpath-to-xml/actions?query=workflow%3A"Build+and+Test")
2+
[![Build Status](https://github.com/SimY4/xpath-to-xml/actions/workflows/build-and-test.yml/badge.svg?branch=3.x)](https://github.com/SimY4/xpath-to-xml/actions?query=workflow%3A%22Build+and+Test%22")
33
[![codecov](https://codecov.io/gh/SimY4/xpath-to-xml/branch/3.x/graph/badge.svg)](https://codecov.io/gh/SimY4/xpath-to-xml)
44
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
55

@@ -18,9 +18,10 @@ Convenient utility to build XML models by evaluating XPath expressions.
1818

1919
## Additionally supported models
2020

21-
- jakarta.json
2221
- Gson
2322
- Jackson
23+
- jakarta.json
24+
- org.json
2425

2526
# Usage
2627

build.gradle

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
plugins {
2-
id 'com.diffplug.spotless' version '6.25.0' apply false
2+
id 'com.diffplug.spotless' version '7.2.1' apply false
33
id 'info.solidsoft.pitest' version '1.15.0' apply false
44
id 'io.github.gradle-nexus.publish-plugin' version '2.0.0'
5-
id 'me.champeau.jmh' version '0.7.2' apply false
6-
id 'net.ltgt.errorprone' version '3.1.0' apply false
7-
id 'net.researchgate.release' version '3.0.2'
5+
id 'me.champeau.jmh' version '0.7.3' apply false
6+
id 'net.ltgt.errorprone' version '4.3.0' apply false
7+
id 'net.researchgate.release' version '3.1.0'
88
id 'org.beryx.jar' version '2.0.0' apply false
99
}
1010

1111
subprojects {
12+
if (name == 'xpath-to-xml-bom') return // skip empty projects
13+
1214
apply plugin: 'java-library'
1315
apply plugin: 'org.beryx.jar'
1416
apply from: rootProject.file('gradle/check-checkstyle.gradle')
@@ -21,6 +23,16 @@ subprojects {
2123
mavenCentral()
2224
}
2325

26+
configurations {
27+
[compileClasspath, runtimeClasspath]*.resolutionStrategy*.activateDependencyLocking()
28+
}
29+
30+
dependencies {
31+
testImplementation platform(libs.junit.bom)
32+
33+
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
34+
}
35+
2436
java {
2537
withJavadocJar()
2638
withSourcesJar()
@@ -29,13 +41,6 @@ subprojects {
2941
targetCompatibility = JavaVersion.VERSION_1_8
3042
}
3143

32-
// after gradle 5.3 we need to set this attribute to mark test configuration targeting java 8
33-
[configurations.testCompileClasspath, configurations.testRuntimeClasspath].each {
34-
it.attributes {
35-
attribute(TargetJvmVersion.TARGET_JVM_VERSION_ATTRIBUTE, 11)
36-
}
37-
}
38-
3944
compileJava {
4045
options.release = 8
4146
options.compilerArgs << '-Xlint:all,-options' << '-Werror'
@@ -68,11 +73,23 @@ subprojects {
6873
options.addBooleanOption('html5', true)
6974
options.addStringOption('Xdoclint:all,-missing', '-quiet')
7075
}
76+
77+
tasks.register('resolveAndLock') {
78+
notCompatibleWithConfigurationCache('Fitlers configurations at execution time')
79+
doFirst {
80+
assert gradle.startParameter.writeDependencyLocks : "$path must be run from the the command line with the `--write-locks` flag"
81+
}
82+
doLast {
83+
[configurations.compileClasspath, configurations.runtimeClasspath].each { it.resolve() }
84+
}
85+
}
7186
}
7287

7388
nexusPublishing {
7489
repositories {
7590
sonatype {
91+
nexusUrl = uri("https://ossrh-staging-api.central.sonatype.com/service/local/")
92+
snapshotRepositoryUrl = uri("https://central.sonatype.com/repository/maven-snapshots/")
7693
username = sonatypeUsername
7794
password = sonatypePassword
7895
}
@@ -87,5 +104,5 @@ release {
87104
}
88105

89106
wrapper {
90-
gradleVersion = '8.7'
107+
gradleVersion = '8.14.3'
91108
}

gradle.properties

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,9 @@
11
group = com.github.simy4.xpath
22
version = 3.0.0-SNAPSHOT
33

4-
projectDescription = Convenient utility to build XML models by evaluating XPath expressions
5-
projectUrl = https://github.com/SimY4/xpath-to-xml
6-
projectScm = scm:git:https://github.com/SimY4/xpath-to-xml
7-
projectIssues = https://github.com/SimY4/xpath-to-xml/issues
8-
9-
#signing.keyId = <keyid>
10-
#signing.password = <password>
11-
#signing.secretKeyRingFile = .gnupg/secring.gpg
12-
134
sonatypeUsername = <username>
145
sonatypePassword = <password>
156

7+
org.gradle.caching = true
168
org.gradle.internal.publish.checksums.insecure = true
9+
org.gradle.parallel = true

gradle/check-codecoverage.gradle

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
apply plugin: 'jacoco'
22

33
jacoco {
4-
toolVersion = '0.8.11'
4+
toolVersion = '0.8.12'
55
}
66

77
jacocoTestReport {
8-
afterEvaluate {
9-
reports {
10-
xml.required = true
11-
html.required = project.hasProperty('reports')
12-
html.outputLocation = layout.buildDirectory.dir("jacocoHtml")
13-
}
8+
reports {
9+
xml.required = true
10+
html.required = project.hasProperty('reports')
11+
html.outputLocation = layout.buildDirectory.dir("jacocoHtml")
1412
}
1513
}
1614

gradle/libs.versions.toml

Lines changed: 13 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,26 @@
11
[versions]
2-
errorprone = '2.27.1'
3-
jackson = '2.17.1'
4-
scala212 = '2.12.19'
5-
scala213 = '2.13.14'
6-
scala3 = '3.3.3'
7-
scalatest = '3.2.18'
2+
errorprone = '2.31.0'
3+
jackson = '2.20.0'
84

95
[libraries]
10-
assertj = 'org.assertj:assertj-core:3.25.3'
11-
dom4j = 'org.dom4j:dom4j:2.1.4'
6+
assertj = 'org.assertj:assertj-core:3.27.6'
7+
dom4j = 'org.dom4j:dom4j:2.2.0'
128
errorprone = { module = 'com.google.errorprone:error_prone_core', version.ref = 'errorprone' }
13-
gson = 'com.google.code.gson:gson:2.11.0'
9+
gson = 'com.google.code.gson:gson:2.13.2'
1410
jackson-databind = { module = 'com.fasterxml.jackson.core:jackson-databind', version.ref = 'jackson' }
1511
jackson-dataformat-yaml = { module = 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml', version.ref = 'jackson' }
1612
jaxen = 'jaxen:jaxen:2.0.0'
1713
jdom2 = 'org.jdom:jdom2:2.0.6.1'
14+
json = 'org.json:json:20250517'
1815
json-api = 'jakarta.json:jakarta.json-api:2.1.3'
1916
json-impl = 'org.glassfish:jakarta.json:2.0.1'
20-
junit-jupiter = 'org.junit.jupiter:junit-jupiter:5.10.2'
21-
mockito = 'org.mockito:mockito-junit-jupiter:5.12.0'
22-
scala-library-v212 = { module = 'org.scala-lang:scala-library', version.ref = 'scala212' }
23-
scala-library-v213 = { module = 'org.scala-lang:scala-library', version.ref = 'scala213' }
24-
scala-library-v3 = { module = 'org.scala-lang:scala3-library_3', version.ref = 'scala3' }
25-
scala-reflect-v212 = { module = 'org.scala-lang:scala-reflect', version.ref = 'scala212' }
26-
scala-reflect-v213 = { module = 'org.scala-lang:scala-reflect', version.ref = 'scala213' }
27-
scala-xml = 'org.scala-lang.modules:scala-xml_%%:2.3.0'
28-
scalatest-funspec = { module = 'org.scalatest:scalatest-funspec_%%', version.ref = 'scalatest' }
29-
scalatest-shouldmatchers = { module = 'org.scalatest:scalatest-shouldmatchers_%%', version.ref = 'scalatest' }
30-
scalatest-junit-runner = 'org.scalatestplus:junit-5-10_%%:3.2.18.0'
31-
wartremover = 'org.wartremover:wartremover_%%:3.1.6'
17+
junit-bom = 'org.junit:junit-bom:5.13.4'
18+
mockito = 'org.mockito:mockito-junit-jupiter:5.20.0'
19+
scala-xml = 'org.scala-lang.modules:scala-xml_%%:2.4.0'
20+
scalatest-funspec = 'org.scalatest:scalatest-funspec_%%:3.2.19'
21+
scalatest-junit-runner = 'org.scalatestplus:junit-5-12_%%:3.2.19.0'
22+
wartremover = 'org.wartremover:wartremover_%%:3.3.4'
3223
xom = 'xom:xom:1.3.9'
3324

3425
[bundles]
35-
junit = ["junit-jupiter", "assertj"]
36-
scalatest = ["scalatest-funspec", "scalatest-shouldmatchers", "scalatest-junit-runner"]
26+
scalatest = ["scalatest-funspec", "scalatest-junit-runner"]

gradle/publish-jar.gradle

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
jar {
2-
afterEvaluate {
3-
manifest.attributes << [
4-
'Built-By': System.properties['user.name'],
5-
'Created-By': "${System.properties['java.version']} (${System.properties['java.vendor']} ${System.properties['java.vm.version']})",
6-
'Implementation-Title': project.name,
7-
'Implementation-Version': project.version,
8-
]
9-
}
2+
manifest.attributes << [
3+
'Built-By': System.properties['user.name'],
4+
'Created-By': "${System.properties['java.version']} (${System.properties['java.vendor']} ${System.properties['java.vm.version']})",
5+
'Implementation-Title': project.name,
6+
'Implementation-Version': project.version,
7+
]
108
}

gradle/publish-maven.gradle

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ apply plugin: 'signing'
44
publishing {
55
publications {
66
mavenJava(MavenPublication) {
7-
from components.java
7+
from components.find { it.name == 'java' || it.name == 'javaPlatform' }
88
versionMapping {
99
usage('java-api') {
1010
fromResolutionResult()
@@ -13,28 +13,27 @@ publishing {
1313
fromResolutionResult()
1414
}
1515
}
16-
afterEvaluate {
17-
artifactId = project.name
16+
afterEvaluate { project ->
1817
pom {
1918
name = project.name
20-
description = projectDescription
19+
description = project.description
2120
url = 'http://github.com/SimY4/xpath-to-xml'
2221
inceptionYear = '2017'
2322

2423
properties = [
25-
'info.releaseNotesURL': 'https://github.com/SimY4/xpath-to-xml/blob/2.x/CHANGELOG.md',
24+
'info.releaseNotesURL': 'https://github.com/SimY4/xpath-to-xml/releases',
2625
'info.versionScheme': 'semver-spec'
2726
]
2827

2928
scm {
30-
connection = projectScm
31-
developerConnection = projectScm
32-
url = projectUrl
29+
connection = 'scm:git:https://github.com/SimY4/xpath-to-xml'
30+
developerConnection = 'scm:git:https://github.com/SimY4/xpath-to-xml'
31+
url = 'http://github.com/SimY4/xpath-to-xml'
3332
}
3433

3534
issueManagement {
3635
system = 'GitHub'
37-
url = projectIssues
36+
url = 'https://github.com/SimY4/xpath-to-xml/issues'
3837
}
3938

4039
licenses {

gradle/wrapper/gradle-wrapper.jar

302 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)