String interpolation for plugins version

Hey,

I am trying to add a community plugin to my android project via this snippet of code:

plugins {
    id("io.gitlab.arturbosch.detekt").version("${ext.version}")
}

Unfortunately this fails with: 22: argument list must be exactly 1 literal non empty string

Is there a way I can have a variable declared for my plugin version?