Skip to content

Commit 79f0418

Browse files
Set Automatic-Module-Name
1 parent 01757e7 commit 79f0418

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

build-logic/src/main/kotlin/internal.java-library-convention.gradle.kts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ plugins {
66
}
77

88
java {
9-
toolchain.languageVersion = JavaLanguageVersion.of(17)
9+
toolchain {
10+
languageVersion = JavaLanguageVersion.of(17)
11+
}
1012
withSourcesJar()
1113
withJavadocJar()
1214
}
@@ -22,6 +24,7 @@ tasks.withType<Jar>().configureEach {
2224
attributes["Implementation-Version"] = project.version
2325
attributes["Build-Jdk-Spec"] = java.toolchain.languageVersion.get().toString()
2426
attributes["Created-By"] = "Gradle ${gradle.gradleVersion}"
27+
attributes["Automatic-Module-Name"] = project.name.replace('-', '.')
2528
}
2629
from("${rootProject.rootDir}/LICENSE") {
2730
into("META-INF/")

0 commit comments

Comments
 (0)