[ https://issues.apache.org/jira/browse/CB-11153?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15258159#comment-15258159 ]
ASF GitHub Bot commented on CB-11153: ------------------------------------- Github user infil00p commented on the pull request: https://github.com/apache/cordova-android/pull/299#issuecomment-214762095 Why 2.8? Why not 2.10? Is 2.10 slower than 2.8? Will this break other users somehow? > 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-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org