Skip to content

Commit b555572

Browse files
authored
Update README.md
updated README
1 parent 7ffe89f commit b555572

1 file changed

Lines changed: 15 additions & 3 deletions

File tree

README.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ The `private-repository-plugin` is a simple plugin for making dependencies on pr
44
## Installation
55
Simply include the following as a gradle plugin:
66
```yaml
7-
// kotlin DSL, but nearly identical for groovy
87
plugins {
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+
```
3345
By default, repositories will use the following properties from the project's properties:
3446
```properties
3547
private-repository.github.username=YOUR_GITHUB_USERNAME
@@ -67,4 +79,4 @@ requires its own maven block. This can result in lengthy build.gradle files.
6779

6880
Additionally, translating environment variables (used in CI/CD) to gradle.properties (used in docker images) is an
6981
annoying 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

Comments
 (0)