Open overcat opened 3 months ago
Could you share your project to make investigating this easier?
Hi @gabrielittner, since I couldn't find a solution, I am now using nmcp as an alternative.
https://github.com/lightsail-network/java-stellar-sdk/blob/master/build.gradle.kts#L189-L199
Hi, @gabrielittner
Same issue, any update? Currently only support with or without sources and javadoc, but not for with or without the output jar.
boilerplate-1.0.0-javadoc.jar (support config now, if don't want)
boilerplate-1.0.0-sources.jar (support config now, if don't wan)
boilerplate-1.0.0.jar 【can not config now, if don't want】
Because I wanted to upload an aar with so files, not only jar. I don't want xxx.jar to upload. I found a way to upload custom aar and delete the xxx.jar now, but maybe not an elegant way to modify.
(publications.getByName("maven") as? MavenPublication)?.apply {
// filter only javadoc and sources, it worsk
val arts = artifacts.filter {
it.file.name.endsWith("javadoc.jar") || it.file.name.endsWith("sources.jar")
}
// add and override
setArtifacts(arts)
artifact("bin/boilerplate-1.0.0.aar") {
classifier = "aar"
}
}
I also tried to modify Platform, and configure(CustomPlatform())
in the MavenPublishBaseExtension,
but the Platform is a sealed class, I can not inherit it. And its Subclass like JavaLibrary, AndroidSingleVariantLibrary is data class, I can not modify it too.
So, I can not find a solution to custom the artifact to upload now.
Hello, I encountered some difficulties when publishing my custom artifact to Maven Central. Here is my
build.gradle.kts
file. On line 25, I defineduberJar
. When I execute./gradlew clean build
, I can findboilerplate-1.0.0-uber.jar
file in thebuild/libs
folder. However, when I execute./gradlew clean publishToMavenLocal
, I cannot find this file in~/.m2/repository/io/github/exampleuser/boilerplate/1.0.0
folder. What should I do to make it appear here?Thank you for your time.