- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for GreetingToFileTask (0.18 sec)
-
platforms/documentation/docs/src/snippets/tasks/customTaskWithFileProperty/kotlin/build.gradle.kts
// tag::task[] abstract class GreetingToFileTask : DefaultTask() { @get:OutputFile abstract val destination: RegularFileProperty @TaskAction fun greet() { val file = destination.get().asFile file.parentFile.mkdirs() file.writeText("Hello!") } } // end::task[] // tag::config[] val greetingFile = objects.fileProperty() tasks.register<GreetingToFileTask>("greet") {
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Mon Nov 27 17:53:42 UTC 2023 - 764 bytes - Viewed (0) -
platforms/documentation/docs/src/snippets/tasks/customTaskWithFileProperty/groovy/build.gradle
abstract class GreetingToFileTask extends DefaultTask { @OutputFile abstract RegularFileProperty getDestination() @TaskAction def greet() { def file = getDestination().get().asFile file.parentFile.mkdirs() file.write 'Hello!' } } // end::task[] // tag::config[] def greetingFile = objects.fileProperty() tasks.register('greet', GreetingToFileTask) {
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Mon Nov 27 17:53:42 UTC 2023 - 718 bytes - Viewed (0) -
platforms/documentation/docs/src/docs/userguide/authoring-builds/plugins/implementing_gradle_plugins_binary.adoc
This will enable lazy configuration so that the actual location will only be resolved when the file is needed and can be reconfigured at any time during build configuration. This Gradle build file defines a task `GreetingToFileTask` that writes a greeting to a file. It also registers two tasks: `greet`, which creates the file with the greeting, and `sayGreeting`, which prints the file's contents.
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Mon Apr 29 02:31:44 UTC 2024 - 37.7K bytes - Viewed (0)