Skip to content

Instantly share code, notes, and snippets.

@udalov
Created January 4, 2021 15:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save udalov/e4fd7f32838aa7b49a05a8d1e8ff75a3 to your computer and use it in GitHub Desktop.
Save udalov/e4fd7f32838aa7b49a05a8d1e8ff75a3 to your computer and use it in GitHub Desktop.
get-jar-from-gradle-dependency.gradle
// Usage: gradle -b get-jar-from-gradle-dependency.gradle
apply plugin: 'java'
repositories {
mavenCentral()
jcenter()
}
dependencies {
compileOnly("javax.inject:javax.inject:1") // Replace with the coordinates of the required dependency
}
task getJar {
configurations.compileClasspath.forEach { println(it) }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment