Tech
09/17/2023, 4:26 PMplugins
section.
val test_version: String by project
plugins {
id("random.plugin") version "$test_version"
}
I want to just have a single value to update that will update the version of a plugin in my entire project.
The current error being thrown is 'val test_version: String' can't be called in this context by implicit receiver. Use the explicit one if necessary
ephemient
09/17/2023, 4:52 PMplugins
block (and a couple others, such as buildscript
) are executed independently of the rest of the build scriptephemient
09/17/2023, 4:53 PMTech
09/17/2023, 4:54 PMephemient
09/17/2023, 4:54 PMTech
09/17/2023, 4:54 PMTech
09/17/2023, 4:55 PMVampire
09/17/2023, 7:06 PMpluginManagement { plugins { ... } }
block which does exactly what you want too, defining a version that is used if a plugin is applied without version.
But yeah nowadays I'd also recommend version catalogsTech
09/17/2023, 7:07 PM