Skip to content

Instantly share code, notes, and snippets.

@autonomousapps
Created January 12, 2021 22:32
Show Gist options
  • Save autonomousapps/2484e5db84dee2a1eff44681dd4a8ee6 to your computer and use it in GitHub Desktop.
Save autonomousapps/2484e5db84dee2a1eff44681dd4a8ee6 to your computer and use it in GitHub Desktop.
Print Gradle's class loader hierarchy
// app/build.gradle
def printClassLoaders(classLoader) {
while (classLoader != null) {
println(classLoader)
classLoader = classLoader.parent
}
}
class A {
}
printClassLoaders(A.classLoader)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment