Skip to content

Commit ffe5de4

Browse files
committed
*: add Automatic-Module-Name manifest attribute
This uses the 4.x artifact names to ease migration to the new version when users are able to do so.
1 parent b01ab5a commit ffe5de4

File tree

4 files changed

+23
-0
lines changed

4 files changed

+23
-0
lines changed

buildSrc/src/main/kotlin/org/spongepowered/configurate/build/ConfigurateDevPlugin.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@ class ConfigurateDevPlugin : Plugin<Project> {
5555
it.from(rootProject.file("LICENSE")) {
5656
it.rename { f -> "${f}_${project.name}" }
5757
}
58+
it.manifest {
59+
it.attributes(
60+
mapOf("Automatic-Module-Name" to "org.spongepowered.${project.name.replace("-", ".")}")
61+
)
62+
}
5863
}
5964

6065
extensions.configure(LicenseExtension::class.java) {

configurate-core/build.gradle.kts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,9 @@ dependencies {
1010
testImplementation("com.google.inject:guice:4.2.3")
1111
api("org.checkerframework:checker-qual:2.4.0")
1212
}
13+
14+
tasks.jar {
15+
manifest.attributes(
16+
"Automatic-Module-Name" to "org.spongepowered.configurate"
17+
)
18+
}

configurate-ext-kotlin/build.gradle.kts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ tasks.withType(KotlinCompile::class).configureEach {
1010
kotlinOptions.freeCompilerArgs += listOf("-Xopt-in=kotlin.RequiresOptIn")
1111
}
1212

13+
tasks.jar {
14+
manifest.attributes(
15+
"Automatic-Module-Name" to "org.spongepowered.configurate.extra.kotlin"
16+
)
17+
}
18+
1319
dependencies {
1420
api(project(":configurate-core"))
1521
implementation(kotlin("stdlib-jdk8"))

configurate-json/build.gradle.kts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,9 @@ dependencies {
88
api(project(":configurate-core"))
99
api("com.fasterxml.jackson.core:jackson-core:${Versions.JACKSON}")
1010
}
11+
12+
tasks.jar {
13+
manifest.attributes(
14+
"Automatic-Module-Name" to "org.spongepowered.configurate.jackson"
15+
)
16+
}

0 commit comments

Comments
 (0)