Skip to content

Commit c20fdb1

Browse files
committed
47: Add module-info to TCK
Task-Url: unitsofmeasurement/unit-tck#47
1 parent 6a72b3e commit c20fdb1

7 files changed

Lines changed: 103 additions & 10 deletions

File tree

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
build:
88
docker:
99
# specify the version you desire here
10-
- image: cimg/openjdk:17.0.6
10+
- image: cimg/openjdk:17.0.8
1111

1212
working_directory: ~/repo
1313

pom.xml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>tech.uom</groupId>
88
<artifactId>uom-parent</artifactId>
9-
<version>2.2-SNAPSHOT</version>
9+
<version>2.2</version>
1010
</parent>
1111

1212
<artifactId>unit-tck-usage</artifactId>
@@ -32,11 +32,11 @@
3232
<!-- 1) Your implementation artifact to be tested. -->
3333
<impl.groupId>tech.units</impl.groupId>
3434
<impl.artifactId>indriya</impl.artifactId>
35-
<impl.version>2.1.4</impl.version>
35+
<impl.version>2.2</impl.version>
3636
<impl.packageType>jar</impl.packageType>
3737

3838
<!-- 2) JSR API version to be used. -->
39-
<api.version>2.1.3</api.version>
39+
<api.version>2.2</api.version>
4040
<api.artifactId>unit-api</api.artifactId>
4141

4242
<!-- ************ Other settings, Should normally not be changed. ************ -->
@@ -46,7 +46,7 @@
4646
<maven.compile.sourceLevel>${jdkVersion}</maven.compile.sourceLevel>
4747
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
4848
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
49-
<testng.version>7.7.0</testng.version>
49+
<testng.version>7.8.0</testng.version>
5050
<reflections.version>0.10.2</reflections.version>
5151
</properties>
5252

@@ -159,4 +159,5 @@
159159
</plugin>
160160
</plugins>
161161
</build>
162+
<version>2.2-SNAPSHOT</version>
162163
</project>

src/main/java/module-info.java

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/*
2+
* Units of Measurement TCK Usage Demo
3+
* Copyright (c) 2014-2023, Werner Keil and others.
4+
*
5+
* All rights reserved.
6+
*
7+
* Redistribution and use in source and binary forms, with or without modification,
8+
* are permitted provided that the following conditions are met:
9+
*
10+
* 1. Redistributions of source code must retain the above copyright notice,
11+
* this list of conditions and the following disclaimer.
12+
*
13+
* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
14+
* and the following disclaimer in the documentation and/or other materials provided with the distribution.
15+
*
16+
* 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
17+
* derived from this software without specific prior written permission.
18+
*
19+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20+
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
21+
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22+
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24+
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25+
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
26+
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
28+
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29+
*/
30+
module tech.units.tckusage {
31+
exports tech.units.tckusage;
32+
33+
requires tech.units.tck;
34+
requires tech.units.indriya;
35+
requires transitive java.measure;
36+
requires transitive tech.uom.lib.common;
37+
38+
requires jakarta.inject;
39+
requires java.compiler;
40+
requires org.reflections;
41+
42+
uses tech.units.tck.util.ServiceConfiguration;
43+
44+
provides tech.units.tck.util.ServiceConfiguration with
45+
tech.units.tckusage.TestConfiguration;
46+
}

src/main/java/tech/units/tckusage/TestConfiguration.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Units of Measurement TCK
3-
* Copyright (c) 2014-2019, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
2+
* Units of Measurement TCK Usage Demo
3+
* Copyright (c) 2014-2023, Werner Keil and others.
44
*
55
* All rights reserved.
66
*

src/main/resources/META-INF/services/tech.units.tck.util.ServiceConfiguration

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/test/java/module-info.java

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/*
2+
* Units of Measurement TCK Usage Demo
3+
* Copyright (c) 2014-2023, Werner Keil and others.
4+
*
5+
* All rights reserved.
6+
*
7+
* Redistribution and use in source and binary forms, with or without modification,
8+
* are permitted provided that the following conditions are met:
9+
*
10+
* 1. Redistributions of source code must retain the above copyright notice,
11+
* this list of conditions and the following disclaimer.
12+
*
13+
* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
14+
* and the following disclaimer in the documentation and/or other materials provided with the distribution.
15+
*
16+
* 3. Neither the name of JSR-385 nor the names of its contributors may be used to endorse or promote products
17+
* derived from this software without specific prior written permission.
18+
*
19+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20+
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
21+
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22+
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24+
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25+
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
26+
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
28+
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29+
*/
30+
module tech.units.tckusage {
31+
exports tech.units.tckusage;
32+
33+
requires tech.units.tck;
34+
requires transitive tech.units.indriya;
35+
requires transitive java.measure;
36+
requires transitive tech.uom.lib.common;
37+
38+
requires jakarta.inject;
39+
requires java.compiler;
40+
requires org.testng;
41+
requires org.reflections;
42+
43+
uses tech.units.tck.util.ServiceConfiguration;
44+
45+
provides tech.units.tck.util.ServiceConfiguration with
46+
tech.units.tckusage.TestConfiguration;
47+
}

src/test/java/tech/units/tckusage/RunTCKTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Units of Measurement TCK
3-
* Copyright (c) 2014-2019, Jean-Marie Dautelle, Werner Keil, Otavio Santana.
2+
* Units of Measurement TCK Usage Demo
3+
* Copyright (c) 2014-2023, Werner Keil and others.
44
*
55
* All rights reserved.
66
*

0 commit comments

Comments
 (0)