tasks {
val needsSecrets by registering(GetVaultSecretTask::class) {
// The task will always be configured
throw RuntimeException()
}
}
If you execute gradle build, there will always be an error. Expected result: when using gradle build creating it leads to an error, but registering does not. registering should only lead to an error when the task is called directly.