Skip to content

Commit

Permalink
Adds module-info.java
Browse files Browse the repository at this point in the history
  • Loading branch information
jqno committed Jan 9, 2025
1 parent 90021ff commit 2b43861
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 5 deletions.
4 changes: 4 additions & 0 deletions build/checkstyle-config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
<property name="charset" value="UTF-8"/>
<property name="severity" value="error"/>

<module name="BeforeExecutionExclusionFileFilter">
<property name="fileNamePattern" value="module\-info\.java$"/>
</module>

<module name="FileLength"/>
<module name="FileTabCharacter"/>
<module name="NewlineAtEndOfFile">
Expand Down
17 changes: 17 additions & 0 deletions equalsverifier-core/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module nl.jqno.equalsverifier {
exports nl.jqno.equalsverifier;
exports nl.jqno.equalsverifier.api;

// Direct dependencies
requires net.bytebuddy;
requires org.objenesis;

// Built-in prefab values
requires static com.google.common;
requires static java.desktop;
requires static java.naming;
requires static java.rmi;
requires static java.sql;
requires static javafx.base;
requires static org.joda.time;
}
1 change: 0 additions & 1 deletion equalsverifier-release-main/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
<manifestEntries>
<Automatic-Module-Name>nl.jqno.equalsverifier</Automatic-Module-Name>
<Multi-Release>true</Multi-Release>
<Implementation-Title>EqualsVerifier</Implementation-Title>
<Website>${project.url}</Website>
Expand Down
1 change: 0 additions & 1 deletion equalsverifier-release-nodep/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
<manifestEntries>
<Automatic-Module-Name>nl.jqno.equalsverifier</Automatic-Module-Name>
<Multi-Release>true</Multi-Release>
<Implementation-Title>EqualsVerifier (no dependencies)</Implementation-Title>
<Website>${project.url}</Website>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ static void clean() throws Exception {

@Test
void presenceOfCoreSources() {
jar.assertPresenceOf("/index.html", EV + "/EqualsVerifier.html");
jar.assertPresenceOf("/index.html", "/nl.jqno.equalsverifier" + EV + "/EqualsVerifier.html");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ static void clean() throws Exception {

@Test
void presenceOfCoreSources() {
jar.assertPresenceOf("/index.html", EV + "/EqualsVerifier.html");
jar.assertPresenceOf("/index.html", "/nl.jqno.equalsverifier" + EV + "/EqualsVerifier.html");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public JarAsserter(JarReader reader) {

public void assertPresenceOfCoreClasses() {
assertPresenceOf(
"/module-info.class",
EV + "/EqualsVerifier.class",
EV + "/internal/reflection/ClassProbe.class",
EV + "/internal/checkers/HierarchyChecker.class");
Expand Down Expand Up @@ -51,7 +52,6 @@ public void assertContentOfManifest(String implementationTitle) {
var manifest = new String(reader.getContentOf(filename));
assertThat(manifest)
.satisfies(
m -> assertContains("Automatic-Module-Name: nl.jqno.equalsverifier", m, filename),
m -> assertContains("Implementation-Title: " + implementationTitle, m, filename),
m -> assertContains("Implementation-Version: ", m, filename),
m -> assertContains("Multi-Release: true", m, filename),
Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@
<version>${version.maven-surefire-plugin}</version>
<configuration>
<argLine>@{argline.full}</argLine>
<useModulePath>false</useModulePath>
<trimStackTrace>false</trimStackTrace>
<useSystemClassLoader>false</useSystemClassLoader>
</configuration>
Expand Down

0 comments on commit 2b43861

Please sign in to comment.