diff --git a/gradle/build-logic/src/main/kotlin/CloudBaseConventions.kt b/gradle/build-logic/src/main/kotlin/CloudBaseConventions.kt index 3784a1f2e..3c431d4c7 100644 --- a/gradle/build-logic/src/main/kotlin/CloudBaseConventions.kt +++ b/gradle/build-logic/src/main/kotlin/CloudBaseConventions.kt @@ -2,8 +2,11 @@ import com.diffplug.gradle.spotless.SpotlessExtension import net.kyori.indra.IndraExtension import org.gradle.api.Plugin import org.gradle.api.Project +import org.gradle.api.tasks.bundling.Jar +import org.gradle.kotlin.dsl.attributes import org.gradle.kotlin.dsl.configure import org.gradle.kotlin.dsl.dependencies +import org.gradle.kotlin.dsl.withType import org.incendo.cloudbuildlogic.CloudSpotlessExtension class CloudBaseConventions : Plugin { @@ -43,5 +46,11 @@ class CloudBaseConventions : Plugin { "checkstyle"(libs.stylecheck) } + + target.tasks.withType(Jar::class).configureEach { + manifest { + attributes("Automatic-Module-Name" to "%s.%s".format(target.group, archiveBaseName.get())) + } + } } }