Ask Your Question
1

How can I create a task in build.gradle.kts that will give me a string as output?

asked 2021-06-17 11:00:00 +0000

huitzilopochtli gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-06-05 07:00:00 +0000

woof gravatar image

You can create a task in build.gradle.kts that outputs a string using the doLast method. Here is an example:

task("myTask") {
    doLast {
        println("Hello, World!")
    }
}

In this example, the task is named myTask and it will output the string "Hello, World!" when it is executed. You can modify the string to output any string you like.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2021-06-17 11:00:00 +0000

Seen: 16 times

Last updated: Jun 05 '22