Ackman Ackman - 5 months ago 16
Android Question

Purpose of gradle wrapper.jar in my libraries

I am trying to add libraries to my project and for some reason I am seeing a gradle folder with gradle wrapper.jar and artifactory.gradle.

what are the purposes of these files? Do I need to toch them or invoke them before adding this library?

Answer

I'll divide the answer in two parts, depending on files:

gradle-wrapper.jar:

This jar contains a packaged version of Gradle. It's recommended to have a wrapper for each projects that uses Gradle for two reasons:

  1. The wrapper can ensure to have the same version of Gradle for everyone that will use your project.
  2. If someone hasn't Gradle installed, he can use the wrapper to execute commands.

You can't "invoke" the wrapper but you can use the same Gradle commands with the wrapper.

artifactory.gradle

This gradle file can be a random file with some scripts/tasks inside but I'm pretty sure (as the name suggest) that it contains a script to upload artifacts to Artifactory.

You can execute its task with the wrapper (or a local Gradle).

Do I need to toch them or invoke them before adding this library?

No