This file contains hidden or 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
| subprojects { | |
| afterEvaluate { | |
| def hasKotlinAndroidSourceSet = extensions.findByType(org.jetbrains.kotlin.gradle.dsl.KotlinAndroidProjectExtension) | |
| ?.sourceSets?.findByName("test")?.kotlin?.files?.size() != 0 | |
| def hasKotlinSourceSet = extensions.findByType(org.jetbrains.kotlin.gradle.dsl.KotlinProjectExtension) | |
| ?.sourceSets?.findByName("test")?.kotlin?.files?.size() != 0 | |
| if (!hasKotlinAndroidSourceSet && !hasKotlinSourceSet) { | |
| tasks.configureEach { | |
| if (name.contains("Test")) { |
This file contains hidden or 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() |
This file contains hidden or 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("dependencyGraph") { | |
| description = "Generate dependency graph json" | |
| doLast { | |
| def dependencyGraph = subprojects | |
| .collect { project -> | |
| [ | |
| "project" : project.path, | |
| "dependencies": project.configurations | |
| .collectMany { config -> | |
| config |
This file contains hidden or 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
| import com.google.common.graph.Graphs | |
| import com.google.common.graph.MutableValueGraph | |
| import com.google.common.graph.ValueGraphBuilder | |
| import org.gradle.api.DefaultTask | |
| import org.gradle.api.Project | |
| import org.gradle.api.artifacts.Configuration | |
| import org.gradle.api.artifacts.ProjectDependency | |
| import org.gradle.api.tasks.Input | |
| import org.gradle.api.tasks.TaskAction | |
| import org.gradle.api.tasks.options.Option |
OlderNewer