Kotlin DSL jars incomplete for local development
When generating my project from the Teamcity UI it generates a settings.kts like this:
import jetbrains.buildServer.configs.kotlin.v2018_1.*
import jetbrains.buildServer.configs.kotlin.v2018_1.vcs.GitVcsRoot
import jetbrains.buildServer.configs.kotlin.v2018_1.buildSteps.script
import jetbrains.buildServer.configs.kotlin.v2018_1.triggers.vcs
This compiles on the teamcity server but does NOT compile locally. It complains with:
Error:(2, 53) Kotlin: Unresolved reference: vcs
Error:(3, 53) Kotlin: Unresolved reference: buildSteps
Error:(4, 53) Kotlin: Unresolved reference: triggers
I checked the jar provided at "http://download.jetbrains.com/teamcity-repository/org/jetbrains/teamcity/configs-dsl-kotlin/2018.1/" and it doesn't include a vcs, buildSteps, or a triggers package.
Please sign in to leave a comment.
Hi Charles,
There is a full set of libraries, not just that one, which provide the different classes. The project should include a pom.xml that should pull all the different libraries and the missing packages should be there.
Here's my pom - I've checked all of these and can't find them. Can you tell me where these should be found so I can check those dependencies?
Hi Charles,
Sorry for the delay. They aren't in the jetbrains repositories, they are generated by the server itself. They will be generated on runtime by the server, because plugins can provide their own support for DSL including extra functionality that centralizing them on a repository wouldn't be able to.
I think I figured it out but we don't have it fixed yet so I might check in. Apparently when we installed a plugin someone had downloaded it twice. That resulted in the filename having a "(1)" in it. This is the error thrown before the compiler errors:
Here is the relevant part of the pom that's invalid:
We're going to re-install the plugin over the next few days (Big releases atm - need to wait for a safe time) and then I'll check back in