Skip to content

Commit 7ff1072

Browse files
committed
Upgrade to Java 11 and parent version 2.0
1 parent 2e52885 commit 7ff1072

File tree

4 files changed

+28
-76
lines changed

4 files changed

+28
-76
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
runs-on: ubuntu-latest
2727
strategy:
2828
matrix:
29-
java: [8, 11, 17, 21]
29+
java: [11, 17, 21]
3030
fail-fast: false
3131
steps:
3232
- uses: actions/checkout@v5
@@ -39,7 +39,7 @@ jobs:
3939
- name: Build with Maven
4040
run: mvn package --file pom.xml -B --no-transfer-progress
4141

42-
native-module:
42+
site:
4343
runs-on: ubuntu-latest
4444
steps:
4545
- uses: actions/checkout@v5
@@ -50,17 +50,4 @@ jobs:
5050
distribution: 'temurin'
5151
cache: 'maven'
5252
- name: Build with Maven
53-
run: mvn package --file pom.xml -B --no-transfer-progress -Pnative-module
54-
55-
site:
56-
runs-on: ubuntu-latest
57-
steps:
58-
- uses: actions/checkout@v5
59-
- name: Set up JDK 8
60-
uses: actions/setup-java@v5
61-
with:
62-
java-version: '8'
63-
distribution: 'temurin'
64-
cache: 'maven'
65-
- name: Build with Maven
66-
run: mvn site --file pom.xml -B --no-transfer-progress
53+
run: mvn package site --file pom.xml -B --no-transfer-progress -DskipTests

.github/workflows/release-site.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ jobs:
2626
runs-on: ubuntu-latest
2727
steps:
2828
- uses: actions/checkout@v5
29-
- name: Set up JDK 8
29+
- name: Set up JDK 11
3030
uses: actions/setup-java@v5
3131
with:
32-
java-version: '8'
32+
java-version: '11'
3333
distribution: 'temurin'
3434
cache: 'maven'
3535
- name: Build site
3636
run: |
37-
mvn site --file pom.xml -B --no-transfer-progress
37+
mvn package site --file pom.xml -B --no-transfer-progress -DskipTests
3838
for i in `grep '<module>.*</module>' pom.xml`; do
3939
module=`echo $i | sed 's~<module>\(.*\)</module>~\1~g'`
4040
echo "Moving site for module $module to target/site"

pom.xml

Lines changed: 19 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@
2222
<parent>
2323
<groupId>com.github.robtimus</groupId>
2424
<artifactId>robtimus-parent</artifactId>
25-
<version>1.18</version>
25+
<version>2.0</version>
2626
<relativePath />
2727
</parent>
2828

2929
<artifactId>obfuscation-json</artifactId>
30-
<version>2.1-SNAPSHOT</version>
30+
<version>3.0-SNAPSHOT</version>
3131
<packaging>jar</packaging>
3232

3333
<name>obfuscation-json</name>
@@ -62,6 +62,8 @@
6262
</issueManagement>
6363

6464
<properties>
65+
<version.java>11</version.java>
66+
6567
<version.json-api>2.1.3</version.json-api>
6668
<version.json-impl>2.0.1</version.json-impl>
6769
<version.obfuscation-core>1.5</version.obfuscation-core>
@@ -146,6 +148,13 @@
146148
<plugin>
147149
<groupId>org.apache.maven.plugins</groupId>
148150
<artifactId>maven-dependency-plugin</artifactId>
151+
<executions>
152+
<execution>
153+
<goals>
154+
<goal>properties</goal>
155+
</goals>
156+
</execution>
157+
</executions>
149158
</plugin>
150159

151160
<plugin>
@@ -194,11 +203,6 @@
194203
</executions>
195204
</plugin>
196205

197-
<plugin>
198-
<groupId>org.moditect</groupId>
199-
<artifactId>moditect-maven-plugin</artifactId>
200-
</plugin>
201-
202206
<plugin>
203207
<groupId>com.github.robtimus</groupId>
204208
<artifactId>build-helper-maven-plugin</artifactId>
@@ -223,6 +227,14 @@
223227
<plugin>
224228
<groupId>org.apache.maven.plugins</groupId>
225229
<artifactId>maven-surefire-plugin</artifactId>
230+
<configuration>
231+
<argLine>
232+
@{argLine}
233+
-javaagent:${org.mockito:mockito-core:jar}
234+
<!-- Allow JUnit to fully access the test classes -->
235+
--add-opens com.github.robtimus.obfuscation.json/com.github.robtimus.obfuscation.json=ALL-UNNAMED
236+
</argLine>
237+
</configuration>
226238
</plugin>
227239

228240
<plugin>
@@ -261,54 +273,4 @@
261273
</plugin>
262274
</plugins>
263275
</build>
264-
265-
<profiles>
266-
<profile>
267-
<id>native-module</id>
268-
<properties>
269-
<version.java>11</version.java>
270-
</properties>
271-
<build>
272-
<plugins>
273-
<plugin>
274-
<groupId>org.apache.maven.plugins</groupId>
275-
<artifactId>maven-surefire-plugin</artifactId>
276-
<configuration>
277-
<!-- Allow JUnit to fully access the test classes -->
278-
<argLine>
279-
@{argLine}
280-
--add-opens com.github.robtimus.obfuscation.json/com.github.robtimus.obfuscation.json=ALL-UNNAMED
281-
</argLine>
282-
</configuration>
283-
</plugin>
284-
285-
<plugin>
286-
<groupId>org.moditect</groupId>
287-
<artifactId>moditect-maven-plugin</artifactId>
288-
<configuration>
289-
<skip>true</skip>
290-
</configuration>
291-
</plugin>
292-
293-
<plugin>
294-
<groupId>org.codehaus.mojo</groupId>
295-
<artifactId>build-helper-maven-plugin</artifactId>
296-
<executions>
297-
<execution>
298-
<phase>generate-sources</phase>
299-
<goals>
300-
<goal>add-source</goal>
301-
</goals>
302-
<configuration>
303-
<sources>
304-
<source>${project.basedir}/src/moditect</source>
305-
</sources>
306-
</configuration>
307-
</execution>
308-
</executions>
309-
</plugin>
310-
</plugins>
311-
</build>
312-
</profile>
313-
</profiles>
314276
</project>

src/moditect/module-info.java renamed to src/main/java/module-info.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
* limitations under the License.
1616
*/
1717

18+
/**
19+
* Provides functionality for obfuscating JSON using the Java API for Processing JSON (JSR 374).
20+
*/
1821
module com.github.robtimus.obfuscation.json {
1922
requires transitive com.github.robtimus.obfuscation;
2023
requires jakarta.json;

0 commit comments

Comments
 (0)