Upgrade gradle to 2.9

Summary:
public

New version of gradle has a better support for zipTree copy task. Since we have a few of those including one for boost library which used to take very long, after upgrading we no longer need 6a656a1.

Also seems like many improvements made to gradle since 2.2 made it perform better on incremental builds (around 10% improvement on my laptop).

Command used to upgrade gradle version:

    gradle wrapper --gradle-version 2.9

Some of the plugins require updating as well since the previous versions were incompatible with gradle 2.9.

Closes https://github.com/facebook/react-native/pull/4462

Reviewed By: mkonicek

Differential Revision: D2754786

Pulled By: mkonicek

fb-gh-sync-id: 92c07d29aec6d5b4b2c55205b42b135c4d9479a9
This commit is contained in:
Krzysztof Magiera 2015-12-14 06:23:06 -08:00 committed by facebook-github-bot-7
parent 1d71457934
commit 2f56c0c90a
5 changed files with 12 additions and 22 deletions

View File

@ -29,17 +29,11 @@ task downloadBoost(dependsOn: createNativeDepsDirectories, type: Download) {
dest new File(downloadsDir, 'boost_1_57_0.zip')
}
task prepareBoost(dependsOn: downloadBoost) {
inputs.files downloadBoost.dest, 'src/main/jni/third-party/boost/Android.mk'
outputs.dir "$thirdPartyNdkDir/boost"
doLast {
copy {
from { zipTree(downloadBoost.dest) }
from 'src/main/jni/third-party/boost/Android.mk'
include 'boost_1_57_0/boost/**/*.hpp', 'Android.mk'
into "$thirdPartyNdkDir/boost"
}
}
task prepareBoost(dependsOn: downloadBoost, type: Copy) {
from zipTree(downloadBoost.dest)
from 'src/main/jni/third-party/boost/Android.mk'
include 'boost_1_57_0/boost/**/*.hpp', 'Android.mk'
into "$thirdPartyNdkDir/boost"
}
task downloadDoubleConversion(dependsOn: createNativeDepsDirectories, type: Download) {

View File

@ -6,8 +6,8 @@ buildscript {
mavenLocal()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.1'
classpath 'de.undercouch:gradle-download-task:1.2'
classpath 'com.android.tools.build:gradle:1.5.0'
classpath 'de.undercouch:gradle-download-task:2.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files

Binary file not shown.

View File

@ -1,6 +1,6 @@
#Wed Apr 10 15:27:10 PDT 2013
#Mon Dec 14 14:06:01 GMT 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.9-bin.zip

10
gradlew vendored
View File

@ -42,11 +42,6 @@ case "`uname`" in
;;
esac
# For Cygwin, ensure paths are in UNIX format before anything is touched.
if $cygwin ; then
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
fi
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
@ -61,9 +56,9 @@ while [ -h "$PRG" ] ; do
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >&-
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >&-
cd "$SAVED" >/dev/null
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
@ -114,6 +109,7 @@ fi
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`