[ 
https://issues.apache.org/jira/browse/CB-9389?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14635538#comment-14635538
 ] 

Joe Bowser edited comment on CB-9389 at 7/21/15 6:17 PM:
---------------------------------------------------------

All projects should download and install the gradle wrapper, since that's how 
Android projects work.  Gradle is bundled in with the project so that once it's 
built, your project should always build regardless of what happens outside the 
project.  Otherwise, you end up having even worse dependency hell than what we 
have right now.


was (Author: bowserj):
All projects should download and install the gradle wrapper, since that's how 
Android projects work.  Gradle is bundled in with the project so that once it's 
built, your project should always build regardless of what happens outside the 
project.

> Android. Fix Gradle requirements test
> -------------------------------------
>
>                 Key: CB-9389
>                 URL: https://issues.apache.org/jira/browse/CB-9389
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>            Reporter: Sergey Grebnov
>
> Cordova Android on Windows10:
> After switching to the latest Cordova from master I noticed that Android 
> build hangs after the following line
> JAVA_HOME=c:\Program Files (x86)\Java\jdk1.8.0_11
> After adding additional logging I found out that it hangs internally on the 
> following check:
> {code}
> tryCommand: "c:\tools\android-sdk\sdk\tools\templates\gradle\wrapper\gradlew" 
> -v
> {code}
> Looks like this command tries to download gradle wrapper (PS. version also 
> looks old)
> {code}
> λ  "c:\tools\android-sdk\sdk\tools\templates\gradle\wrapper\gradlew" -v
> Downloading http://services.gradle.org/distributions/gradle-1.12-all.zip
> .....................................................................................................................
> {code}
> even if I have gradle tools installed and correctly set GRADLE_HOME 
> environment variable:
> {code}
> C:\Users\Sergei
> λ echo %gradle_home%
> C:\tools\gradle-2.3\
> C:\Users\Sergei
> λ gradle -v
> ------------------------------------------------------------
> Gradle 2.3
> ------------------------------------------------------------
> Build time:   2015-02-16 05:09:33 UTC
> Build number: none
> Revision:     586be72bf6e3df1ee7676d1f2a3afd9157341274
> Groovy:       2.3.9
> Ant:          Apache Ant(TM) version 1.9.3 compiled on December 23 2013
> JVM:          1.8.0_11 (Oracle Corporation 25.11-b03)
> OS:           Windows 8.1 6.3 x86
> {code}
> Here is corresponding logic in check_regs.js:
> {code}
> // Returns a promise. Called only by build and clean commands.
> module.exports.check_gradle = function() {
>     var sdkDir = process.env['ANDROID_HOME'];
>     var message = 'Could not find gradle wrapper within Android SDK. ';
>     if (!sdkDir) return Q.reject(message + 'Might need to install Android SDK 
> or set up \'ADROID_HOME\' env variable.');
>     var wrapper = path.join(sdkDir, 'tools', 'templates', 'gradle', 
> 'wrapper', 'gradlew');
>     return tryCommand('"' + wrapper + '" -v', message + 'Might need to update 
> your Android SDK.\n' +
>             'Looked here: ' + path.dirname(wrapper))
>     .then(function (output) {
>         // Parse Gradle version from command output
>         return/^gradle ((?:\d+\.)+(?:\d+))/gim.exec(output)[1];
>     });
> };
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to