0

In one of my coding projects, I created an extensive utility API as a Gradle subproject. Now, I've realized that the code I've written is really powerful, and I want to extract it into a standalone Gradle project that can be uploaded to Maven. How do you do this?

Sam54123
  • 13
  • 1
  • 2

1 Answers1

0

Create a new Gradle project via init plugin, select Java library: https://docs.gradle.org/current/userguide/build_init_plugin.html#sec:java_library

Following the documentation for building Java libraries: https://docs.gradle.org/current/samples/sample_building_java_libraries.html

You should also read more about the Java Library plugin as well: https://docs.gradle.org/current/userguide/java_library_plugin.html

Once you are ready to publish, you will want to configure the Maven Publish plugin: https://docs.gradle.org/current/userguide/publishing_maven.html

There is also a plugin that can aid publishing to Central: https://github.com/gradle-nexus/publish-plugin

Cisco
  • 20,972
  • 5
  • 38
  • 60