Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
updated README
  • Loading branch information
evanc-mfw authored Nov 25, 2024
1 parent 7ffe89f commit b555572
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ The `private-repository-plugin` is a simple plugin for making dependencies on pr
## Installation
Simply include the following as a gradle plugin:
```yaml
// kotlin DSL, but nearly identical for groovy
plugins {
id("com.moneyforward.private-repository") version "0.0.0"
id("com.moneyforward.private-repository") version "0.3.0"
}
```

Expand All @@ -20,6 +19,7 @@ repositories {
allowEmptyCredentials = false // optional, defaults to false
// reference to your GitHub package dependency
repository("https://maven.pkg.github.com/OWNER/REPOSITORY")
repository(gpr("OWNER", "REPOSITORY")) // use gpr function for shortcut to GitHub packages URL
repository("https://maven.pkg.github.com/OWNER/OTHER_REPOSITORY") {
// example for providing specific username and token to use in resolution
credentialsProvider = StaticCredentialsProvider(
Expand All @@ -30,6 +30,18 @@ repositories {
}
}
```

The plugin can also be used in the `settings.gradle` file to add resolution for plugins within build files.
```kotlin
// settings.gradle.kts
plugins {
id("com.moneyforward.private-repository-plugin") version LATEST_VERSION_HERE
}
// additional block to specify repositories, with same configuration as used in build file
privatePlugins {
repository(gpr("OWNER", "REPO"))
}
```
By default, repositories will use the following properties from the project's properties:
```properties
private-repository.github.username=YOUR_GITHUB_USERNAME
Expand Down Expand Up @@ -67,4 +79,4 @@ requires its own maven block. This can result in lengthy build.gradle files.

Additionally, translating environment variables (used in CI/CD) to gradle.properties (used in docker images) is an
annoying process to stream-line. This plugin addresses the problem via the custom gradle task that can be ran in CI/CD
which automatically applies environment variables to the gradle.properties.
which automatically applies environment variables to the gradle.properties.

0 comments on commit b555572

Please sign in to comment.