spierce7
12/09/2019, 7:41 PM./gradle/deps.gradle.kts
, do I have a way of statically accessing the file’s classes it defines externally in another kotlin file where I do something like this:
plugins {
`kotlin-dsl`
}
buildscript {
apply {
file(File(project.rootDir, "gradle/deps.gradle.kts"))
}
dependencies {
classpath(Plugins.kotlin) // Unresolved reference error
}
}
octylFractal
12/09/2019, 7:42 PMbuildSrc
for thatbuildSrc
won't work for the buildscript
block in particular, but you could instead declare that classpath
dependency as an api
dependency of buildSrc
spierce7
12/09/2019, 7:44 PMbuildSrc
, but now I’m trying to add some extension methods for the multiplatform
plugin inside of buildSrc
.
The file I posted above is actually the ./buildSrc/build.gradle.kts
file.
It’s important for circleci caching reasons that I have all my dependency information inside a single file, and I’m trying not to duplicate my kotlin version into 2 locations.octylFractal
12/09/2019, 7:46 PMkotlin-dsl
already applies one versionbuildSrc
is irrelevant for the one applied to the projectspierce7
12/09/2019, 7:47 PMmultiplatform
plugin classes, so that I can add some extension methods for the plugin to my buildSrc
octylFractal
12/09/2019, 7:47 PMdependencies {}
blockspierce7
12/09/2019, 7:47 PMoctylFractal
12/09/2019, 7:48 PMbuildscript
is more strict on what can be placed inside itspierce7
12/09/2019, 7:49 PMoctylFractal
12/09/2019, 7:50 PMdeps.gradle.kts
instead, it might workspierce7
12/09/2019, 7:50 PMoctylFractal
12/09/2019, 7:51 PMdependencies {}
in therespierce7
12/09/2019, 7:51 PMext
, to gain access outside of thereoctylFractal
12/09/2019, 7:51 PMspierce7
12/09/2019, 7:51 PMoctylFractal
12/09/2019, 7:51 PMspierce7
12/09/2019, 7:52 PMoctylFractal
12/09/2019, 7:52 PMspierce7
12/09/2019, 7:52 PMoctylFractal
12/09/2019, 7:52 PMspierce7
12/09/2019, 7:52 PMoctylFractal
12/09/2019, 7:53 PMspierce7
12/09/2019, 7:53 PM> com/android/build/gradle/BaseExtension
gildor
12/09/2019, 11:24 PM