Skip to content
Open
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
68 changes: 68 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: CI
on:
workflow_call:
workflow_dispatch:
pull_request:
branches:
- main
Expand Down Expand Up @@ -135,6 +136,73 @@ jobs:
-configuration Debug \
-destination 'generic/platform=iOS' \
-derivedDataPath example/ios/DerivedData \
CODE_SIGNING_ALLOWED=NO \
build

build-rn-0-86-android:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup
uses: ./.github/actions/setup

- name: Build local v6 packages
run: yarn all:prepare

- name: Install RN 0.86 test project dependencies
working-directory: test-projects/rn-purchasely-test
run: npm ci --ignore-scripts

- name: Install JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'

- name: Set up Android SDK
uses: android-actions/setup-android@v3

- name: Accept Android SDK licenses
run: yes | sdkmanager --licenses

- name: Install Android SDK build requirements
run: sdkmanager "platforms;android-36" "build-tools;35.0.0" "ndk;27.1.12297006"

- name: Build RN 0.86 test project for Android
working-directory: test-projects/rn-purchasely-test/android
run: ./gradlew :app:assembleDebug
Comment on lines +142 to +175

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 No Gradle caching in build-rn-0-86-android

The existing build-android job uses both gradle/actions/setup-gradle@v5 (with built-in Gradle cache) and an explicit actions/cache@v4 for ~/.android/build-cache. The new build-rn-0-86-android job has neither, so it will re-download and recompile Gradle wrapper and all Android dependencies from scratch on every run, significantly increasing CI time.

Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/ci.yml
Line: 142-175

Comment:
**No Gradle caching in `build-rn-0-86-android`**

The existing `build-android` job uses both `gradle/actions/setup-gradle@v5` (with built-in Gradle cache) and an explicit `actions/cache@v4` for `~/.android/build-cache`. The new `build-rn-0-86-android` job has neither, so it will re-download and recompile Gradle wrapper and all Android dependencies from scratch on every run, significantly increasing CI time.

How can I resolve this? If you propose a fix, please make it concise.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Fix in Claude Code Fix in Cursor Fix in Codex


build-rn-0-86-ios:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup
uses: ./.github/actions/setup

- name: Build local v6 packages
run: yarn all:prepare

- name: Install RN 0.86 test project dependencies
working-directory: test-projects/rn-purchasely-test
run: npm ci --ignore-scripts

- name: Install CocoaPods dependencies
working-directory: test-projects/rn-purchasely-test/ios
run: pod install --repo-update

- name: Build RN 0.86 test project for iOS
working-directory: test-projects/rn-purchasely-test/ios
run: |
xcodebuild \
-workspace RNPurchaselyTest.xcworkspace \
-scheme RNPurchaselyTest \
-configuration Debug \
-destination 'generic/platform=iOS' \
-derivedDataPath DerivedData \
CODE_SIGNING_ALLOWED=NO \
build

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# OSX
#
.DS_Store
.worktrees/

# XDE
.expo/
Expand Down
33 changes: 33 additions & 0 deletions docs/superpowers/plans/2026-07-14-react-native-0-86.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# React Native 0.86 Validation Implementation Plan

> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.

**Goal:** Make React Native 0.86 a supported, New-Architecture-validated v6 sample.

**Architecture:** The existing RN 0.86 test project is aligned with the local workspaces and RN 0.86 tooling, enables New Architecture, and exposes fullscreen and embedded screens. Android and iOS CI builds verify bridge/ViewManager interoperability; runtime-only cases have a manual checklist.

**Tech Stack:** React Native 0.86, TypeScript, Gradle, CocoaPods, Xcode, GitHub Actions.

**Enhanced:** 2026-07-14
**Reviewed:** 2026-07-14
**Completed:** 2026-07-14

---

### Task 1: Restore the RN 0.86 compatibility sample

**Files:**
- Modify: `test-projects/rn-purchasely-test/package.json`, lockfile, Android and iOS project configs, `App.*`

- [x] Replace published v5 dependencies with local v6 workspace packages, align RN toolchain dependencies to 0.86, and enable New Architecture.
- [x] Add explicit fullscreen and embedded `PLYPresentationView` routes plus test notes for modal, keyboard, safe-area, edge-to-edge, and rotation.
- [x] Run `npm ci`, Android debug assembly, and unsigned iOS Debug build; commit with `feat(example): validate React Native 0.86`.

### Task 2: Run the sample in CI

**Files:**
- Modify: `.github/workflows/ci.yml`

- [x] Add Android and iOS build jobs for `test-projects/rn-purchasely-test` after local package preparation.
- [x] Retain existing RN 0.79 example coverage until the migration branch changes its primary sample.
- [x] Validate YAML and commit with `ci: validate React Native 0.86`.
7 changes: 7 additions & 0 deletions docs/superpowers/specs/2026-07-14-react-native-0-86-design.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# React Native 0.86 Validation Design

**Scope:** React Native SDK only; branch targets `feat/sdk-v6-migration`.

The existing React Native 0.86 test project will become the compatibility sample. It will consume local v6 packages, align its tooling with RN 0.86, enable the New Architecture, and build on Android and iOS in CI. The sample will explicitly expose fullscreen and embedded `PLYPresentationView` validation paths.

Because the SDK uses the classic bridge and view manager, no TurboModule migration is implied. Modal, keyboard, safe-area, edge-to-edge, and rotation validation will be automated when deterministic and otherwise captured in a concise manual test checklist. No public API change is planned.
19 changes: 10 additions & 9 deletions test-projects/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,18 @@ This directory contains two test projects demonstrating the Purchasely React Nat

A test project using **Expo** (managed workflow with development build).

- **Location:** `./expo-purchasely-test/`
- **Prerequisites:** Node.js 18+, Expo CLI
- **Documentation:** See [expo-purchasely-test/README.md](./expo-purchasely-test/README.md)
- **Location:** `./expo-purchasely-test/`
- **Prerequisites:** Node.js 18+, Expo CLI
- **Documentation:** See [expo-purchasely-test/README.md](./expo-purchasely-test/README.md)

### 2. rn-purchasely-test

A test project using **React Native CLI** (bare workflow).

- **Location:** `./rn-purchasely-test/`
- **Prerequisites:** Node.js 18+, Xcode 15+ (iOS), Android Studio (Android)
- **Documentation:** See [rn-purchasely-test/README.md](./rn-purchasely-test/README.md)
- **Location:** `./rn-purchasely-test/`
- **Prerequisites:** Node.js 22.11+, Xcode 15+ (iOS), Android Studio (Android)
- **Compatibility target:** React Native 0.86 with the New Architecture and local v6 Purchasely packages
- **Documentation:** See [rn-purchasely-test/README.md](./rn-purchasely-test/README.md)

## Quick Start

Expand Down Expand Up @@ -74,6 +75,6 @@ Replace this with your own API key from the Purchasely console.

## Documentation

- [Purchasely Documentation](https://docs.purchasely.com/docs/installation-react-native)
- [Expo Documentation](https://docs.expo.dev/)
- [React Native Documentation](https://reactnative.dev/)
- [Purchasely Documentation](https://docs.purchasely.com/docs/installation-react-native)
- [Expo Documentation](https://docs.expo.dev/)
- [React Native Documentation](https://reactnative.dev/)
4 changes: 4 additions & 0 deletions test-projects/rn-purchasely-test/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
root: true,
extends: ['@react-native'],
}
Loading
Loading