Gradle

Install

home brew formulae

brew install gradle

Usually not recommended to install gradle as a standalone executable.
Utilize .gradlew or gradle.bat script in the local project you're working on.

gradle | installation

Getting Started

getting started | gradle

Commands

Cleans the whole project

gradle clean
./gradlew clean

Android project build

gradle build
./gradlew build

iOS

gradle assembleXCFramework

#assemble<YourLibraryName>XCFramework
./gradlew assembleMySharedLibraryXCFramework

# if the lib is inside it in a subDirectory
./gradlew assemble:directory_name:lib_name-auth:XCFramework


./gradlew implementation:entos-auth:assemble
Task :implementation:entos-auth:assembleEntosAuthDebugXCFramework
xcframework successfully written out to: /Users/user/entos-auth/build/XCFrameworks/debug/EntosAuth.xcframework

Spotless android studio linter?

gradlew spotless Apply

PATH

CLI | docs

gradlew

gradle wrapper

Sync

One thing I liked about gradle on android IDE project was it doesn't automatically tries to sync or fetch all the dependencies on app launch / IDE project open like how SPM xcode default behavior is

Project

Lists all the projects in the current directory for android app.

./gradlew projects

Errors

Config

The setting is particularly useful for tweaking memory settings.

org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8

Root of the gradle (whole project)