A. Sachdeva
09/12/2021, 7:33 PMkotlin-dsl
gradle plugin for android.
So far i really liked the concept of configuring dependencies via a single buildSrc/src/main/Dependencies.kt
file. I want to take it a step further and have the whole app configuration configured from pure kotlin files. is that possible?
something like the old apply from("${project.rootDir}/commons.gradle")
, but for koltin , like if i add an android library, all i need to do is add a build.gradle.kts file in library root with some static function call, like GradleConfigurations.librarySetup(this)
and there i could automatically setup project plugins, dependencies, the android{}
block, etc?
How to do that? So far i have been able to do this for the root level build.gradle.kts
file, but app/build.gradle.kts
seems to use internal/inaccessible extensions. so any other approach ?Vampire
09/13/2021, 7:26 AMbuildSrc
that you then apply in your main build. Those are usually called convention plugins.A. Sachdeva
09/13/2021, 11:04 AM