Skip to content

Commit c41d55a

Browse files
committed
Gradle build cleanup
1 parent 539c84a commit c41d55a

File tree

3 files changed

+40
-3
lines changed

3 files changed

+40
-3
lines changed

NOTICE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
This project contains SVG files from the EchoSVG project:
22

3-
Copyright 2020-2024 Contributors to the EchoSVG project
3+
Copyright 2020-2025 Contributors to the EchoSVG project
44
Copyright 1999-2020 The Apache Software Foundation

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ First, produce the benchmarks jar file, then run the required benchmark(s):
1010

1111
You do not need to have Gradle installed on your system (it uses the `gradlew` wrapper script).
1212

13+
But if you just want to check that a benchmark (matched by a regular expression)
14+
works, run the following:
15+
16+
```shell
17+
./gradlew runJmh --args <regexp>
18+
```
19+
1320
## Maven
1421
As a pre-requisite, you (obviously) must have Apache Maven installed.
1522

build.gradle

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
3-
Copyright (c) 2019-2024, C. Amengual.
3+
Copyright (c) 2019-2025, C. Amengual.
44
55
Licensed under a BSD-style License. You can find the license here:
66
https://css4j.github.io/LICENSE.txt
@@ -38,22 +38,35 @@ dependencies {
3838
implementation 'io.sf.carte:css4j-dom4j:4.2'
3939
implementation 'io.sf.carte:echosvg-transcoder:1.2.3'
4040
implementation ('org.apache.xmlgraphics:batik-transcoder:1.18') {
41+
// Already available from java.xml
42+
exclude group: 'xml-apis', module: 'xml-apis'
4143
// Use packages from web-apis instead
4244
exclude group: 'xml-apis', module: 'xml-apis-ext'
4345
}
4446
implementation ('org.apache.xmlgraphics:batik-codec:1.18') {
47+
// Already available from java.xml
48+
exclude group: 'xml-apis', module: 'xml-apis'
4549
// Use packages from web-apis instead
4650
exclude group: 'xml-apis', module: 'xml-apis-ext'
4751
}
4852
implementation 'org.w3c.css:sac:1.3' // Required by Batik
4953
implementation 'nu.validator:htmlparser:1.4.16'
5054
implementation 'org.jsoup:jsoup:1.18.3'
55+
56+
}
57+
58+
configurations.all {
59+
exclude group: 'jaxen', module: 'jaxen'
5160
}
5261

5362
group = 'io.sf.carte'
5463
version = '0.7'
5564
description = 'JMH benchmark for CSS4J and EchoSVG'
56-
java.sourceCompatibility = JavaVersion.VERSION_17
65+
66+
java {
67+
sourceCompatibility = JavaVersion.VERSION_17
68+
targetCompatibility = JavaVersion.VERSION_17
69+
}
5770

5871
sourceSets {
5972
main {
@@ -147,7 +160,24 @@ tasks.register('jmhJar', Jar) {
147160
}
148161
with jar
149162
duplicatesStrategy = 'exclude'
163+
// Modularity does not apply here
150164
exclude 'module-info.class'
165+
// Provided by Java SE
166+
exclude 'javax/**'
167+
// The next ones are provided by java.xml module
168+
exclude 'org/w3c/dom/*'
169+
exclude 'org/w3c/dom/bootstrap/**'
170+
exclude 'org/w3c/dom/events/**'
171+
exclude 'org/w3c/dom/ls/**'
172+
exclude 'org/w3c/dom/ranges/**'
173+
exclude 'org/w3c/dom/traversal/**'
174+
exclude 'org/w3c/dom/views/**'
175+
exclude 'org/xml/**'
176+
// Provided by jdk.xml.dom module
177+
exclude 'org/w3c/dom/css/**'
178+
exclude 'org/w3c/dom/html/**'
179+
exclude 'org/w3c/dom/stylesheets/**'
180+
exclude 'org/w3c/dom/xpath/**'
151181
}
152182

153183
build.dependsOn jmhJar

0 commit comments

Comments
 (0)