I am new to creating a c / cpp plugin in gradle. This is the project structure.
.
|
`
`
`
`
Content hello.c
#include <stdio.h>
int main(int argc, char** argv){
printf("Hello World!\n");
return 0;
}
Build.gradle content
apply plugin: 'c'
executables {
main {
}
}
When I run: $ gradle mE, I get the following error
FAILURE: Build failed with an exception.
* Where:
Build file '/home/sujith/Downloads/cpp-examples-master/gradle-c-plugin/03-executable/build.gradle' line: 3
* What went wrong:
A problem occurred evaluating root project '03-executable'.
> Could not find method executables() for arguments [build_aaxd7x5nukew1jgziyan9q177$_run_closure1@57552dfc] on root project '03-executable'.
* Try:
Run with
BUILD FAILED
Total time: 2.297 secs
Sample project taken from https://github.com/ysoftdevs/cpp-examples
Gradle version:
$ gradle -version
------------------------------------------------------------
Gradle 2.3
------------------------------------------------------------
Build time: 2015-02-16 05:09:33 UTC
Build number: none
Revision: 586be72bf6e3df1ee7676d1f2a3afd9157341274
Groovy: 2.3.9
Ant: Apache Ant(TM) version 1.9.3 compiled on December 23 2013
JVM: 1.7.0_67 (Oracle Corporation 24.65-b04)
OS: Linux 3.13.0-24-generic amd64
Am I missing something? Any help is appreciated. Thanks you
source
share