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

git.properties is missing when building with gradle 5.1.x, gradle 5.2.x #128

Closed
tha2015 opened this issue Jul 9, 2019 · 3 comments
Closed
Labels

Comments

@tha2015
Copy link
Collaborator

tha2015 commented Jul 9, 2019

For single project: on the first time when building the code (after checking out form git), the git.properties file might be missing.
example.zip
Issue happens all the time

For a project with subprojects, the issue will happen all the time.
project2.zip
Issue happens only for the first time

Root cause: processResources task which is executed after generateGitProperties task might delete build\resources\main directory (including the git.properties inside) because it thinks the folder is not clean

generateGitProperties task ->processResources task (will print message: Deleting stale output file: build\resources\main)

Example projects are attached above

@tha2015 tha2015 changed the title git.properties is missing for the first build (after checking out) git.properties is missing when building with gradle 5.1.x, gradle 5.2.x Jul 12, 2019
@tha2015 tha2015 added this to the v2.1.0 milestone Jul 13, 2019
@n0mer
Copy link
Owner

n0mer commented Aug 12, 2019

@tha2015 can you please clarify, what is suggested work-around?

@tha2015
Copy link
Collaborator Author

tha2015 commented Aug 12, 2019

@n0mer No, I don't know how to avoid it.
BTW currently Gradle has newer versions (5.3, 5.4, 5.5) so maybe we don't have to fix it? I put a note in the README about this issue.
Do you think we can go ahead and release a new version without fixing it?

@tha2015
Copy link
Collaborator Author

tha2015 commented Sep 21, 2019

In v2.2.0, the new property key ( gitPropertiesResourceDir ) will allow putting git.properties file in a different directory to avoid this issue. So closing this issue.

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

No branches or pull requests

2 participants