Take xyz.sunwei:design-pattern:0.1.0 for example - package
plugins {
id 'java'
id 'maven'
}
repositories {
jcenter()
maven {
url "https://maven.pkg.github.com/sunwei/design-patterns-java"
credentials {
username = System.getenv("USERNAME") ?: System.getProperty("USERNAME")
password = System.getenv("PASSWORD") ?: System.getProperty("PASSWORD")
}
}
}
dependencies {
implementation 'xyz.sunwei:design-pattern:0.1.0'
}
systemProp.USERNAME=<your-github-username>
systemProp.PASSWORD=<your-github-token-with-package-permission>
Example: