Publish Maven Local

We can publish a library to maven local for testing purposes.

To do so, add the following in build.gradle

publishing {  
  publications {  
    maven(MavenPublication) {  
      groupId = 'dev.auspham'  
      artifactId = 'kafka-web-test'  
      version = '0.1.0'  
      from components.java  
    }  
  }  
}

And then we can just run ./gradlew publishToMavenLocal

To consume

To consume, we can just add mavenLocal() in our repository:

repositories {
	mavenLocal()
}

And then use it like this

implementation('dev.auspham:kafka-web-test:0.1.0')