Skip to content

Instantly share code, notes, and snippets.

@62mkv
Last active December 1, 2021 10:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 62mkv/49f911f325d13336a0de40688bd3705a to your computer and use it in GitHub Desktop.
Save 62mkv/49f911f325d13336a0de40688bd3705a to your computer and use it in GitHub Desktop.
Gradle cookbook

Tests verbosity

Executing gradle commands with -i seem to seriously enhance debugging experience, especially when tests are failing to initialize (as if when Testcontainers fail to connect to Docker daemon) and there're almost no logs in the JUnit XML reports

./gradlew -i clean test

Also see here: https://docs.gradle.org/current/userguide/java_testing.html

Confirm compilation classpath contents (Groovy DSL)

compileJava {
    doFirst {
        System.out.println(it.classpath.resolvedConfiguration.getFiles())
    }
}

Fix gradlew permissions on Windows

git update-index --chmod=+x gradlew
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment