Waqas Tahir
10/04/2021, 8:59 AMkpgalligan
10/19/2021, 12:56 PMWaqas Tahir
10/19/2021, 1:00 PMWaqas Tahir
10/19/2021, 1:05 PMmaven-publish
plugin and sync and Gradle tasks for publishing to GitHub packages will be generated
Also change the repository
GitHub properties include gpt.usr and gpt.key , username and GitHub token key respectively
val githubProperties = Properties()
try {
githubProperties.load(FileInputStream(rootProject.file("github.properties")))
} catch (e: Exception) {
}
afterEvaluate {
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/timeline-notes/compose-draggable-list|https://maven.pkg.github.com/timeline-notes/compose-draggable-list>")
credentials {
/**Create github.properties in root project folder file with gpr.usr=GITHUB_USER_ID & gpr.key=PERSONAL_ACCESS_TOKEN**/
username = (githubProperties["gpr.usr"] ?: System.getenv("GPR_USER")).toString()
password = (githubProperties["gpr.key"] ?: System.getenv("GPR_API_KEY")).toString()
}
}
}
}
}
Waqas Tahir
10/19/2021, 1:07 PMWaqas Tahir
10/19/2021, 1:08 PM