Skip to content

Instantly share code, notes, and snippets.

@qrtt1
Last active December 25, 2017 04:35
Show Gist options
  • Save qrtt1/429ae1ec9a8a91156b887ef2352d7f17 to your computer and use it in GitHub Desktop.
Save qrtt1/429ae1ec9a8a91156b887ef2352d7f17 to your computer and use it in GitHub Desktop.
task copyDepends {
doLast {
configurations.implementation.canBeResolved = true
configurations.implementation.each {
def suffix = it.absolutePath.split("/")[-5..-1]
def (group, artifact, version) = suffix[-5..-3]
def basePath = (it.absolutePath - suffix.join("/")) + suffix[-5..-3].join("/")
copy {
from fileTree(basePath).files
into "build/localMavenRepo/$group/$artifact/$version"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment