diff --git a/.ado/android-pr.yml b/.ado/android-pr.yml index fd4ac235668491..3507ec1b964df4 100644 --- a/.ado/android-pr.yml +++ b/.ado/android-pr.yml @@ -74,10 +74,24 @@ jobs: SYSTEM_ACCESSTOKEN: $(System.AccessToken) githubApiToken: $(githubApiToken) - - task: CmdLine@2 - displayName: gradlew clean - inputs: - script: ./gradlew clean +# In RN64 "clean" task tries to run the build again. It is reproing in 0.64-stable branch but fixed in 0.65-stable. +# I can't zero on the exact cause .. but turns out the issue is with rntester clean task. +# +# mganandraj@RNDroid:~/github/rnm-64$ ./gradlew :packages:rn-tester:android:app:clean --dry-run +# :packages:react-native-codegen:android:buildCodegenCLI SKIPPED +# :packages:rn-tester:android:app:generateCodegenSchemaFromJavaScript SKIPPED +# :packages:rn-tester:android:app:generateCodegenArtifactsFromSchema SKIPPED +# :ReactAndroid:extractAARHeaders SKIPPED +# :ReactAndroid:extractJNIFiles SKIPPED +# :ReactAndroid:generateCodegenSchemaFromJavaScript SKIPPED +# :ReactAndroid:generateCodegenArtifactsFromSchema SKIPPED +# :ReactAndroid:prepareBoost SKIPPED +# :ReactAndroid:createNativeDepsDirectories SKIPPED +# .. +# - task: CmdLine@2 +# displayName: gradlew clean +# inputs: +# script: ./gradlew clean - task: PublishBuildArtifacts@1 displayName: 'Publish final artifacts' diff --git a/.ado/templates/android-build-office.yml b/.ado/templates/android-build-office.yml index e220fd7178f7a0..e363e5b77be124 100644 --- a/.ado/templates/android-build-office.yml +++ b/.ado/templates/android-build-office.yml @@ -30,12 +30,29 @@ steps: inputs: script: yarn install --frozen-lockfile + # scripts/bump-oss-version.js + # + # update the following files to the commit id. + # package.json (-> npm package version) + # gradle.properties (-> aar version) + # gradle.properties (-> aar version) + # + # The following files are updated for runtime version checking. + # ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java + # React/Base/RCTVersion.m + # ReactCommon/cxxreact/ReactNativeVersion.h + # Libraries/Core/ReactNativeVersion.js + # + # --nightly => version = `0.0.0-${currentCommit.slice(0, 9)}`; + # When on master branch or non-stable branch. - task: CmdLine@2 displayName: Bump canary package version inputs: script: node scripts/bump-oss-version.js --nightly - condition: eq(variables['Build.SourceBranchName'], 'master') - + condition: or(eq(variables['Build.SourceBranchName'], 'master'), not(contains(variables['Build.SourceBranchName'], '-stable'))) + + # TODO: We don't seem to be running bump-oss-version.js for stable branches, hence we would end up publishing using the values in the repository. + - task: CmdLine@2 displayName: nuget restore inputs: diff --git a/.ado/templates/apple-droid-node-patching.yml b/.ado/templates/apple-droid-node-patching.yml index 5b0133799ef0a7..41e512ace404af 100644 --- a/.ado/templates/apple-droid-node-patching.yml +++ b/.ado/templates/apple-droid-node-patching.yml @@ -5,4 +5,4 @@ steps: - task: CmdLine@2 displayName: Apply Android specific patches for Office consumption inputs: - script: node $(System.DefaultWorkingDirectory)/android-patches/bundle/bundle.js patch $(System.DefaultWorkingDirectory) Build OfficeRNHost V8 Focus --patch-store $(System.DefaultWorkingDirectory)/android-patches/patches --log-folder $(System.DefaultWorkingDirectory)/android-patches/logs --confirm ${{ parameters.apply_office_patches }} + script: node $(System.DefaultWorkingDirectory)/android-patches/bundle/bundle.js patch $(System.DefaultWorkingDirectory) Build OfficeRNHost V8 Focus MAC --patch-store $(System.DefaultWorkingDirectory)/android-patches/patches --log-folder $(System.DefaultWorkingDirectory)/android-patches/logs --confirm ${{ parameters.apply_office_patches }} diff --git a/android-patches/patches/Build/ReactAndroid/ReactAndroid.nuspec b/android-patches/patches/Build/ReactAndroid/ReactAndroid.nuspec index 200effcbc06ba7..109878ed6ee0d0 100644 --- a/android-patches/patches/Build/ReactAndroid/ReactAndroid.nuspec +++ b/android-patches/patches/Build/ReactAndroid/ReactAndroid.nuspec @@ -1,6 +1,6 @@ --- "E:\\gh\\react-native-macos2\\ReactAndroid\\ReactAndroid.nuspec" 1969-12-31 16:00:00.000000000 -0800 -+++ "E:\\gh\\react-native-macos\\ReactAndroid\\ReactAndroid.nuspec" 2021-10-12 19:48:38.934480100 -0700 -@@ -0,0 +1,200 @@ ++++ "E:\\gh\\react-native-macos\\ReactAndroid\\ReactAndroid.nuspec" 2021-10-16 13:47:24.356639200 -0700 +@@ -0,0 +1,242 @@ + + + @@ -100,6 +100,26 @@ + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + @@ -185,9 +205,29 @@ + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + -+ -+ ++ + + + @@ -195,6 +235,8 @@ + + + ++ ++ + + + diff --git a/android-patches/patches/MAC/ReactAndroid/src/main/java/com/facebook/react/modules/debug/DevSettingsModule.java b/android-patches/patches/MAC/ReactAndroid/src/main/java/com/facebook/react/modules/debug/DevSettingsModule.java new file mode 100644 index 00000000000000..84e6c96614a361 --- /dev/null +++ b/android-patches/patches/MAC/ReactAndroid/src/main/java/com/facebook/react/modules/debug/DevSettingsModule.java @@ -0,0 +1,12 @@ +--- "E:\\gh\\react-native-macos2\\ReactAndroid\\src\\main\\java\\com\\facebook\\react\\modules\\debug\\DevSettingsModule.java" 2021-08-31 19:52:47.502468000 -0700 ++++ "E:\\gh\\react-native-macos\\ReactAndroid\\src\\main\\java\\com\\facebook\\react\\modules\\debug\\DevSettingsModule.java" 2021-10-20 19:29:11.611192200 -0700 +@@ -118,4 +118,9 @@ + public void removeListeners(double count) { + // iOS only + } ++ ++ @Override ++ public void setIsSecondaryClickToShowDevMenuEnabled(boolean enabled) { ++ // macOS only. ++ } + } diff --git a/android-patches/patches/OfficeRNHost/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactBridge.java b/android-patches/patches/OfficeRNHost/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactBridge.java deleted file mode 100644 index 453802aa68d84f..00000000000000 --- a/android-patches/patches/OfficeRNHost/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactBridge.java +++ /dev/null @@ -1,27 +0,0 @@ ---- "E:\\gh\\react-native-macos2\\ReactAndroid\\src\\main\\java\\com\\facebook\\react\\bridge\\ReactBridge.java" 2021-10-12 13:35:49.124099000 -0700 -+++ "E:\\gh\\react-native-macos\\ReactAndroid\\src\\main\\java\\com\\facebook\\react\\bridge\\ReactBridge.java" 2021-10-12 13:22:46.508704400 -0700 -@@ -31,6 +31,24 @@ - Systrace.beginSection( - TRACE_TAG_REACT_JAVA_BRIDGE, "ReactBridge.staticInit::load:reactnativejni"); - ReactMarker.logMarker(ReactMarkerConstants.LOAD_REACT_NATIVE_SO_FILE_START); -+ -+ // JS Engine is configurable .. And we expect only one packaged. -+ // Hence ignore failure. -+ -+ try { -+ SoLoader.loadLibrary("hermes"); -+ } catch (UnsatisfiedLinkError jscE) {} -+ -+ try { -+ SoLoader.loadLibrary("v8jsi"); -+ } catch (UnsatisfiedLinkError jscE) {} -+ -+ SoLoader.loadLibrary("glog_init"); -+ SoLoader.loadLibrary("fb"); -+ SoLoader.loadLibrary("fbjni"); -+ SoLoader.loadLibrary("yoga"); -+ SoLoader.loadLibrary("jsinspector"); -+ - SoLoader.loadLibrary("reactnativejni"); - ReactMarker.logMarker(ReactMarkerConstants.LOAD_REACT_NATIVE_SO_FILE_END); - Systrace.endSection(TRACE_TAG_REACT_JAVA_BRIDGE);