How to determine the version of Gradle?

前端 未结 8 1284
旧巷少年郎
旧巷少年郎 2020-12-07 17:17

How can I know which version of Gradle I am using in my Android Studio? Please guide.

I want to make sure I am using Gradle version 2.2.1.

相关标签:
8条回答
  • 2020-12-07 17:53

    I running the following in my project:

    ./gradlew --version
    
    ------------------------------------------------------------
    Gradle 4.7
    ------------------------------------------------------------
    
    Build time:   2018-04-18 09:09:12 UTC
    Revision:     b9a962bf70638332300e7f810689cb2febbd4a6c
    
    Groovy:       2.4.12
    Ant:          Apache Ant(TM) version 1.9.9 compiled on February 2 2017
    JVM:          1.8.0_212 (AdoptOpenJDK 25.212-b03)
    OS:           Mac OS X 10.15 x86_64
    
    0 讨论(0)
  • 2020-12-07 17:55

    You can also add the following line to your build script:

    println "Running gradle version: $gradle.gradleVersion"
    

    or (it won't be printed with -q switch)

    logger.lifecycle "Running gradle version: $gradle.gradleVersion"
    
    0 讨论(0)
提交回复
热议问题