This message was deleted.
# community-support
s
This message was deleted.
v
Maybe as dependency in
buildSrc
?
buildSrc
is yet again a special beast and not part of the conflict resolution etc., so in that case you might fix it by using a composite build instead.
s
do not have
buildSrc
anywhere
v
Well, then I cannot guess anymore without seeing your build or an MCVE that demonstrates the problem.
s
sure
settings.gradle.kts
Copy code
rootProject.name = "spinnaker-teamcity-build-plugin"

rootDir.listFiles()?.forEach {
  if(it.isDirectory && it.name.startsWith("teamcity-build") && it.list()?.contains("build.gradle.kts") == true) {
    include(it.name)
  }
}

dependencyResolutionManagement {
  repositories {
    mavenCentral()
  }
}
build.gradle.kts
Copy code
@Suppress("DSL_SCOPE_VIOLATION")
plugins {
  alias(libs.plugins.spinnaker.plugin.bundler)
  alias(libs.plugins.palantir.git)
}

spinnakerBundle {
  pluginId = "DoubleCloud.TeamCityBuildPlugin"
  description = "Provide TeamCity Builds access and logs from Spinnaker Deck"
  provider = "<https://github.com/mazzy89>"
  version = rootProject.version.toString()
}

version = normalizedVersion()

subprojects {
  group = "cloud.double.spinnaker.plugin.teamcity.build"
  version = rootProject.version.toString()
}

fun normalizedVersion(): String {
  val gitVersion: groovy.lang.Closure<String> by extra

  val fullVersion: String = gitVersion()
  val normalized: String = fullVersion.split("-").first()

  return if (fullVersion.contains("dirty")) {
    "$normalized-SNAPSHOT"
  } else {
    normalized
  }
}
and the subproject
Copy code
@Suppress("DSL_SCOPE_VIOLATION")
plugins {
  alias(libs.plugins.kotlin.jvm)
  alias(libs.plugins.kotlin.kapt)
  alias(libs.plugins.spinnaker.plugin.serviceextension)

  id("maven-publish")
}

kotlin {}

spinnakerPlugin {
  serviceName = "igor"
  pluginClass = "cloud.double.spinnaker.plugin.teamcity.build.TeamCityBuildPlugin"
  requires    = "igor>=0.0.0"
}

dependencies {}
that's it i do not have anything more
v
And can you please knit it to an MCVE?
s
sorry do not follow you. more minimal than this i cannot go. i do not have any other files 😄
v
The problem is not the M, but the C 😉
I'm just a user like you and am right now too lazy to try building a project from those pastes that then maybe still has a slight difference.
If you want me to have a quick look to maybe see the problem, please provide a complete MCVE as zip or GitHub project or Gist or whatever. 😉
s
sure. let me point you to the gh project so there should be there all the tree structure
v
I'm not sure why it says the version cannot be checked. Maybe worth a bug report. As work-around, add the plugins with
apply false
to the root build script, then it works.
s
So I would need to define all the plugins st the root build script and set Apply false and then defined them again in the plugin block in the subproject did I get it right?
v
Yes, the one in the root project just adds it to the class path and the one in subproject then actually applies it
🙌 1
s
going to try thanks Vampire a lot. and then i will fill a bug report
yeah it worked now
👌 1