Is it possible to split `build.gradle.kts` file, s...
# announcements
r
Is it possible to split
build.gradle.kts
file, so I could have the whole project configuration in one file and dependencies listed in the second?
m
you could use
Copy code
apply(from = "other.gradle.kts")
after plugins section
g
Apply is not so easy with kts, you can use almost nothing because you don't have type safe accessors, it's not big problem for dependencies, you can use dynamic syntax for configurations:
Copy code
"api"("some:dep:1.0")
😱 1
But essentially the only good solution is to use buildSrc with custom plugins
Also #C19FD9681
h
Google buildSrc and kotlin preconpiled buildscripts, super nice, i use it often to achieve what you seem to want :)
2
m
@Robert Jaros buildSrc with kotlin is realy powerfull, have a look on https://github.com/VMadalin/kotlin-sample-app/tree/master/buildSrc/src/main/kotlin/commons
503 Views