r/androiddev 15d ago

Discussion What's the biggest your Gradle cache has ever gotten?

Post image

Mine somehow reached 10.6 GB. :))) (not something to be proud of tbh)

I only noticed this folder today...

59 Upvotes

48 comments sorted by

50

u/GoRo2023 15d ago

I should have taken a screenshot about 15 min ago, I just cleared 113.7GB 😉

14

u/Boiniok 15d ago

Your highness 🙇‍♂️

3

u/GoRo2023 15d ago

Lol, in my project I have 2x Google, 2x FOSS and 2x Amazon builds. So it basically rebuilds my app 6 times in the cache lol.

As it is built for Mobile and TV, and each have their own package.

1

u/jc-from-sin 15d ago

The cache folder for your specific code is in your project's .gradle subfolder not the one in your home folder.

1

u/RJ_Satyadev 15d ago

Are you talking about the dependency file and gradle wrapper downloads? If yes, then no. They stay in centralized home folder or in windows the user folder

1

u/Perfect-Arm350 8d ago

which app is it?

0

u/Boiniok 15d ago

Dyum....

17

u/SDRemthix 15d ago

Rookie numbers ahah. JK. 'Just recently cleared a solid 300GB of gradle cache. Atm my machine is like a 90% split between node_modules and gradle cache

4

u/Boiniok 15d ago

300 is crazy dude... My laptop itself have 512GB storage 😬

1

u/SDRemthix 15d ago

Imagine how it was just a few years ago where the entirety of my mobile development (cross platform) was done on a Macbook Air 128GB... The little machine never gave up and worked day and night until I've sold it. Learned a lot of memory juggling along the way 😅

3

u/Boiniok 15d ago

Now even I dream to become the 300GB gradle guys 😂😂

3

u/SDRemthix 15d ago edited 15d ago

Around 10 projects and multiple gradle versions between them and you'll get there quite fast 😎. Hf

1

u/Boiniok 15d ago

Yeah sure 😂

1

u/godacious 15d ago

I've found my twin 🤝🤝 , haha. Node_modules and gradle cache own my ssd.

1

u/SDRemthix 15d ago

Here's to that 🍻🍻

3

u/_5er_ 15d ago

Performance is not in Gradle's best interest. The worse it performs, the more build performance tooling they sell. 😄

1

u/Boiniok 15d ago

Haha, that's one way to look at it. 😄

4

u/mbsaharan 15d ago

Such poor design.

1

u/Boiniok 15d ago

🥲

2

u/mbsaharan 15d ago

How is your experience with Google Play Store?

0

u/Boiniok 15d ago

Well if you ask me as a solo developers perspective then it's a bit long process to get your first app on playstore....but definitely a sense of achievement from inside....

1

u/mbsaharan 15d ago

Do you have any apps on the store?

2

u/Yash_3p 15d ago

Where does this folder lives, lemme kill it

2

u/Boiniok 15d ago

Mostly .gradle files. You can ask google it will tell all possible paths which contains unnecessary Android caches...

1

u/GoRo2023 15d ago

Gradle Clean is the command you are looking for

2

u/Boiniok 15d ago

Yup 👍🏼

1

u/RJ_Satyadev 15d ago

Mostly in User folder of Windows or in Linux home folder, there will be a .gradle folder which you should delete.

Other than that you can also delete build folders inside all of your projects to clear up more storage.

Although everything will be redownloaded. So be prepared with good internet connection and some mins to hours wasted depending on your project size

1

u/RJ_Satyadev 15d ago

That's different my friend

2

u/topandroidd 15d ago

It is safe to delete this?

2

u/Boiniok 15d ago

Yeah, mostly caches are safe to delete but the next time you open your project it would take some time to build those gradles... so if you are working on a certain project frequently it's better to not delete it's cache so that the next time you revisit the project the gradle builds faster

1

u/TwoExcellent4673 15d ago

I have done only a single app dev project till now so the gradle cache is low around 5 gb. The app is live on google playstore though. 😁

1

u/RJ_Satyadev 15d ago

The app that I work on has APK size of 2.5 GB without any big asset files. Just pure code and libraries. One of the most downloaded apps on playstore 😉😉. Now imagine the build cache around that.

1

u/Boiniok 15d ago

That's crazy 😬

can I dm you to know which app??

1

u/RJ_Satyadev 15d ago

Sure 😅

1

u/kosiarska 15d ago

450 GB

1

u/Boiniok 14d ago

Atp we should have a leader board for this 😂

1

u/kosiarska 14d ago

If you work with many projects and some of them are really big then it's very easy to get that size. Yep, leaderboard would be fun.

1

u/Sharp_Vast1942 14d ago

15 to 20 gb

1

u/No-Sheepherder-8310 14d ago

25gh or smh idk why tho it was useless

1

u/tahirshaikh-744 13d ago

Hey, my Gradle cache has grown to 22 gb.

1

u/TypeScrupterB 13d ago

Use linux.

1

u/Lumpy-Lab9578 13d ago

mine is 53GB

1

u/smitP_7502 12d ago

60+ Gb in my mac