In gradles github repo for c, c++, swift samples of modern build automation for native languages with Gradle (Gardle/Native-Samples) there is a project in the cpp folder called source-generation. This project is supposed to generate a cpp and header file in a folder labeled build. According to the readme the correct way to generate and compile this build is:
cd cpp/source-generation
./gradlew assemble
BUILD SUCCESSFUL in 1s
./build/install/main/debug/app
Hello, World!
There is also a Lazy API build.gradle that is supposed to generate the files
Current Behavior
Though when built the logs show that build was successful, no files are generated and cannot be compiled
Context
These example in Native-Samples are some of the only current online C/C++ codes that use gradle and are the base for understanding and learning how to use gradle with C/C++ for most people
In the example the directory properties miss their task dependency.
If you instead make the two properties abstract getter methods, the task dependency is maintained as expected and the build works like intended.
(Based on information in gradle forum)
Expected Behavior
In gradles github repo for c, c++, swift samples of modern build automation for native languages with Gradle (Gardle/Native-Samples) there is a project in the cpp folder called source-generation. This project is supposed to generate a cpp and header file in a folder labeled build. According to the readme the correct way to generate and compile this build is:
BUILD SUCCESSFUL in 1s
There is also a Lazy API
build.gradle
that is supposed to generate the filesCurrent Behavior
Though when built the logs show that build was successful, no files are generated and cannot be compiled
Context
These example in Native-Samples are some of the only current online C/C++ codes that use gradle and are the base for understanding and learning how to use gradle with C/C++ for most people
Steps to Reproduce (for bugs)
Your Environment
Extra Info
In the example the directory properties miss their task dependency. If you instead make the two properties abstract getter methods, the task dependency is maintained as expected and the build works like intended. (Based on information in gradle forum)