[
https://issues.apache.org/jira/browse/CB-9389?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14637399#comment-14637399
]
ASF subversion and git services commented on CB-9389:
-----------------------------------------------------
Commit 5fa4728ebe4a54e03d85821d712a6388f9196130 in cordova-android's branch
refs/heads/4.1.x from [~vladimir.kotikov]
[ https://git-wip-us.apache.org/repos/asf?p=cordova-android.git;h=5fa4728 ]
CB-9389 Fixes build/check_reqs hang
This removes gradle version check since it requires downloading and
installing of gradle distributive if it is not installed yet.
Partial revert of 4bf705a
(cherry picked from commit f9ce1c607befb7e5ce6e9ea98a1dd93b752ef297)
> 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]