Category Archives: Gradle

Publishing and deployment of artifact in Gradle

We can use maven plugin to install the artifact to local repository. After applying maven plugin, you can use install task to deploy the artifact to local repository.

apply plugin: 'maven'

After install task is executed the artifact is deployed to local maven repository as shown in below image.

maven plugin in gradle
maven plugin in gradle

To deploy the artifact to remote repository, you can use below task in build.gradle file.

uploadArchives {
repositories {
mavenDeployer {
repository(url: “file://server/Repo/”)
}
}
}