cbeust / kobalt

A Kotlin-based build system for the JVM.
Apache License 2.0
433 stars 60 forks source link

Improve handling of profiles #353

Closed dittert closed 7 years ago

dittert commented 7 years ago

The current implementation of --profiles has the limitation that Kobalt can't know if it's necessary to recompile Build.kt when the value of a profile changes.

I'd like to suggest to use a delegate that determines the value at runtime:

val experimental: Boolean by profile()

As profiles currently are only boolean values, one could even omit the type of the variable.

The command line would not change:

./kobaltw --profiles experimental assemble

See discussion here: https://kotlinlang.slack.com/archives/C0BRKJ9K9/p1490455683178877

cbeust commented 7 years ago

Done.