Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Defect in Native-Samples/Cpp/Source-generation - Gradle is not generating the files #1095

Open
noam1360 opened this issue Feb 18, 2022 · 1 comment

Comments

@noam1360
Copy link

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:

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

Steps to Reproduce (for bugs)

  1. clone this repo
  2. cd cpp/source-generation
  3. gradle clean assemble build.gradle

Your Environment

  • Centos 8 gradle version:7.3, java version: 11.0.13, gcc version: 10.3

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)

@Vampire
Copy link

Vampire commented Feb 18, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants