Closed kikugie closed 11 months ago
This makes ReleaseType class accessible in build configuration, so setup like this is possible: gradle.properties
ReleaseType
gradle.properties
# ... release_type=stable
build.gradle
import me.modmuss50.mpp.ReleaseType // ... publishMods { type = ReleaseType.of(project.release_type) // ... }
Currently this can be replicated this way: build.gradle
import me.modmuss50.mpp.PublishOptions // ... publishMods { type = PublishOptions.ReleaseType.valueOf(project.release_type.toUpperCase()) // ... }
This approach includes more boilerplate and has a less descriptive error message.
Looks good, make sure to run spotlessKotlin and spotlessKotlinApply Gradle tasks so the build passes 👍
spotlessKotlin
spotlessKotlinApply
Motivation
This makes
ReleaseType
class accessible in build configuration, so setup like this is possible:gradle.properties
build.gradle
Current behaviour
Currently this can be replicated this way:
build.gradle
This approach includes more boilerplate and has a less descriptive error message.