Slackbot
02/11/2022, 8:34 AMCristianGM
02/11/2022, 8:37 AMCristianGM
02/11/2022, 8:39 AMdungdm93
02/11/2022, 8:44 AMDo you own that iceberg-data project?Nope.
dungdm93
02/11/2022, 8:47 AMdungdm93
02/11/2022, 8:47 AMTestPartitioningWriters
is in iceberg-data-0.13.0-tests.jar
, i guestdungdm93
02/11/2022, 9:01 AMtestImplementation("org.apache.iceberg:iceberg-data:$icebergVersion:tests")
Vampire
02/11/2022, 11:29 AMtestImplementation("org.apache.iceberg:iceberg-data:0.13.0") {
capabilities {
requireCapability("org.apache.iceberg:iceberg-data-tests")
}
}
The idiomatic work-around is to use a component metadata rule to add that variant ad-hoc like
dependencies {
components {
withModule("org.apache.iceberg:iceberg-data") {
addVariant("tests") {
withCapabilities {
removeCapability(id.group, id.name)
addCapability(id.group, "${id.name}-tests", id.version)
}
withFiles {
addFile("${id.name}-${id.version}-tests.jar")
}
}
}
}
testImplementation("org.apache.iceberg:iceberg-data:0.13.0") {
capabilities {
requireCapability("org.apache.iceberg:iceberg-data-tests")
}
}
}
Or with the component metadata rule in your settings script, or even with the logic in its own class.melix
02/11/2022, 3:22 PMtestImplementation(testFixtures("org.apache.iceberg:iceberg-data:0.13.0"))
Vampire
02/11/2022, 3:26 PMmelix
02/11/2022, 3:36 PMtestFixtures
notation, not the longer capabilities oneVampire
02/11/2022, 3:43 PMtestImplementation(testFixtures("org.apache.iceberg:iceberg-data:0.13.0"))
and
dependencies {
components {
withModule("org.apache.iceberg:iceberg-data") {
addVariant("testFixtures") {
withCapabilities {
removeCapability(id.group, id.name)
addCapability(id.group, "${id.name}-test-fixtures", id.version)
}
withFiles {
addFile("${id.name}-${id.version}-tests.jar")
}
}
}
}
testImplementation(testFixtures("org.apache.iceberg:iceberg-data:0.13.0"))
}
melix
02/11/2022, 3:43 PM