#!/bin/sh ./gradlew spotlessCheck -q EXIT_CODE=$? if [ $EXIT_CODE -ne 0 ]; then echo "❌ spotlessCheck failed, running spotlessApply for you..." ./gradlew spotlessApply -q echo "Formatting done, please try your commit again! If the problem persists, apply fixes manually." exit $EXIT_CODE fi exit 0