@@ -4,9 +4,8 @@ The `private-repository-plugin` is a simple plugin for making dependencies on pr
44## Installation
55Simply include the following as a gradle plugin:
66```yaml
7- // kotlin DSL, but nearly identical for groovy
87plugins {
9- id("com.moneyforward.private-repository") version "0.0 .0"
8+ id("com.moneyforward.private-repository") version "0.3 .0"
109}
1110```
1211
@@ -20,6 +19,7 @@ repositories {
2019 allowEmptyCredentials = false // optional, defaults to false
2120 // reference to your GitHub package dependency
2221 repository("https://maven.pkg.github.com/OWNER/REPOSITORY")
22+ repository(gpr("OWNER", "REPOSITORY")) // use gpr function for shortcut to GitHub packages URL
2323 repository("https://maven.pkg.github.com/OWNER/OTHER_REPOSITORY") {
2424 // example for providing specific username and token to use in resolution
2525 credentialsProvider = StaticCredentialsProvider(
@@ -30,6 +30,18 @@ repositories {
3030 }
3131}
3232```
33+
34+ The plugin can also be used in the `settings.gradle` file to add resolution for plugins within build files.
35+ ```kotlin
36+ // settings.gradle.kts
37+ plugins {
38+ id("com.moneyforward.private-repository-plugin") version LATEST_VERSION_HERE
39+ }
40+ // additional block to specify repositories, with same configuration as used in build file
41+ privatePlugins {
42+ repository(gpr("OWNER", "REPO"))
43+ }
44+ ```
3345By default, repositories will use the following properties from the project's properties:
3446```properties
3547private-repository.github.username=YOUR_GITHUB_USERNAME
@@ -67,4 +79,4 @@ requires its own maven block. This can result in lengthy build.gradle files.
6779
6880Additionally, translating environment variables (used in CI/CD) to gradle.properties (used in docker images) is an
6981annoying process to stream-line. This plugin addresses the problem via the custom gradle task that can be ran in CI/CD
70- which automatically applies environment variables to the gradle.properties.
82+ which automatically applies environment variables to the gradle.properties.
0 commit comments