About
Code Shipping - (Repository | Registry) in Gradle.
A repository is a collection of modules, organized by group, name and version.
Articles Related
Management
Get artifact
Syntax
Type
https://docs.gradle.org/current/userguide/repository_types.html#repository_types
Order
Gradle will look for a dependency in each repository in the order they are specified, stopping at the first repository that contains the requested module
Example
repositories {
mavenLocal()
mavenCentral()
jcenter() // Public Bintray Artifactory repository
maven {
url = 'http://repo.maven.apache.org/maven2'
}
ivy {
// URL can refer to a local directory
url "../local-repo"
}
}
where:
Sourceforge
repositories {
ivy {
url 'https://iweb.dl.sourceforge.net/project'
patternLayout {
artifact "[organization]/[organization]/[revision]/[module]-[revision]-bin.[ext]"
}
}
}
Publish
plugins {
id 'maven'
}
uploadArchives {
repositories {
mavenDeployer {
repository(url: "file://localhost/tmp/myRepo/")
}
}
}
To build the JAR file, generate a .pom file and upload the artifacts, execute the following command:
gradle uploadArchives