代码拉取完成,页面将自动刷新
aliases:
- &android
components:
- build-tools-28.0.3
- android-28
- extra-android-m2repository
- extra-android-support
- &android-cache
directories:
- ~/.cache/yarn
- ~/.gradle/caches/modules-2
- ~/.gradle/wrapper
- &ios-cache
directories:
- ~/.rncache
- ~/Library/Caches/Yarn
- ~/Library/Caches/CocoaPods
- &init-new-project
|
nvm install node
yarn global add react-native-cli
react-native init App --version="0.58.4"
cd App
yarn add react-native-amap3d@next
jobs:
include:
- stage: "test js"
language: node_js
node_js: node
cache: yarn
script:
- node node_modules/react-native/local-cli/cli.js bundle --entry-file index.js --bundle-output bundle.js
- ls -lh bundle.*
- stage: "build test for example"
language: android
jdk: oraclejdk8
android: *android
before_cache:
- rm ~/.gradle/caches/modules-2/modules-2.lock
cache: *android-cache
script:
- nvm install node
- yarn
- cd android
- ./gradlew build
- ls -lh app/build/outputs/apk
- stage: "build test for example"
language: objective-c
osx_image: xcode10.1
cache: *ios-cache
before_install:
script:
- nvm install node
- brew install yarn
- yarn
- cd ios
- pod install --repo-update
- xcodebuild -workspace RNAMap3D.xcworkspace -scheme RNAMap3D -sdk iphonesimulator -quiet
- stage: "build test for new project"
language: android
jdk: oraclejdk8
android: *android
before_cache:
- rm ~/.gradle/caches/modules-2/modules-2.lock
cache: *android-cache
script:
- *init-new-project
- react-native link
- cd android
- ./gradlew build
- ls -lh app/build/outputs/apk/
- stage: "build test for new project"
language: objective-c
osx_image: xcode10.1
cache: *ios-cache
script:
- brew install yarn
- *init-new-project
- cd ios
- |
cat << EOF > Podfile
platform :ios, '9.0'
target 'App' do
pod 'React', :path => '../node_modules/react-native', :subspecs => [
'Core',
'CxxBridge',
'DevSupport',
'RCTText',
'RCTNetwork',
'RCTWebSocket',
]
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
pod 'react-native-amap3d', path: '../node_modules/react-native-amap3d/lib/ios'
end
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == "React"
target.remove_from_project
end
end
end
EOF
- pod install --repo-update
- xcodebuild -workspace App.xcworkspace -scheme App -sdk iphonesimulator -quiet
stages:
- "test js"
- name: "build test for example"
if: branch = master
- name: "build test for new project"
if: branch = release
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。