https://github.com/be-hase/gradle-lookup-dependencies
Lookup dependencies for Gradle
https://github.com/be-hase/gradle-lookup-dependencies
Last synced: 3 months ago
JSON representation
Lookup dependencies for Gradle
- Host: GitHub
- URL: https://github.com/be-hase/gradle-lookup-dependencies
- Owner: be-hase
- License: mit
- Created: 2024-05-17T02:14:33.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-03T00:39:17.000Z (4 months ago)
- Last Synced: 2025-03-03T01:26:29.468Z (4 months ago)
- Language: Kotlin
- Homepage:
- Size: 162 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gradle-lookup-dependencies

## Motivation
There are cases where you want to check whether a specific dependency is included, and if it is, where it came from
(e.g., when vulnerabilities are reported via tools like Dependabot).You can investigate using tasks like ./gradlew dependencies or ./gradlew dependencyReport,
but it requires using tools like grep and can be cumbersome.By using this plugin, you can solve these issues easily.
## How to use?
### TL;DR
```kotlin
// apply plugin
plugins {
id("dev.hsbrysk.lookup-dependencies") version "{{version}}"
}
``````
./gradlew lookupDependencies --dependency org.springframework:spring-web --version-range ">= 6.1.0, < 6.1.6"...
< testImplementationDependenciesMetadata >
org.springdoc:springdoc-openapi-starter-webmvc-ui:2.5.0
org.springdoc:springdoc-openapi-starter-webmvc-api:2.5.0
org.springframework:spring-webmvc:6.1.5
org.springframework:spring-web:6.1.5...
```### Task Options
```shell
./gradlew help --task lookupDependenciesOptions
--allow-revisit When the dependency tree is being explored, omit this if the dependency has already been explored.--no-allow-revisit Disables option --allow-revisit.
--configuration The configuration you want to lookup. Default is all configuration.
--dependency The dependency you want to lookup
--version-range Comparative expression of version to lookup. e.g. `>= 1.3, < 1.26.0`
```### Examples
```shell
# lookup org.springframework:spring-web with version is 6.1.6
./gradlew lookupDependencies --dependency org.springframework:spring-web:6.1.6# lookup org.springframework:spring-web (version is not considered)
./gradlew lookupDependencies --dependency org.springframework:spring-web# lookup org.springframework:spring-web with version in the range `>= 6.1.0` and `< 6.1.6`
./gradlew lookupDependencies --dependency org.springframework:spring-web --version-range ">= 6.1.0, < 6.1.6"
```## Contributing
If there are any issues, please feel free to send a pull request.