While not without some limitations, here’s what I’ve used as a workaround for now
tasks.addRule( 'Pattern: <included build>%<task>' ) { String taskName ->
if( taskName.contains( '%' ) ) {
def parts = taskName.split( '%' )
if( parts.size() != 2 ) {
throw new RuntimeException( "Invalid included build task reference '${taskName}'" )
}
task( taskName ) {
dependsOn gradle.includedBuild( parts[0] ).task( ":${parts[1]}" )
}
}
}