cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Grebnov (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CB-9389) Android. Fix Gradle requirements test
Date Mon, 20 Jul 2015 11:52:04 GMT

     [ https://issues.apache.org/jira/browse/CB-9389?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sergey Grebnov updated CB-9389:
-------------------------------
    Description: 
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\
{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}


  was:
Cordova Android on Windows10:

After switching to the latest Cordova in master I notice 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 on the following check internally:
{code}
tryCommand: "c:\tools\android-sdk\sdk\tools\templates\gradle\wrapper\gradlew" -v
{code}

Looks like this command tries to download gradle wrapper 
{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\
{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}



> 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\
> {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: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message