- ✅
build/- Project build output directory - ✅
app/build/- App-specific build output directory - ✅
.gradle/- Gradle cache and daemon files - ✅
.idea/- IntelliJ IDEA/Android Studio project files - ✅
.vscode/- Visual Studio Code workspace files - ✅
.snapshots/- Unnecessary snapshot files
- ✅ Gradle caches - Build dependency caches
- ✅ Android build cache - Android-specific build artifacts
- ✅ Temporary files -
.tmp,.log,.lockfiles - ✅ IDE caches - Various IDE-generated cache files
StudySuite/
├── 📱 app/ # Main application code
│ ├── src/main/
│ │ ├── java/com/studysuite/app/ # Kotlin source code
│ │ ├── cpp/ # Native C++ code
│ │ ├── res/ # Android resources
│ │ └── AndroidManifest.xml # App manifest
│ ├── build.gradle # App-level build config
│ └── CMakeLists.txt # Native build config
├── 📚 Documentation/ # Project documentation
│ ├── README.md # Project overview
│ ├── USER_GUIDE.md # User manual
│ ├── TECHNICAL_DOCUMENTATION.md # Developer reference
│ └── DEVELOPMENT_SETUP.md # Setup guide
├── 🛠 Build Files/ # Essential build configuration
│ ├── build.gradle # Project-level build config
│ ├── settings.gradle # Project settings
│ ├── gradle.properties # Gradle properties
│ ├── gradlew # Gradle wrapper (Unix)
│ └── gradlew.bat # Gradle wrapper (Windows)
├── 🧹 Cleanup Scripts/ # Maintenance scripts
│ ├── clean.bat # Windows batch cleanup
│ ├── clean.ps1 # PowerShell cleanup
│ └── CLEANUP_SUMMARY.md # This file
├── 📋 Configuration/ # Project configuration
│ ├── .gitignore # Git ignore rules
│ └── local.properties # Local environment config
└── 📦 Gradle/ # Gradle wrapper files
└── wrapper/
└── gradle-wrapper.properties # Gradle version config
Run cleanup scripts before major changes:
# Windows (Command Prompt)
clean.bat
# Windows (PowerShell)
.\clean.ps1
# Unix/Linux/macOS
./gradlew clean# Clean build artifacts
./gradlew clean
# Remove IDE files if they were regenerated
# (These are now in .gitignore)# Clean everything to avoid conflicts
./gradlew clean
./gradlew cleanBuildCache# Clean and refresh dependencies
./gradlew clean
./gradlew --refresh-dependencies- Stops Gradle daemons
- Cleans project build directories
- Removes IDE-specific files
- Handles locked files gracefully
- More comprehensive cleanup
- Better error handling
- Colored output for better visibility
- Handles locked files with detailed feedback
After cleanup, your project should be significantly smaller:
- Before: ~100MB+ (with caches and build files)
- After: ~10-20MB (source code only)
- Space Saved: 80-90% reduction
build/directories (created during build).gradle/cache (recreated as needed).idea/files (recreated when opening in Android Studio)local.properties(contains your local SDK paths)
app/src/- Your source codegradle/wrapper/- Gradle wrapper files*.gradlefiles - Build configurationAndroidManifest.xml- App manifest- Documentation files (
.mdfiles)
- Keep
.gitignoreupdated - Don't commit build artifacts
- Don't commit IDE-specific files
- Don't commit local configuration
- Always clean before major changes
- Use
./gradlew cleanregularly - Monitor build cache size
- Clean dependencies when updating
- Let IDEs regenerate their files
- Don't manually edit
.idea/files - Use project-specific settings when possible
- Clean IDE caches if issues arise
- Before major refactoring
- After dependency updates
- When switching between branches
- If build issues occur
- Before releasing/deploying
- When IDE becomes slow
- After system updates
# Sync project
./gradlew --refresh-dependencies
# Clean and rebuild
./gradlew clean
./gradlew assembleDebug- Restart your IDE
- Let it regenerate project files
- Sync Gradle project
- Invalidate caches and restart
- Some files may remain locked
- Restart your computer if needed
- Run cleanup scripts again
- Check for running processes
✅ Faster builds - No unnecessary cache files
✅ Smaller project size - Easier to manage and share
✅ Fewer conflicts - Clean state for development
✅ Better performance - Reduced IDE overhead
✅ Easier debugging - No cache-related issues
✅ Professional appearance - Clean project structure
Remember: A clean project is a happy project! 🚀