Sample project samples/native-binaries/cpp-exe fails to build with Gradle 2.6


Trying to build the sample project samples/native-binaries/cpp-exe using Gradle 2.6 gives the following error:

tabbott@tony:~/wip/gradle-2.6/samples/native-binaries/cpp-exe$ ../../../bin/gradle build

FAILURE: Build failed with an exception.

* Where:
Build file '/home/tabbott/wip/gradle-2.6/samples/native-binaries/cpp-exe/build.gradle' line: 17

* What went wrong:
A problem occurred configuring root project 'sampleExe'.
> Exception thrown while executing model rule: model.tasks
   > $() syntax cannot be used when model {} block is not a top level statement in the script

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.


Total time: 3.85 secs

Ah, thanks.

The $() syntax is hidden behind an undocumented experimental flag (enabled with -Dorg.gradle.model.dsl=true). We probably shouldn’t be including this sample right now or at least warn about that in the build.gradle. We use this sample for integration tests for the new syntax.

The cpp sample is a complete sample for the current @Incubating support.