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

Gradle 6.1 generates an empty .gradle and gradle directories on each execution in subproject directories #11971

Closed
vlsi opened this issue Jan 22, 2020 · 2 comments
Assignees
Labels
a:regression This used to work
Milestone

Comments

@vlsi
Copy link
Contributor

vlsi commented Jan 22, 2020

Expected Behavior

Gradle should not generate dummy directories on its own.

Current Behavior

Gradle generates gradle in the current working directory.
Sometimes it creates .gradle :((

It looks like 438e4f9#diff-cffca3a015bacf898383932f0abada06R40-R43 results in creating gradle directory on each execution (e.g. even if settings.gradle.kts throws an exception and includes 0 projects).

The same issue can be reproduced in gradle-6.2-20200121230035+0000-all.zip

@melix , is it something you know?

Steps to Reproduce

1. create_gradle_6.1_project
$ mkdir tmp && cd tmp # create a temp directory and cd inside
$ ls -la # ensure the directory is empty
.
..
$ ../gradlew qwerty # <-- "../" is important !!
FAILURE: Build failed with an exception.

* What went wrong:
Task 'qwerty' not found in root project 'test'.

^^ task failure is expected

Note: new folders appear after Gradle failure:

$ ls -la 
.
..
.gradle # <-- watch this
gradle # <-- and this
@vlsi vlsi added a:regression This used to work from:contributor labels Jan 22, 2020
@melix
Copy link
Contributor

melix commented Jan 22, 2020

This is unexpected and should probably be fixed in 6.1.1.

@melix melix added this to the 6.1.1 milestone Jan 22, 2020
@melix melix self-assigned this Jan 22, 2020
melix added a commit that referenced this issue Jan 22, 2020
This would cause a couple of bugs:

   - a `gradle` directory would be created for each build even if
they didn't have one
   - a `gradle` directory would be created for subprojects if the
gradle command was executed from this directory (#11971)

In addition, this would cause the verification metadata file to be
ignored if running from a subproject directory.
melix added a commit that referenced this issue Jan 23, 2020
This would cause a couple of bugs:

   - a `gradle` directory would be created for each build even if
they didn't have one
   - a `gradle` directory would be created for subprojects if the
gradle command was executed from this directory (#11971)

In addition, this would cause the verification metadata file to be
ignored if running from a subproject directory.
@melix
Copy link
Contributor

melix commented Jan 23, 2020

This is now fixed on both master and release, thanks for reporting!

@melix melix closed this as completed Jan 23, 2020
melix added a commit that referenced this issue Jan 24, 2020
The bug (#11971) makes the build under test, called by the TAPI,
fail because the working directory is the working directory of
Gradle itself. This causes the test to try to read the verification
metadata file of Gradle itself, which exists, instead of not finding
any verification file like it should, because the build under test
doesn't have any.

The workaround is to change the working directory from the build
under test.
@big-guy big-guy changed the title Gradle 6.1+ generates an empty .gradle and gradle directories on each execution in the current working folder Gradle 6.1 generates an empty .gradle and gradle directories on each execution in subproject directories Jan 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:regression This used to work
Projects
None yet
Development

No branches or pull requests

2 participants