diff --git a/.github/scatterlab/README.md b/.github/scatterlab/README.md index df9ebe38c28a..680a1993d509 100644 --- a/.github/scatterlab/README.md +++ b/.github/scatterlab/README.md @@ -256,6 +256,10 @@ controlled는 키스트로크마다 JS를 왕복해 `-_setAttributedString:`을 검증 절차와 회귀 판정 기준은 [ime-qa.md](ime-qa.md). +## Android prebuilt + +Android는 fork의 npm tarball에 든 `ReactAndroid/**` 소스를 아예 컴파일하지 않는다 — RNGP가 `com.facebook.react:react-android:`을 Maven Central에서 force resolve 하기 때문이다. 패치된 AAR을 실어 보내는 경로는 [`android-prebuilt.md`](android-prebuilt.md)에 있다. + ## iOS prebuilt core를 우리가 만든다 0.86에서 iOS prebuilt는 **opt-out 기본값**이고, prebuilt가 켜지면 `podspec_sources`가 헤더만 반환해 **모든 React\* pod의 구현이 `React.xcframework`에서 온다**(81개 podspec 중 69개가 이 스위치를 탄다). 실측: `RCTUITextView` / `RCTUITextField` / `RCTTextInputComponentView` 세 클래스 모두 상류 0.86.2 아티팩트의 Mach-O에 심볼로 존재한다(`nm -gU React`). 즉 **iOS 소스 수정은 prebuilt가 켜진 채로는 조용히 무효**다. diff --git a/.github/scatterlab/__tests__/android-prebuilt-consumer-test.sh b/.github/scatterlab/__tests__/android-prebuilt-consumer-test.sh new file mode 100755 index 000000000000..b49a29711a61 --- /dev/null +++ b/.github/scatterlab/__tests__/android-prebuilt-consumer-test.sh @@ -0,0 +1,347 @@ +#!/usr/bin/env bash +# Smoke test for scripts/android/scatterlab-prebuilt-maven.gradle. +# +# The script reads the package name and version relative to its own file, so each case builds +# a throwaway tree that mimics node_modules/react-native and copies the script into it. +# GRADLE_USER_HOME is sandboxed per case so a warm cache from one case cannot leak into +# another - the whole point of the script is what it does when the cache is cold. +set -euo pipefail + +REPO=$(cd "$(dirname "${BASH_SOURCE[0]}")/../../.." && pwd) +SCRIPT="$REPO/packages/react-native/scripts/android/scatterlab-prebuilt-maven.gradle" +GRADLE="$REPO/gradlew" +WORK=$(mktemp -d) +WORK=$(cd "$WORK" && pwd -P) # resolve symlinks (e.g. macOS /var -> /private/var): Gradle + # canonicalizes GRADLE_USER_HOME, so an unresolved $WORK would + # make case C compare against a path Gradle never reports. +httpd_pid="" +cleanup() { + # Preserve the script's own exit status: the Gradle daemons started per case keep writing + # into their sandboxed GRADLE_USER_HOME after the build returns, so the rm below races them + # and can fail. That is housekeeping, not a verdict - it must never turn a passing run red + # (or, worse, a failing one green). + local rc=$? + if [ -n "$httpd_pid" ]; then + kill "$httpd_pid" 2>/dev/null || true + fi + rm -rf "$WORK" 2>/dev/null || true + exit "$rc" +} +trap cleanup EXIT +failures=0 +skipped=0 + +# Lays out /rn/{package.json,scripts/android/