mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-08-03 18:56:44 -04:00

* Updated the README file to show that now our project requires the JAVA 17 instead of JAVA 11. * Updated the pre-commit failed message to properly show the error information.
23 lines
836 B
Bash
23 lines
836 B
Bash
#!/bin/sh
|
|
|
|
echo "Running lint..."
|
|
|
|
./gradlew ktlintCheck detektDebug detektCustomExampleDebug app:lintDebug custom:lintCustomexampleDebug --daemon
|
|
|
|
status=$?
|
|
|
|
if [ "$status" = 0 ] ; then
|
|
echo "Static analysis found no problems."
|
|
exit 0
|
|
else
|
|
./gradlew ktlintFormat --daemon
|
|
echo 1>&2 "Static analysis found violations and attempted to autofix, please commit these autoformat changes"
|
|
echo "
|
|
---------------------------IMPORTANT FOR KIWIX DEVELOPERS----------------------------------------------
|
|
If the build failed with '.../.gradle/daemon/8.4/custom/scr/customexample/info.json No File Found' then you do not have JAVA_HOME set to JDK17
|
|
Please make sure JAVA_HOME is set to JDK17
|
|
---------------------------IMPORTANT FOR KIWIX DEVELOPERS----------------------------------------------"
|
|
|
|
exit 1
|
|
fi
|