Skip to content

Instantly share code, notes, and snippets.

@ashishuniyal90
ashishuniyal90 / pre-commit
Created July 5, 2021 07:44
Ktlint Pre-Commit hook
#!/bin/bash
echo "*********************************************************"
echo "Running git pre-commit hook. Running Static analysis... "
echo "*********************************************************"
./gradlew ktlintCheck
status=$?
if [ "$status" = 0 ] ; then
@ashishuniyal90
ashishuniyal90 / jacoco.gradle
Last active July 3, 2021 14:41
JaCoCo MultiModule Configuration
project.afterEvaluate { project ->
setupAndroidReporting()
}
def setupAndroidReporting() {
tasks.withType(Test) {
// Whether or not classes without source location should be instrumented
jacoco.includeNoLocationClasses = true
jacoco.excludes = ['jdk.internal.*']
}