Skip to content

Commit ddb8ba2

Browse files
committed
switch off pom checker
1 parent 3605870 commit ddb8ba2

File tree

1 file changed

+64
-0
lines changed

1 file changed

+64
-0
lines changed

build.gradle.kts

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,10 @@ if (isReleaseBuild) {
279279
}
280280
deploy {
281281
maven {
282+
pomchecker {
283+
failOnError = false
284+
failOnWarning = false
285+
}
282286
mavenCentral {
283287
create("maven-central") {
284288
applyMavenCentralRules = false // Already checked
@@ -287,6 +291,18 @@ if (isReleaseBuild) {
287291
url = "https://central.sonatype.com/api/v1/publisher"
288292
maxRetries = 240
289293
stagingRepository(stagingDeployDir.path)
294+
295+
// kotlin.targets.forEach { target ->
296+
// if (target !is org.jetbrains.kotlin.gradle.targets.jvm.KotlinJvmTarget) {
297+
// artifactOverride {
298+
// groupId = groupId
299+
// //artifactId =
300+
// //verifyPom = false
301+
// jar = false
302+
// }
303+
// }
304+
// }
305+
290306
}
291307
}
292308
}
@@ -339,3 +355,51 @@ fun MavenPom.setUpPomDetails() {
339355
}
340356
}
341357
}
358+
359+
360+
tasks.register("listArtifacts") {
361+
doLast {
362+
kotlin.targets.forEach { target ->
363+
println("Target: ${target.name}")
364+
365+
// Get all binary artifacts
366+
target.compilations.forEach { compilation ->
367+
println(" Compilation: ${compilation.name}")
368+
369+
// Get the output file/directory for this compilation
370+
when (target) {
371+
is org.jetbrains.kotlin.gradle.targets.jvm.KotlinJvmTarget -> {
372+
val jarTask = tasks.findByName("${target.name}Jar") as? org.gradle.api.tasks.bundling.Jar
373+
println(" Output: ${jarTask?.archiveFileName?.get() ?: "N/A"} (JAR)")
374+
}
375+
376+
is org.jetbrains.kotlin.gradle.targets.js.KotlinJsTarget -> {
377+
val jsTask = tasks.findByName("${compilation.name}ProductionExecutable") as? org.gradle.api.Task
378+
println(" Output: ${jsTask?.outputs?.files?.singleFile?.name ?: "N/A"} (JS Bundle)")
379+
}
380+
381+
// is org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget -> {
382+
// val klib = target.binaries.findKlibs(compilation)
383+
// println(" KLIB: ${klib.map { it.outputFile.name }.joinToString() ?: "N/A"}")
384+
//
385+
// // Print executables/frameworks
386+
// target.binaries.forEach { binary ->
387+
// println(" Binary: ${binary.outputFile.name} (${binary.javaClass.simpleName})")
388+
// }
389+
// }
390+
391+
else -> println(" Unknown target type: ${target.javaClass.simpleName}")
392+
}
393+
}
394+
println()
395+
}
396+
}
397+
}
398+
399+
//// Helper function to find KLIBs for a compilation
400+
//fun org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeBinaryContainer.findKlibs(
401+
// compilation: org.jetbrains.kotlin.gradle.plugin.KotlinCompilation<*>
402+
//): List<org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeLibrary> {
403+
// return filterIsInstance<org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeLibrary>()
404+
// .filter { it.compilation == compilation }
405+
//}

0 commit comments

Comments
 (0)