https://github.com/gradleup/maven-sympathy
A Gradle plugin to be nice with Maven consumers 💙
https://github.com/gradleup/maven-sympathy
Last synced: 7 months ago
JSON representation
A Gradle plugin to be nice with Maven consumers 💙
- Host: GitHub
- URL: https://github.com/gradleup/maven-sympathy
- Owner: GradleUp
- Created: 2024-05-06T20:13:23.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-07T22:33:15.000Z (about 2 years ago)
- Last Synced: 2024-05-07T23:23:56.853Z (about 2 years ago)
- Language: Kotlin
- Homepage: https://jakewharton.com/nonsensical-maven-is-still-a-gradle-problem/
- Size: 50.8 KB
- Stars: 5
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Maven Sympathy
A small Gradle plugin that checks that your project dependencies play nice with Maven resolution strategy.
See https://jakewharton.com/nonsensical-maven-is-still-a-gradle-problem/ for more details.
# Usage:
The plugin is available on Maven Central
```kotlin
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath("com.gradleup.maven-sympathy:maven-sympathy:0.0.2")
}
}
plugins {
id("com.gradleup.maven-sympathy")
}
```
It registers a `sympathyForMrMaven` task that checks that none of your project transitive dependencies upgrades the direct ones:
```
$ ./gradlew :sympathyForMrMaven
> Task :sympathyForMrMaven FAILED
e: direct dependency org.jetbrains.kotlin:kotlin-stdlib-common:1.8.21 of configuration 'allSourceSetsCompileDependenciesMetadata' was changed to 1.9.21
e: direct dependency org.jetbrains.kotlin:kotlin-stdlib:1.8.21 of configuration 'allSourceSetsCompileDependenciesMetadata' was changed to 1.9.21
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':sympathyForMrMaven'.
> Declared dependencies were upgraded transitively. See task output above. Please update their versions.
```
`sympathyForMrMaven` is also added as a dependency to the "check" aggregate task.