Can’t use project extra properties in plugin block

Apparently this has become possible recently, if it wasn’t possible in the past. (Almost) from the docs:

gradle.properties:

helloPluginVersion=1.0.0

settings.gradle.kts:

pluginManagement {
  val helloPluginVersion: String by settings
  plugins {
    id("com.example.hello") version helloPluginVersion
  }
}

And now the docs say that build.gradle.kts should be empty but my testing shows that you still need this in build.gradle.kts:

plugins {
  id("com.example.hello")
}

The version is now determined by settings.gradle.kts and hence by gradle.properties which is what we want…

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)