Skip to content

Commit

Permalink
Add download-sdk.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
qiuxiang committed Jul 30, 2021
1 parent a195312 commit a216668
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
- rm ~/.gradle/caches/modules-2/modules-2.lock
cache: *android-cache
script:
- ./scripts/download-sdk.sh
- nvm install node
- npm i && npm i typescript
- npm run build
Expand Down
3 changes: 2 additions & 1 deletion docs/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
```bash
yarn
yarn start # 这会占用一个终端窗口
./scripts/download-sdk.sh
```

## Android
Expand All @@ -16,4 +17,4 @@ yarn run-android
```bash
cd ios && pod install && cd ..
yarn run-ios
```
```
9 changes: 9 additions & 0 deletions scripts/download-sdk.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash

sdk_url="http://api.map.baidu.com/portal/sdk/api_filedownload?file_path=/Android/gp_6-1-3/BaiduLBS_Android_Vgp_6.1.3_100665344.zip"
curl "$sdk_url" -o sdk.zip
unzip -o sdk.zip
mv libs/BaiduLBS_Android.jar lib/android/libs/
rm -r lib/android/src/main/jniLibs
mv libs lib/android/src/main/jniLibs
rm sdk.zip readme.txt

0 comments on commit a216668

Please sign in to comment.