Skip to content

Commit

Permalink
Update the readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ansman committed Mar 29, 2024
1 parent a96b500 commit 5db49e7
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ Firstly, you need to add the plugin to your included build's build script (for e
plugin {
id("co.hinge.gradle.project-accessors") version "1.1.0"
}

// If you also want to use the utilities you can add this:
dependencies {
id("co.hinge.gradle.project-accessors:project-accessors:1.1.0")
}
```

For most projects, that's all that's needed. You can then access the projects using the generated accessors:
Expand Down Expand Up @@ -59,6 +64,22 @@ projectAccessors {
}
```

## Utilities
### Copying Project Dependencies
Sometimes you need to depend on a specific configuration of a project. This is
annoying to do with Kotlin build scripts as you have to copy the dependency then
change the configuration.

To make this easier, the plugin provides a utility function that allows you to quickly
copy a dependency and change the configuration:
```kotlin
import co.hinge.gradle.projectaccessors.copy

dependencies {
implementation(projects.someModule.copy(targetConfiguration = "someConfiguration"))
}
```

## Supported Gradle Versions
The plugin is tested with all minor Gradle versions from 7.6 up to 8.7, but may work with other versions.

Expand Down

0 comments on commit 5db49e7

Please sign in to comment.