forked from software-mansion/react-native-reanimated
-
Notifications
You must be signed in to change notification settings - Fork 0
/
createNPMPackage.sh
executable file
·59 lines (38 loc) · 1000 Bytes
/
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
#!/bin/bash
set -e
ROOT=$(pwd)
# PART I - I (clean)
rm -rf android/build/outputs/aar/*.aar
cd android
gradle clean
cd $ROOT
yarn add react-native --dev
# PART I (add latest aar to android-npm)
cd android
gradle :assembleDebug
cd $ROOT
rm -rf android-npm/react-native-reanimated-63.aar
cp android/build/outputs/aar/*.aar android-npm/react-native-reanimated-63.aar
# PART II (clean)
rm -rf android/build/outputs/aar/*.aar
cd android
gradle clean
cd $ROOT
# part III (add react-native 62 aar to android-npm)
yarn add [email protected] --dev
cd android
gradle :assembleDebug
cd $ROOT
rm -rf android-npm/react-native-reanimated-62.aar
cp android/build/outputs/aar/*.aar android-npm/react-native-reanimated-62.aar
# PART IV (revert react-native change)
yarn add react-native --dev
# PART V (prepare android directory)
mv android android-temp
mv android-npm android
# PART VI (create package)
npm pack
# PART VII (clean)
mv android android-npm
mv android-temp android
echo "Done!"