i tried" Example 2. A build file with an implicit conflict of logging frameworks" in https://docs.gradle.org/current/userguide/component_capabilities.html.
but cannot resolve symbol ‘id’, ‘allVariants’, ‘withCapabilities’
how can i solve this problem?
@CompileStatic
class AsmCapability implements ComponentMetadataRule {
void execute(ComponentMetadataContext context) {
context.details.with {
if (id.group == “asm” && id.name == “asm”) {
allVariants {
it.withCapabilities {
// Declare that ASM provides the org.ow2.asm:asm capability, but with an older version
it.addCapability(“org.ow2.asm”, “asm”, id.version)
}
}
}
}
}
}