Remove project totaly from .gradle

On android studio if i use different NDK to build. I need to clean build for every NDK build. There is a copy of different C/C++ objet resulting of the compilation and NDK used.

If i do a clean project i hope that the clean is for everything that was build, different NDK or JRE or new Java class.

But i means deleting file from disk. And for this purpose nothing is done. I can remove project folder and remove project using “remove from recents projects”. I still find everything in the appdata/*/google folder.

So there is no delete at all of the gradle tree stucture project. So android studio use gralde for building but not for cleaning or deleting project. And even if i delete evrything and i réinstall AS i found out that he was able to find project even if folder were deleted. So they keep thing somewere. AS is a bit special. And must of the time they said to look at the gradle help. So it is why i ask the question on gradle forum. :grinning:

No way to get answer from android studio about this subject. :grinning:

So AS use gradle task but they implement there own code inside. And store project output in they own folder. And it look like gradle got no hands on it.

Again, you are mixing up Gradle things with Android Studio things.
appdata/*/google is most probably just your IDE settings.
Building with Gradle should not be influenced by that at all.
And running clean in Gradle will of course not touch your IDE settings, because they have nothing to do with your Gradle build.
If you have problems with files in appdata/*/google, then you need to head to Android Studio community or support, not to a Gradle community.

I agree that thing under appdata/*/google is related to AS and not to Gradle.

Gradle is ordering the task. For that they need project structure information.
For this, Android load the project folder using the XML that we can found in Users\user\AppData\Roaming\Google\AndroidStudio2021.2\workspace. Then Gradle syncronize by reading the XML, look for Gradle file, load depedency is necessary. If there is no gradle file, Gradle will create it(that is great). If the Synchronization is OK we can run the build. So, for Every task gradle compute files needed by the task and calculated fingerprint to see if file have changed. If it has changed. Gradle rerun the task.

To resume, Android Studio give to gradle information about Project file location. Gradle does is work and output are stored where Android Studio ask Gradle to store IT.

A clean typically deletes the build directory which usually is the place where the task outputs are stored.

But where output task are stored. That is the question. Under .gradle folder or under appdata folder. And how decide where the input and output task must be saved.

Some things are saved under .gradle folder, like Wrapper,dependencies,gradle log,scan.
And some Other are saved under .appdata, like input XML file used by gradle to find project file location and process task and those informations are related to the project.

But how who provided the Gradle wrapper and build.gradle configuration.

Using tools impose to anderstand who they work and how does what. I think it is the béaba.

For this, Android load the project folder using the XML that we can found in Users\user\AppData\Roaming\Google\AndroidStudio2021.2\workspace. Then Gradle syncronize by reading the XML, look for Gradle file, load depedency is necessary.

Very unlikely.
Gradle does not know anything about those IDE files and also shouldn’t, that would be the wrong way around.
The Gradle build scripts define the project structure.
The IDE just asks Gradle about the structure and then creates its own structure files from that.
That is exactly what the “synchronization” is about.

If there is no gradle file, Gradle will create it(that is great).

No, it does not.

If the Synchronization is OK we can run the build.

Synchronization is irrelevant for the ability to run a build as long as you run it through Gradle.
Synchronization is only for the IDE to get up to date information about the structure of the Gradle project to provide proper IDE functionality.

To resume, Android Studio give to gradle information about Project file location. Gradle does is work and output are stored where Android Studio ask Gradle to store IT.

No

A clean typically deletes the build directory which usually is the place where the task outputs are stored.

Yes

But where output task are stored. That is the question. Under .gradle folder or under appdata folder. And how decide where the input and output task must be saved.

I don’t get what you mean. You just said yourself that the task outputs are usually stored in the build directory. And the inputs are saved nowhere, the inputs are whey the are, they are inputs, not outputs.

Some things are saved under .gradle folder, like Wrapper,dependencies,gradle log,scan.

Yes, the things Gradle stores, it stores there.

And some Other are saved under .appdata,

Yes, the things AS stores, it stores there.

like input XML file used by gradle to find project file location and process task and those informations are related to the project.

Such an XML file does not exist.

But how who provided the Gradle wrapper and build.gradle configuration.

The wrapper is generated by Gradle when you ask it to, the build script is written by you.

You make me confused.

My question

But where output task are stored. That is the question. Under .gradle folder or under appdata folder. And how decide where the input and output task must be saved

your answer

I don’t get what you mean. You just said yourself that the task outputs are usually stored in the build directory. And the inputs are saved nowhere, the inputs are whey the are, they are inputs, not outputs.

So, i ask where the build directoriy is located.

So, i ask where the build directoriy is located.

In your project directories

uder .gradle i supose. And for each wrapper Version.

No, neither.
I said in your project directories.
Unless you reconfigured the layout.buildDirectory it is <project directory>/build/ for each project in your build.

I think that i anderstoud about the appdata/*/google. It is wera AS save information for setting the project inside the IDE.

A long discussion. Thanks, it is becomming a little bit more clear.

1 Like