Is there a more up-to-date way to configure the `w...
# gradle
i
Is there a more up-to-date way to configure the
wrapper
task from the Kotlin DSL than this example (https://github.com/gradle/kotlin-dsl/issues/438#issuecomment-318749893)?:
Copy code
import org.gradle.api.tasks.wrapper.Wrapper.DistributionType
task<Wrapper>("wrapper") {
  gradleVersion = "4.8"
  distributionType = DistributionType.ALL
}
It works, but results in a deprecation warning:
Copy code
$ ./gradlew build --warning-mode=all

> Configure project :
Creating a custom task named 'wrapper' has been deprecated and is scheduled to be removed in Gradle 5.0. You can configure the existing task using the 'wrapper { }' syntax or create your custom task under a different name.'.
This seems to work:
Copy code
tasks {
	"wrapper"(Wrapper::class) {
		gradleVersion = "4.8"
		distributionType = DistributionType.ALL
	}
}
Is that the current idiomatic solution?
Here's the full build script I came up with (feedback welcomed): https://github.com/sdkotlin/kotlin-for-java-devs/blob/master/build.gradle.kts
m
I believe that is the idiomatic solution
👍 1