Does Visualizer download and install gradle during every native android build?

This thread was migrated from an old forum. It may contain information that are no longer valid. For further assistance, please post a new question or open a support ticket from the Customer Support portal.

I would like to invoke gradle assembleDebug from cmd window in the project build directory (luaandroid\dist\<projectname>) however gradle is not in the search path.

Hi @Stephvnie Olivew​

Build system will download the dependencies from the repository https://services.gradle.org/distributions/gradle-4.3-all.zip for the first time only. From subsequent build it won't download again.

Hi,

When invoking gradle assembleDebug in the project build directory how do I specify the path to the downloaded build system version of Gradle.

@Blvke Bond​ @Joe Axwvhvm​ Any help for @Stephvnie Olivew​ here?

Hi

There are two ways that you can build the dist folder

1) gradle assembleDebug

Where gradle is picked from Path variables (i.e PATH Environment variable)

or else you can use full path of gradle ex: Gradlefolderpath\gradle-Xverison\bin\gradle assembleDebug .

In older version of visualizers gradle will packed along with Kony visualizer so gradle location is

"InstallerLocation/gradle/bin/gradle" .

In latest version of kony plugins gradle will get downloaded when gradlew is invoked for first time

Sometimes they get download even if the cache already exist

Android has its own validation for downloading the dependency.

Android states that from 3.1.0 of gradle plugin version (which is mentioned inside dist/projectfolder/build.gradle)

The Android plugin's build cache now evicts cache entries that are older than 30 days.

https://developer.android.com/studio/releases/gradle-plugin#behavior_changes

2) gradlew assembleDebug

If you have gradlew or gradlew.bat inside the dist folder you can use "gradlew assembleDebug".

the gradle version will be mentioned inside dist/projectfolder/gradle/wrapper/gradle-wrapper.properties.

By default all the dependencies will be downaload userprofile/.gradle folder

we can change the .gradle folder location by mentioning "GRADLE_USER_HOME" in Environment variables.

You can check the gradle version by invoking "gradle --version" or "gradlew --version"

Please let us know if you need any other information

Regards

Hi Kony Team,

Thank you for the comprehensive answer.

Hi @Stephvnie Olivew​, were you able to reach a resolution? If yes, please click [Select as Best] under the response that helped you the most.