Speed up ndk-build from sbt-android

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
This commit is contained in:
Syrone Wong
2017-01-09 20:02:43 +08:00
committed by Max Lv
parent 5a8493e0b1
commit 33d8139f57
2 changed files with 6 additions and 1 deletions
+1 -1
View File
@@ -50,4 +50,4 @@ install:
fi
script:
- $SBTPATH/sbt native-build android:package-debug
- $SBTPATH/sbt -DNPROC=$(nproc) native-build android:package-debug
+5
View File
@@ -8,6 +8,11 @@ name := "shadowsocks"
version := "3.4.1"
versionCode := Some(173)
// Speed up ndk-build by reading nproc from environment
// and default to 8
val nproc = sys.props.getOrElse("NPROC", default = "8")
ndkArgs := Seq(s"-j$nproc")
platformTarget := "android-25"
compileOrder := CompileOrder.JavaThenScala