[
https://issues.apache.org/jira/browse/CB-11153?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15257339#comment-15257339
]
ASF GitHub Bot commented on CB-11153:
-------------------------------------
GitHub user nikhilkh opened a pull request:
https://github.com/apache/cordova-android/pull/299
CB-11153 Use Gradle 2.8 correctly for building Android projects
This improves gradle build performance by 1 second on my machine
@jasongin; @infil00p; @riknoll to help review
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/MSOpenTech/cordova-android gradlever
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/cordova-android/pull/299.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #299
----
commit f2a9e5c8ccca9f223bc651d3c95bb41a46e32df5
Author: Nikhil Khandelwal <[email protected]>
Date: 2016-04-26T00:32:56Z
CB-11153 Use Gradle 2.8 correctly for building Android projects
----
> 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: [email protected]
For additional commands, e-mail: [email protected]