- Go to [Your Profile] => [Developer settings] => [Personal access token] => [Generate new token] on github.com
- Check
read:packages
- Click
Generate token
- Copy the generated token
- Add below lines to your
~/.gradle/gradle.properties
(the path may be different on Windows)
GITHUB_ID={your github id}
GITHUB_PACKAGES_TOKEN={the generated token}
- Merge below lines to your
<project root>/settings.gradle
(If you are using the recent version of Android Gradle Plugin)
dependencyResolutionManagement {
repositories {
maven {
url "https://maven.pkg.github.com/skgmn/*"
credentials {
username GITHUB_ID
password GITHUB_PACKAGES_TOKEN
}
}
}
}
or to your <project root>/build.gradle
allprojects {
repositories {
maven {
url "https://maven.pkg.github.com/skgmn/*"
credentials {
username GITHUB_ID
password GITHUB_PACKAGES_TOKEN
}
}
}
}
- Finally add an artifact to use to your
<project root>/app/build.gradle
dependencies {
implementation "com.github.skgmn:viewmodelevent:1.0.0"
}