cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-11153) Use Gradle 2.8 correctly for building Android projects
Date Tue, 26 Apr 2016 21:57:13 GMT

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

ASF GitHub Bot commented on CB-11153:
-------------------------------------

Github user asfgit closed the pull request at:

    https://github.com/apache/cordova-android/pull/299


> Use Gradle 2.8 correctly for building Android projects
> ------------------------------------------------------
>
>                 Key: CB-11153
>                 URL: https://issues.apache.org/jira/browse/CB-11153
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>            Reporter: Nikhil Khandelwal
>
> In build.gradle we have this:
> {code}
> task wrapper(type: Wrapper) {
>     gradleVersion = '2.8'
> }
> {code}
> However, we do not have the gradle version specified correctly in prepEnv:
> {code}
>         // If the gradle distribution URL is set, make sure it points to version we want.
>         // If it's not set, do nothing, assuming that we're using a future version of
gradle that we don't want to mess with.
>         // For some reason, using ^ and $ don't work.  This does the job, though.
>         var distributionUrlRegex = /distributionUrl.*zip/;
>         /*jshint -W069 */
>         var distributionUrl = process.env['CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL']
|| 'http\\://services.gradle.org/distributions/gradle-2.2.1-all.zip';
>         /*jshint +W069 */
>         var gradleWrapperPropertiesPath = path.join(self.root, 'gradle', 'wrapper', 'gradle-wrapper.properties');
>         shell.chmod('u+w', gradleWrapperPropertiesPath);
>         shell.sed('-i', distributionUrlRegex, 'distributionUrl='+distributionUrl, gradleWrapperPropertiesPath);
> {code}
> One side effect of this is that it improves build performance significantly - on my machine
by 1 second - on a "helloworld" project.



--
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