Cpp library: build task compiles only debug variant

Hi!
I’m using Gradle 5.5 and cpp-library-plugin for a simple native library. And I don’t know why but by default gradle build only assembles a debug version. I have to call gradlew assembleReleaseX86-64 to get a release version.

Does someone know how I can do debug and release builds?

plugins {
    `cpp-library`
}

library {
    linkage.set(listOf(Linkage.SHARED))
    targetMachines.set(listOf(machines.windows.x86, machines.windows.x86_64))
}

extensions.configure<CppLibrary> {
    privateHeaders.from(file("C:/Program Files/Java/jdk1.8.0_171/include"), file("C:/Program Files/Java/jdk1.8.0_171/include/win32"))
}

tasks.withType(LinkSharedLibrary::class.java).configureEach {
    linkerArgs.add("Crypt32.lib")
}