Gradle Single vs Double Quotes

前端 未结 4 952
忘掉有多难
忘掉有多难 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条回答
  •  半阙折子戏
    2020-12-03 06:55

    Yes, you can use one or the other. The only difference is that double-quoted strings can be GStrings, which can contain evaluated expressions like in the following example taken from the Groovy documentation:

    foxtype = 'quick'
    foxcolor = ['b', 'r', 'o', 'w', 'n']
    println "The $foxtype ${foxcolor.join()} fox"
    // => The quick brown fox
    

提交回复
热议问题