Created
August 10, 2020 04:26
-
-
Save arunkumar9t2/e54813d300384b4bb0d6da48e188cef1 to your computer and use it in GitHub Desktop.
Prints all classes in an android/kotlin/java project.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tasks.register("collectClasses") { | |
subprojects { | |
dependsOn tasks.withType(JavaCompile) | |
dependsOn tasks.withType(KotlinJvmCompile) | |
} | |
doLast { | |
subprojects { | |
(tasks.withType(JavaCompile) + tasks.withType(KotlinJvmCompile)).forEach { compile -> | |
compile.destinationDirectory | |
.getAsFileTree() | |
?.matching { include("**/*.class") } | |
?.files | |
?.forEach { | |
println(it) | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment