I’ve integrated a library through ivy. It provides other artifacts with a special type. When copying I would like to have only a type sql.
ivy.xml
<configurations>
<conf name="default" visibility="public"/>
<conf name="runtime" visibility="public"/>
<conf name="provided" visibility="public"/>
</configurations>
<publications>
<artifact name="libary1" type="jar" ext="jar" conf="default"/>
<artifact name="libary2" type="jar" ext="jar" conf="default"/>
<artifact name="sql" type="sql" ext="zip" conf="provided"/>
<artifact name="module" type="module" ext="zip" conf="provided"/>
<artifact name="reports" type="report" ext="zip" conf="provided"/>
<artifact name="definition1" type="standard" ext="zip" conf="provided"/>
<artifact name="definition2" type="standard" ext="zip" conf="provided"/>
<artifact name="definition3" type="standard" ext="zip" conf="provided"/>
<artifact name="definition4" type="standard" ext="zip" conf="provided"/>
<artifact name="definition5" type="standard" ext="zip" conf="provided"/>
<artifact name="definition6" type="standard" ext="zip" conf="provided"/>
<artifact name="libweb" type="web" ext="war" conf="provided"/>
</publications>
build.gradle
configurations {
provided{}
}
dependencies {
provided group: 'com.group', name: 'libname', version: '1.0', configuration: 'provided'
}
task distribute () <<
copy {
from {
configurations.provided
inclcude ....
}
into dest
rename { name ->
def artifacts = configurations.provided.resolvedConfiguration.resolvedArtifacts
def artifact = artifacts.find { it.file.name == name }
"${artifact.name}.${artifact.extension}"
}
}
}