Fattum
Fattum

Reputation: 1006

How to generate the gradlew

I am trying to figure out, how to build apk-s using shell. I came over gradlew script, that should do the work for me. Yet, I miss this file in my directory, I have only the windows gradlew.bat file, that doesn't fit my purposes. I read that i have to add in my build.gradle file.

task wrapper(type: Wrapper) {
gradleVersion = '2.0'
}

Yet, i still don't know if this task should be placed to my project build file or to my module build file(tried out both - didn't help). Any tipps are appreciated.

Upvotes: 9

Views: 9012

Answers (1)

Jared Burrows
Jared Burrows

Reputation: 55535

Simply run this via command line:

gradle wrapper

Also, Gradle 2.4 is the latest release and 2.5 should be out soon. So you might want to do:

task wrapper(type: Wrapper) {
    gradleVersion = '2.4'
}

or

gradle wrapper --gradle-version 2.4

Please read the docs here: https://docs.gradle.org/current/userguide/gradle_wrapper.html

Upvotes: 13

Related Questions