Created
September 16, 2022 19:01
-
-
Save tslmy/ec271a12f78722443207774582b52109 to your computer and use it in GitHub Desktop.
Defining your own Maven Repository server: Gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
publishing { | |
publications { | |
// Defines a publication that sends the compiled Java component to Maven. | |
maven(MavenPublication) { from(components.java) } | |
} | |
repositories { | |
maven { | |
def type = version.endsWith('SNAPSHOT') ? 'snapshots' : 'releases' | |
name = "repo-for-${type}" | |
url = "https://example.com/repositories/${type}/" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment