forked from AionJayT/libsodium-jni
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-mac.sh
executable file
·37 lines (27 loc) · 1.12 KB
/
build-mac.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash -ev
#exports environment variables needed for build tool paths
. ./setenv.sh
#clears and redownloads the libsodium submodule
./submodule-update.sh
#builds libsodium for the host operating system
./build-libsodium-host.sh
#needed for mac osx
C_INCLUDE_PATH="${JAVA_HOME}/include:${JAVA_HOME}/include/linux:${JAVA_HOME}/include/darwin:/System/Library/Frameworks/JavaVM.framework/Headers"
export C_INCLUDE_PATH
gradle tasks --all
gradle generateSWIGsource --full-stacktrace
gradle build --full-stacktrace
#shorten build time by excluding tasks
#gradle compileReleaseSources -x compileNative_android-westmere -x compileNative_android-mips64r6 -x compileNative_android-mips32 -x compileNative_android-armv6 --full-stacktrace
#gradle compileNative_android-armv6 compileNative_android-armv7-a compileNative_host
#gradle compileNative_android-armv7-a compileNative_host
#not able to run on travis
#cp: /usr/lib/libsodium.dylib: Operation not permitted
#sudo cp ./libsodium/libsodium-host/lib/libsodium.dylib /usr/lib
#pushd jni
#./jnilib.sh
#popd
#mvn -q clean install
#./singleTest.sh
#./build-kaliumjni.sh
#./build-libsodiumjni.sh