In Gradle, how to print out a message in the console / Event Log?

后端 未结 3 1268
难免孤独
难免孤独 2021-02-02 05:15

I\'m trying to verify that my source and target paths are properly setup when I execute a deploy command.

See the example below:
(copied from: http://eppz.eu/blog/u

3条回答
  •  轮回少年
    2021-02-02 05:47

    Basically you can print out a message by this gradle script -

     println "This is a simple gradle message"
    

    but if you want to print a variable in the message then you can do it by the following code

    def variable = "This is a simple variable"
    
    println "Message: ${variable}"
    

提交回复
热议问题