Well there are 2 problems I see in that repo. One is that there are zero Bnd projects in the repo. A Bnd project must have a bnd.bnd file. If I add an empty bnd.bnd file to cnf, then the workspace has one Bnd project which is cnf. The Bnd gradle plugin is only applied to Bnd projects.
The second issue is your "alias": `task myAlias(dependsOn: build)` is in the root project's build.gradle file. There is no build task in the root project. The build tasks exists in each subproject to which the Bnd gradle plugin is applied. Try moving that task into the subprojects {} section:
/* Configure the subprojects */
subprojects {
def bndProject = bndWorkspace.getProject(name)
if (bndProject != null) {
plugins.apply 'biz.aQute.bnd'
task myAlias(dependsOn: build) {
}
}
}
Notice that I also added {} to the task myAlias code since the task method requires a closure argument.
$ ./gradlew --no-daemon
:cnf:myAlias
:cnf:compileJava UP-TO-DATE
:cnf:processResources UP-TO-DATE
:cnf:classes UP-TO-DATE
:cnf:jar UP-TO-DATE
:cnf:assemble UP-TO-DATE
:cnf:compileTestJava UP-TO-DATE
:cnf:processTestResources UP-TO-DATE
:cnf:testClasses UP-TO-DATE
:cnf:test UP-TO-DATE
:cnf:check SKIPPED
:cnf:build UP-TO-DATE
:cnf:myAlias UP-TO-DATE
BUILD SUCCESSFUL