Gradle Single vs Double Quotes

前端 未结 4 953
忘掉有多难
忘掉有多难 2020-12-03 06:28

I\'m new to gradle and am currently just trying to follow the tutorials and quite a few times I\'ve seen single and double quotes intermixed. I just wanted to know if there

4条回答
  •  旧时难觅i
    2020-12-03 07:05

    Gradle build scripts are written in Groovy. Groovy has both double-quoted and single-quoted String literals. The main difference is that double-quoted String literals support String interpolation:

    def x = 10
    println "result is $x" // prints: result is 10
    

    You can learn more about Groovy String interpolation in this or other Groovy articles on the web.

提交回复
热议问题