gradle.rst
changeset 2157 e5b91cfd93ce
parent 2156 de9f7c02b6e9
child 2158 4273aeaa0c1a
equal deleted inserted replaced
2156:de9f7c02b6e9 2157:e5b91cfd93ce
   212 
   212 
   213 ``-m`` option allow parsing build scripts without actually executing them::
   213 ``-m`` option allow parsing build scripts without actually executing them::
   214 
   214 
   215   $ gradle -m clean compile
   215   $ gradle -m clean compile
   216 
   216 
       
   217 Gradle wrapper
       
   218 ==============
       
   219 
       
   220 With Gradle v2.4 and above::
       
   221 
       
   222   $ cd $PROJ
       
   223   $ gradle wrapper --gradle-version 3.5
       
   224 
       
   225 It will add ``gradle/wrapper/gradle-wrapper.jar`` to project root and next call
       
   226 to ``./gradlew`` download Gradle distribution from ``distributionUrl`` parameter
       
   227 from ``gradle/wrapper/gradle-wrapper.properties`` file. Dictribution will be
       
   228 cached in ``~/.gradle/wrapper/dists.gradle/wrapper/dists`` directory so next
       
   229 calls won't require download.
       
   230 
       
   231 Alternatively define task::
       
   232 
       
   233   task wrapper(type: Wrapper) {
       
   234       gradleVersion = '2.0'
       
   235   }
       
   236 
       
   237 For increase security add ``distributionSha256Sum`` parameter to
       
   238 ``gradle-wrapper.properties`` file. Distribution SHA-256 sum can be obtained via
       
   239 ``shasum`` utility.
       
   240 
       
   241 https://docs.gradle.org/current/userguide/gradle_wrapper.html
       
   242   Official docs.
       
   243 
   217 Managing Gradle cache
   244 Managing Gradle cache
   218 =====================
   245 =====================
   219 
   246 
   220 Work in offline mode with ``--offline`` option.
   247 Work in offline mode with ``--offline`` option.
   221 
   248