Вопрос

I'm poking around with the new Android Studio.

I have had no problem building (via an export/import) my project, but I have a question concerning how I can do things via the command line. I do not see a packaged stand-alone executable of gradle with Android Studio.

What is the correct approach to running my builds via my terminal?

Thoughts I've had are:

  1. Install a separate version of Gradle, my concern is keeping this in-sync with Android Studio's version.
  2. Using the gradlew (gradle wrapper) in sdk/tools/templates/gradle/wrapper/gradlew by adding it to my path. I'm just learning gradle so don't know if this is correct.

I'm trying to get a fine granularity to do things like:

    gradle tasks
    gradle assembleRelease

etc...

Thanks!

Это было полезно?

Решение

When you create a new project in Android Studio the files in sdk/tools/templates/gradle/wrapper get copied into the root project directory. What I did with existing projects is copy them over manually and use the gradlew script.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top