How to publish a regular, non-Android Java library so that it becomes available for inclusion in Java projects through Maven & Gradle build scripts?

I recently created a third-party library for Java. I am currently distributing the library through Github and my own website where I can download the JAR file. I want to make it possible for developers to use Gradle and Maven (and possibly other build automation tools) to easily include my third-party library in their projects.

I am new to Maven, Gradle, Bintray, JCenter, MavenCentral, Ivy, etc. However, I have experience with Ant, Java, and Linux.

I tried to learn how to publish my third-party library using the above tools / platforms, but I got confused.

  • Based on what I read, Gradle, Maven and Ant are competing technologies. So why, then, in the context of real-world use cases, does Gradle seem so interwoven with Maven?
  • Bintray touts itself as a platform for publishing and distributing software. So, why did you need to create JCenter as something different from the rest of Bintray? What can JCenter do that Bintray cannot?
  • I created a test package and version on Bintray, and I uploaded the JAR file to the version. Is it possible to write a Gradle script that can include this JAR file depending on the Java project? Or should the package be β€œlinked” to JCenter?

, - , ? , . . , , , , .

+4
2

, :)

, , Gradle, Maven Ant - . , , , , Gradle Maven?

( Maven Gradle), Maven ( POM), (src/main/java ..) (groupId/version/artifactId-version.ext), Maven - . , , Gradle .

, Gradle , Maven . ​​ , Gradle , , Maven, Maven ..

Bintray . , JCenter Bintray? JCenter Bintray ?

JCenter "- " Bintray. JCenter - Bintray. ( "Central Repository" ), Bintray ( ) Java . Java ( Android) , Bintray , , Bintray, JCenter. , JCenter .

Bintray, JAR . Gradle script, JAR Java ?

. "Set Me Up" , , Gradle. Gradle.

"" JCenter?

JCenter , , JCenter , Bintray, .

, .


JFrog, Bintray [artifactory], . .

+3

( ) , ( 5 ), , ( ). stackexchange.

, maven, , , :

1) maven == > . https://maven.apache.org/guides/mini/guide-central-repository-upload.html

2) maven (, )

3) maven- ( ) , "" - github

0

All Articles