Skip to content

Instantly share code, notes, and snippets.

@jraska
Created April 24, 2020 20:41
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 jraska/3882d5366d209097fead03c189bcf03f to your computer and use it in GitHub Desktop.
Save jraska/3882d5366d209097fead03c189bcf03f to your computer and use it in GitHub Desktop.
fun moduleDependencies(project: Project): List<Project> {
return project.configurations
.filter { it.name == "api" || it.name == "implementation" }
.flatMap { configuration ->
configuration.dependencies.filterIsInstance(DefaultProjectDependency::class.java)
.map { it.dependencyProject }
}
}
@dmitrykolesnikovich
Copy link

dmitrykolesnikovich commented Apr 29, 2020

Nice one. Will it work with kotlin multiplatform?

@jraska
Copy link
Author

jraska commented May 1, 2020

Hi Dmitry, I didn't try, but I believe it should. Kotlin multiplatform module should be the same as any other module?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment