Skip to content

Commit 2f56c0c

Browse files
kmagierafacebook-github-bot-7
authored and
facebook-github-bot-7
committed
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 facebook#4462 Reviewed By: mkonicek Differential Revision: D2754786 Pulled By: mkonicek fb-gh-sync-id: 92c07d29aec6d5b4b2c55205b42b135c4d9479a9
1 parent 1d71457 commit 2f56c0c

File tree

5 files changed

+12
-22
lines changed

5 files changed

+12
-22
lines changed

ReactAndroid/build.gradle

+5-11
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,11 @@ task downloadBoost(dependsOn: createNativeDepsDirectories, type: Download) {
2929
dest new File(downloadsDir, 'boost_1_57_0.zip')
3030
}
3131

32-
task prepareBoost(dependsOn: downloadBoost) {
33-
inputs.files downloadBoost.dest, 'src/main/jni/third-party/boost/Android.mk'
34-
outputs.dir "$thirdPartyNdkDir/boost"
35-
doLast {
36-
copy {
37-
from { zipTree(downloadBoost.dest) }
38-
from 'src/main/jni/third-party/boost/Android.mk'
39-
include 'boost_1_57_0/boost/**/*.hpp', 'Android.mk'
40-
into "$thirdPartyNdkDir/boost"
41-
}
42-
}
32+
task prepareBoost(dependsOn: downloadBoost, type: Copy) {
33+
from zipTree(downloadBoost.dest)
34+
from 'src/main/jni/third-party/boost/Android.mk'
35+
include 'boost_1_57_0/boost/**/*.hpp', 'Android.mk'
36+
into "$thirdPartyNdkDir/boost"
4337
}
4438

4539
task downloadDoubleConversion(dependsOn: createNativeDepsDirectories, type: Download) {

build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ buildscript {
66
mavenLocal()
77
}
88
dependencies {
9-
classpath 'com.android.tools.build:gradle:1.3.1'
10-
classpath 'de.undercouch:gradle-download-task:1.2'
9+
classpath 'com.android.tools.build:gradle:1.5.0'
10+
classpath 'de.undercouch:gradle-download-task:2.0.0'
1111

1212
// NOTE: Do not place your application dependencies here; they belong
1313
// in the individual module build.gradle files

gradle/wrapper/gradle-wrapper.jar

3.65 KB
Binary file not shown.
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Wed Apr 10 15:27:10 PDT 2013
1+
#Mon Dec 14 14:06:01 GMT 2015
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-2.9-bin.zip

gradlew

+3-7
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,6 @@ case "`uname`" in
4242
;;
4343
esac
4444

45-
# For Cygwin, ensure paths are in UNIX format before anything is touched.
46-
if $cygwin ; then
47-
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
48-
fi
49-
5045
# Attempt to set APP_HOME
5146
# Resolve links: $0 may be a link
5247
PRG="$0"
@@ -61,9 +56,9 @@ while [ -h "$PRG" ] ; do
6156
fi
6257
done
6358
SAVED="`pwd`"
64-
cd "`dirname \"$PRG\"`/" >&-
59+
cd "`dirname \"$PRG\"`/" >/dev/null
6560
APP_HOME="`pwd -P`"
66-
cd "$SAVED" >&-
61+
cd "$SAVED" >/dev/null
6762

6863
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
6964

@@ -114,6 +109,7 @@ fi
114109
if $cygwin ; then
115110
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
116111
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
112+
JAVACMD=`cygpath --unix "$JAVACMD"`
117113

118114
# We build the pattern for arguments to be converted via cygpath
119115
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`

0 commit comments

Comments
 (0)