Created
December 17, 2019 16:03
-
-
Save prasad79/7bcbd578967bd70a7f6d547b98e50c0f to your computer and use it in GitHub Desktop.
Consuming an Android library from 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
android{ | |
repositories { | |
maven { | |
name = "GitHubPackages" | |
/* Configure path to the library hosted on GitHub Packages Registry | |
* Replace UserID with package owner userID and REPOSITORY with the repository name | |
* e.g. "https://maven.pkg.github.com/enefce/AndroidLibrary-GPR-KDSL" | |
*/ | |
//url = uri("https://maven.pkg.github.com/UserID/REPOSITORY") | |
url = uri("https://maven.pkg.github.com/enefce/AndroidLibrary-GPR-KDSL") | |
credentials { | |
/**Create github.properties in root project folder file with gpr.usr=GITHUB_USER_ID & gpr.key =PERSONAL_ACCESS_TOKEN**/ | |
username = githubProperties["gpr.usr"] as String? ?: System.getenv("GPR_USER") | |
password = githubProperties["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