If you need a list of file names from runtime (or other type of) dependencies, this is one way to do it:
def files = []
configurations.runtime.files.forEach() { f ->
files += f.name
}
The list can be helpful if you need to put it as a Class-Path attribute of JAR manifest file:
jar {
manifest {
def files = []
configurations.runtime.files.forEach() { f ->
files += f.name
}
attributes("Class-Path": files.join(' '))
}
}
def files = []
configurations.runtime.files.forEach() { f ->
files += f.name
}
The list can be helpful if you need to put it as a Class-Path attribute of JAR manifest file:
jar {
manifest {
def files = []
configurations.runtime.files.forEach() { f ->
files += f.name
}
attributes("Class-Path": files.join(' '))
}
}