Native/C plugin doesn't honor versions

Full details at StackOverflow question here.

Essentially, the C plugin defaults to naming an executable whatever you name its closure under components. Hence if I have:

model {
    components {
        derpus(NativeExecutableSpec) {

Then this will create derpus.exe (on Windows). If I want this executable to be versioned I can use the baseName component property. However something weird is happening where a specified version variable is being truncated (seems to be dropping trailing version segment and any trailing zeros from the version number).

Hence if I specify baseName = "derpus-${version}", then if:

  • version=3.0, baseName resolves to 3
  • version=3.0.5, baseName is still 3 (drops the last segment and any trailing zeros)
  • version=, baseName is now 3.0.5
  • version=3.1.5, baseName is now 3.1

Weird. Again, read SO question for all details and reproducing, etc.

Anyone? Bueller? Bueller?