Skip to content

Commit

Permalink
docs: Add Gradle Property Documentation (#585)
Browse files Browse the repository at this point in the history
* Add Gradle Property Documentation

* fix example
  • Loading branch information
scprek authored May 17, 2024
1 parent 5d73ab8 commit 0c7c868
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,34 @@ This plugin updates `gradle.properties` to bump up project version. If you want
},
```

# Gradle Properties

## Publish Properties

Users can specify an API key and secret by supplying the following environment variables:

1. `GRADLE_PUBLISH_KEY=my-key`
- This will get translated to `-Pgradle.publish.key=my-key`
2. `GRADLE_PUBLISH_SECRET=my-secret`
- This will get translated to `-Pgradle.publish.secret=my-secret`

Possible usage in `build.gradle.kts`

```kotlin
publishing {
repositories {
maven {
name = "OrgRepo"
url = uri("https://maven.pkg.github.com/org/repo")
credentials {
username = project.properties["gradle.publish.key"].toString()
password = project.properties["gradle.publish.secret"].toString()
}
}
}
}
```

# FAQ

## How it's different with the [@tschulte/gradle-semantic-release-plugin](https://github.com/tschulte/gradle-semantic-release-plugin)?
Expand Down

0 comments on commit 0c7c868

Please sign in to comment.