Created
April 11, 2023 04:51
-
-
Save 47star/e4c94c8a0da72bf165c4ff065e393334 to your computer and use it in GitHub Desktop.
Snippet for Gradle submodule definition in Kotlin DSL
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
class GradleSubmodule( | |
private val name: String, | |
private vararg val children: GradleSubmodule, | |
) { | |
operator fun unaryPlus() = load("") | |
private fun load(parent: String) { | |
include("$parent:$name") | |
for (child in children) { | |
child.load("$parent:$name") | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment