Relative Content

Tag Archive for gradlegradle-kotlin-dsl

Best way to re-use a function across Gradle submodules

I defined a Kotlin function in one of my submodules to load some environment variables from a file. I now want to use this function in other submodules as well, but define it only once. I can achieve this using a buildSrc dir. But to me it seems overkill to have an entire buildSrc/ just for one function. Is this the recommended way to achieve what I want or is there a better way?