James
06/11/2024, 7:18 PMsettings.gradle.kts file they need to add the internal maven repository, which is fine, but I would like my consumers not to be required to add gradlePluginPortal() and mavenCentralMirror() (link to custom maven central mirror).
My initial thought is to create a far jar that contains all the dependencies the Gradle plugin needs, but I'm unsure how to make the java-gradle-plugin and the com.gradle.plugin-publish plugins use the fat jar and not the normal jar? Any ideas?
edit: build.gradle.kts file in đź§µJames
06/11/2024, 7:20 PMAdam
06/11/2024, 8:02 PMJames
06/11/2024, 8:03 PMcom.github.johnrengelman.shadow gradle plugin. So I added the plugin, and I was no longer able to reload the gradle project in IntelliJ, receiving the following message: `Please configure the shadowJar task to not add a classifier to the jar it produces`. So I added this:
tasks.named("shadowJar", Jar::class.java) {
archiveClassifier.set("")
}
Now the module is able to reload and publish to maven local, but when trying to import it I receive "Plugin [id: 'my-enterprise-plugin', version: 'UNVERSIONED'] was not found in any of the following sources:"
This worked before adding the shadow plugin, but not after.Martin
06/11/2024, 9:32 PMruntimeClasspath files manually.Martin
06/11/2024, 9:37 PMtasks.register("fatJar", Zip::class.java) {
from(configurations.getByName("runtimeClasspath").elements.map { it.map { zipTree(it) } })
from(kotlin.target.compilations.getByName("main").output.classesDirs)
archiveClassifier.set("fat")
}Martin
06/11/2024, 9:37 PMMartin
06/11/2024, 9:38 PMMartin
06/11/2024, 9:38 PMVampire
06/12/2024, 6:46 AM