OneCloud internal Java Maven Repository
- Make sure you have a GitHub personal access token setup on your machine with access to read/write packages. If you do not, follow the instructions here
- Add the generated token to your
~/.zshrc
(or equivalent) as an environment variableGITHUB_TOKEN
- The token must have access to read/write packages
- Add another environment variable to your
~/.zshrc
(or equivalent) containing your github username, stored inGITHUB_USERNAME
- Copy the contents of the sample build.gradle file to your library. then add additional gradle settings and dependencies as desired
- Copy the sample gradle.properties file in this repo and replace the variables with the desired values
- Develop your library
./gradlew publish
- Once completed, you will see the new package here
- In your
build.gradle
file, add the below maven repository configuration
repositories {
// ... other repositories such as mavenCentral()
maven {
url = "https://maven.pkg.github.com/OneCloudInc/maven_repository"
credentials {
username = System.getenv("GITHUB_USERNAME")
password = System.getenv("GITHUB_TOKEN")
}
}
}