@@ -28,31 +28,18 @@ publishing {
28
28
publications {
29
29
// Kotlin Multiplatform
30
30
pluginManager.withPlugin(" org.jetbrains.kotlin.multiplatform" ) {
31
- // withType<MavenPublication>().configureEach { artifact(taskName..) }
31
+ // val customFiles = configurations.findByName("customFiles")?.artifacts.orEmpty()
32
+ // withType<MavenPublication>().configureEach { customFiles.forEach { artifact(it) } }
32
33
}
33
34
34
- // Kotlin JVM ("org.jetbrains.kotlin.jvm")
35
- pluginManager.withPlugin(" java" ) {
36
- register<MavenPublication >(" maven" ) { from(components[" java" ]) }
35
+ // Kotlin JVM - components["java"]
36
+ pluginManager.withPlugin(" java" ) {}
37
37
38
- withType< MavenPublication >().configureEach {
39
- // configurations.findByName("customFile")?.artifacts?.forEach { artifact(it) }
38
+ // Java Platform (BOM) - components["javaPlatform"]
39
+ pluginManager.withPlugin( " java-platform " ) { }
40
40
41
- // Add an executable artifact if exists
42
- // val execJar = tasks.findByName("buildExecutable") as? ReallyExecJar
43
- // if (execJar != null) { artifact(execJar.execJarFile) }
44
- }
45
- }
46
-
47
- // Java Platform (BOM)
48
- pluginManager.withPlugin(" java-platform" ) {
49
- register<MavenPublication >(" maven" ) { from(components[" javaPlatform" ]) }
50
- }
51
-
52
- // Gradle version catalog
53
- pluginManager.withPlugin(" version-catalog" ) {
54
- register<MavenPublication >(" maven" ) { from(components[" versionCatalog" ]) }
55
- }
41
+ // Gradle version catalog - components["versionCatalog"]
42
+ pluginManager.withPlugin(" version-catalog" ) {}
56
43
57
44
// Configures GHCR credentials for Jib
58
45
pluginManager.withPlugin(" com.google.cloud.tools.jib" ) {
0 commit comments