forked from software-mansion/react-native-reanimated
-
Notifications
You must be signed in to change notification settings - Fork 0
/
createNPMPackage.sh
executable file
·60 lines (45 loc) · 1.14 KB
/
createNPMPackage.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/bash
set -e
set -x
ROOT=$(pwd)
unset CI
versions=("0.67.0-rc.2" "0.66.1" "0.65.1" "0.64.1" "0.63.3")
version_name=("67" "66" "65" "64" "63")
for index in {0..4}
do
yarn add react-native@"${versions[$index]}"
for for_hermes in "True" "False"
do
engine="jsc"
if [ "$for_hermes" == "True" ]; then
engine="hermes"
fi
echo "engine=${engine}"
cd android
gradle clean
FOR_HERMES=${for_hermes} gradle :assembleDebug
cd $ROOT
rm -rf android-npm/react-native-reanimated-"${version_name[$index]}-${engine}".aar
cp android/build/outputs/aar/*.aar android-npm/react-native-reanimated-"${version_name[$index]}-${engine}".aar
done
done
rm -rf libSo
mkdir libSo
cd libSo
mkdir fbjni
cd fbjni
wget https://repo1.maven.org/maven2/com/facebook/fbjni/fbjni/0.2.2/fbjni-0.2.2.aar
unzip fbjni-0.2.2.aar
rm -r $(find . ! -name '.' ! -name 'jni' -maxdepth 1)
rm $(find . -name '*libc++_shared.so')
cd ../..
yarn add [email protected] --dev
mv android android-temp
mv android-npm android
yarn run type:generate
npm pack
mv android android-npm
mv android-temp android
rm -rf ./lib
rm -rf ./libSo
echo "Done!"