BreadMoirai / github-release-gradle-plugin

A Gradle Plugin to send Releases to Github
Apache License 2.0
108 stars 26 forks source link

Review distributed jar contents #58

Closed TWiStErRob closed 11 months ago

TWiStErRob commented 1 year ago

Hi, I was browsing the Gradle source code in a project where this plugin is used and noticed that your .jar file contains the following .class files:

This jar file weighs 80MB.

You're not publishing a standalone (fat/shadowed) JAR file to be used as a CLI util, right? It's a Gradle Plugin on the portal which means that it'll be used in a plugins block and dependencies in the POM downloaded and referenced on the classpath.

This can cause classpath problems when your plugin is used by anyone because of duplicate classes.

If you're using Shadowing, please review the configuration, but it's best if you exclude Gradle, Groovy, Kotlin in general, even from the shadowed version. But Java/Maven/Gradle's dependency management conventions are the best to be used. Shadowing is not necessary in most of the cases for any library.

The target file size is about 200kb, based on the 7+4 production classes you have in the src folders in the repo. Essentially github-release-2.4.1.jar/com/github/breadmoirai/githubreleaseplugin + the plugin properties file in META-INF. I think you should be able to test with gradlew publishToMavenLocal and inspect the ~/.m2/ folder contents.