Last active
December 17, 2019 15:49
-
-
Save prasad79/dfa0a41f104436e6204c2cbac8d8b303 to your computer and use it in GitHub Desktop.
Publishing Android library to Github Packages using Kotlin DSL - configure repositories details
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 { | |
repositories { | |
maven { | |
name = "GitHubPackages" | |
/** Configure path of your package repository on Github | |
* Replace GITHUB_USERID with your/organisation Github userID and REPOSITORY with the repository name on GitHub | |
*/ | |
url = uri("https://maven.pkg.github.com/GITHUB_USERID/REPOSITORY") // Github Package | |
credentials { | |
//Fetch these details from the properties file or from Environment variables | |
username = githubProperties.get("gpr.usr") as String? ?: System.getenv("GPR_USER") | |
password = githubProperties.get("gpr.key") as String? ?: System.getenv("GPR_API_KEY") | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment