Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish rn-tester apks and bundle to build artifacts #1250

Merged
merged 1 commit into from
Jul 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions .ado/android-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,32 +31,6 @@ jobs:

- template: templates/android-build-office.yml

- task: CmdLine@2
displayName: Remove RNTesterApp.android.bundle
inputs:
script: rm -f ./packages/rn-tester/js/RNTesterApp.android.bundle

- task: CmdLine@2
displayName: Create RNTester bundle
inputs:
script: node cli.js bundle --entry-file ./packages/rn-tester/js/RNTesterApp.android.js --bundle-output ./packages/rn-tester/js/RNTesterApp.android.bundle --platform android

- task: CmdLine@2
displayName: gradlew installArchives
inputs:
script: REACT_NATIVE_BOOST_PATH=$(System.DefaultWorkingDirectory)/build_deps ./gradlew installArchives -Pparam="excludeLibs"

# We have separate tasks to build rn-tester for debug and release due to a regression upstream. See https://github.com/facebook/react-native/issues/34168.
- task: CmdLine@2
displayName: Build rn-tester debug
inputs:
script: REACT_NATIVE_BOOST_PATH=$(System.DefaultWorkingDirectory)/build_deps ./gradlew :packages:rn-tester:android:app:assembleDebug

- task: CmdLine@2
displayName: Build rn-tester release
inputs:
script: REACT_NATIVE_BOOST_PATH=$(System.DefaultWorkingDirectory)/build_deps ./gradlew :packages:rn-tester:android:app:assembleRelease

- template: templates/prep-android-nuget.yml

- template: templates/download-android-dependencies.yml
Expand Down
15 changes: 4 additions & 11 deletions .ado/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -218,19 +218,12 @@ jobs:
inputs:
script: node .ado/removeWorkspaceConfig.js

- task: CmdLine@2
displayName: gradlew installArchives
inputs:
script: REACT_NATIVE_BOOST_PATH=$(System.DefaultWorkingDirectory)/build_deps ./gradlew installArchives -Pparam="excludeLibs"

- template: templates\prep-android-nuget.yml
- template: templates/prep-android-nuget.yml

# Enumerate and download all dependencies ..
- task: CmdLine@2
displayName: 'Verify Dependencies can be enumerated'
inputs:
script: sudo apt-get install python3-pip && sudo apt-get install python3-setuptools && pip3 install BeautifulSoup4 && pip3 install wheel && pip3 install wget && python3 .ado/downloadAndroidDependencies.py $(Build.SourcesDirectory) && tree $(Build.SourcesDirectory)/android

- template: templates/download-android-dependencies.yml
parameters:
artifact_feed: react-native/react-native-public

# Very similar to the default pack task .. but appends 'ndk21b' to the nuget pack version
- task: CmdLine@2
Expand Down
40 changes: 40 additions & 0 deletions .ado/templates/android-build-office.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,43 @@ steps:
displayName: Setup Build Dependencies
inputs:
script: chmod +x .ado/setup_droid_deps.sh && .ado/setup_droid_deps.sh

- task: CmdLine@2
displayName: Remove RNTesterApp.android.bundle
inputs:
script: rm -f ./packages/rn-tester/js/RNTesterApp.android.bundle

- task: CmdLine@2
displayName: Create RNTester bundle
inputs:
script: node cli.js bundle --entry-file ./packages/rn-tester/js/RNTesterApp.android.js --bundle-output ./packages/rn-tester/js/RNTesterApp.android.bundle --platform android

- task: CmdLine@2
displayName: gradlew installArchives
inputs:
script: REACT_NATIVE_BOOST_PATH=$(System.DefaultWorkingDirectory)/build_deps ./gradlew installArchives -Pparam="excludeLibs"

# We have separate tasks to build rn-tester for debug and release due to a regression upstream. See https://github.com/facebook/react-native/issues/34168.
- task: CmdLine@2
displayName: Build rn-tester debug
inputs:
script: REACT_NATIVE_BOOST_PATH=$(System.DefaultWorkingDirectory)/build_deps ./gradlew :packages:rn-tester:android:app:assembleDebug

- task: CmdLine@2
displayName: Build rn-tester release
inputs:
script: REACT_NATIVE_BOOST_PATH=$(System.DefaultWorkingDirectory)/build_deps ./gradlew :packages:rn-tester:android:app:assembleRelease

- task: CopyFiles@2
displayName: 'Copy rn-tester apks to build artifacts'
inputs:
SourceFolder: '$(System.DefaultWorkingDirectory)/packages/rn-tester/android/app/build/outputs/apk'
Contents: '**'
TargetFolder: '$(Build.StagingDirectory)/final/rn-tester'

- task: CopyFiles@2
displayName: 'Copy rn-tester android bundle to build artifacts'
inputs:
SourceFolder: '$(System.DefaultWorkingDirectory)/packages/rn-tester/js'
Contents: 'RNTesterApp.android.bundle'
TargetFolder: '$(Build.StagingDirectory)/final/rn-tester'