Skip to content

Commit

Permalink
✨ feat(Jar): Add Automatic-Module-Name
Browse files Browse the repository at this point in the history
  • Loading branch information
caoccao committed Feb 21, 2023
1 parent fd64272 commit 2a299a4
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
8 changes: 7 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ task<Exec>("buildJNIHeaders") {
}
}

tasks.jar {
manifest {
attributes["Automatic-Module-Name"] = "com.caoccao.javet"
}
}

tasks.test {
useJUnitPlatform {
excludeTags("performance")
Expand All @@ -82,7 +88,7 @@ tasks.withType<Test> {
systemProperty("file.encoding", "UTF-8")
}

tasks.withType<Javadoc>{
tasks.withType<Javadoc> {
options.encoding = "UTF-8"
}

Expand Down
12 changes: 12 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,18 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<archive>
<manifestEntries>
<Automatic-Module-Name>com.caoccao.javet</Automatic-Module-Name>
</manifestEntries>
</archive>
</configuration>
</plugin>
</plugins>
</build>

Expand Down

0 comments on commit 2a299a4

Please sign in to comment.