Storing version of dependency in variable in gradle

前端 未结 1 1910
陌清茗
陌清茗 2021-02-19 18:51

How should I store dependency version in variable in gradle build script without error from Android Studio?

When I make this:

def guavaVersion = \'1         


        
1条回答
  •  南笙
    南笙 (楼主)
    2021-02-19 19:26

    try this:

    ext.guavaVersion = '17.0'
    compile "com.google.guava:guava:$guavaVersion"
    

    0 讨论(0)
提交回复
热议问题