Skip to content

Commit c7c1bc2

Browse files
committed
cleanup before release
1 parent 5194305 commit c7c1bc2

49 files changed

Lines changed: 3961 additions & 262 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/actions/setup-android-ci/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,5 @@ runs:
3333
working-directory: ${{ inputs.working-directory }}
3434
run: |
3535
# Select specific device to minimize SDK download and generate lock file
36-
# This updates devices.lock.json with only the selected device(s)
36+
# This updates devices.lock with only the selected device(s)
3737
bash ../../plugins/android/scripts/devices.sh select ${{ inputs.device }}

.github/workflows/pr-checks.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ jobs:
3333
with:
3434
name: fast-test-reports
3535
path: |
36-
test-results/
3736
reports/
3837
retention-days: 7
3938

.github/workflows/publish-mcp.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ jobs:
4747
with:
4848
name: test-reports
4949
path: |
50-
test-results/
5150
reports/
5251
retention-days: 7
5352

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ scripts/
509509
510510
**Critical**: Domain layer scripts cannot call each other. If two domain scripts need the same functionality, that functionality must be moved to the platform or lib layer. The user layer orchestrates multiple domain operations.
511511
512-
See `plugins/android/scripts/LAYERS.md` for complete documentation.
512+
See `wiki/project/ARCHITECTURE.md` for complete documentation.
513513
514514
### Device Management Workflow
515515

README.md

Lines changed: 134 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,138 @@
1-
# Segment Templates (mobile)
1+
# Devbox Plugins for Mobile Development
22

3-
Shared Devbox plugins and example projects for Android, iOS, and React Native.
3+
Reproducible, project-local development environments for Android, iOS, and React Native using [Devbox](https://www.jetify.com/devbox).
44

5-
## Devbox plugins
6-
- `devbox/plugins/android` — Android SDK + emulator management in a project-local virtenv.
7-
- `devbox/plugins/ios` — iOS toolchain + simulator management for macOS.
8-
- `devbox/plugins/react-native` — Composition of Android + iOS plugins.
5+
## Quick Start
6+
7+
```bash
8+
# Add Android plugin to your project
9+
echo '{
10+
"include": ["github:segment-integrations/devbox-plugins?dir=plugins/android"]
11+
}' > devbox.json
12+
13+
# Enter development environment
14+
devbox shell
15+
16+
# Start emulator and run app
17+
devbox run start-emu
18+
devbox run start-app
19+
```
20+
21+
**New to devbox-plugins?** Check out the [Quick Start Guide](wiki/guides/quick-start.md) for detailed setup instructions.
22+
23+
## Features
24+
25+
- **Project-Local State** - All emulators, simulators, and caches stay in your project directory
26+
- **Reproducible Environments** - Lock files ensure consistent SDK versions across machines
27+
- **No Global Pollution** - Won't touch `~/.android`, `~/Library/Developer`, or other global state
28+
- **Parallel Execution** - Run multiple test suites simultaneously with `--pure` isolation
29+
- **Device-Driven Configuration** - Define devices as JSON, sync AVDs/simulators declaratively
30+
- **CI/CD Optimized** - Device filtering and platform skipping for fast CI builds
31+
32+
## Plugins
33+
34+
### Android Plugin
35+
36+
Nix-managed Android SDK with AVD management.
37+
38+
```json
39+
{
40+
"include": ["github:segment-integrations/devbox-plugins?dir=plugins/android"]
41+
}
42+
```
43+
44+
**Guides:** [Android Guide](wiki/guides/android-guide.md) | [Cheatsheet](wiki/guides/cheatsheets/android.md)
45+
**Reference:** [Android API](wiki/reference/android.md)
46+
47+
### iOS Plugin
48+
49+
Xcode toolchain integration with iOS Simulator management (macOS only).
50+
51+
```json
52+
{
53+
"include": ["github:segment-integrations/devbox-plugins?dir=plugins/ios"]
54+
}
55+
```
56+
57+
**Guides:** [iOS Guide](wiki/guides/ios-guide.md) | [Cheatsheet](wiki/guides/cheatsheets/ios.md)
58+
**Reference:** [iOS API](wiki/reference/ios.md)
59+
60+
### React Native Plugin
61+
62+
Composition layer over Android and iOS with Metro bundler management.
63+
64+
```json
65+
{
66+
"include": ["github:segment-integrations/devbox-plugins?dir=plugins/react-native"]
67+
}
68+
```
69+
70+
**Guides:** [React Native Guide](wiki/guides/react-native-guide.md) | [Cheatsheet](wiki/guides/cheatsheets/react-native.md)
71+
**Reference:** [React Native API](wiki/reference/react-native.md)
72+
73+
## Documentation
74+
75+
### For Users
76+
77+
- **[Quick Start](wiki/guides/quick-start.md)** - Get started in 5 minutes
78+
- **[Device Management](wiki/guides/device-management.md)** - Managing emulators and simulators
79+
- **[Testing Guide](wiki/guides/testing.md)** - Testing strategies and best practices
80+
- **[Troubleshooting](wiki/guides/troubleshooting.md)** - Common issues and solutions
81+
- **[Cheatsheets](wiki/guides/cheatsheets/)** - One-page quick references
82+
83+
### For Contributors
84+
85+
- **[Contributing Guide](wiki/project/CONTRIBUTING.md)** - How to contribute
86+
- **[Architecture](wiki/project/ARCHITECTURE.md)** - Project structure and design
87+
- **[Testing](wiki/project/TESTING.md)** - Testing infrastructure
88+
- **[CI/CD](wiki/project/CI-CD.md)** - Continuous integration
89+
90+
**Full documentation:** [Wiki Home](wiki/README.md)
991

1092
## Examples
11-
- `devbox/examples/android` — Minimal Android app wired to the Android plugin.
12-
- `devbox/examples/ios` — Swift package initialized via the iOS plugin.
13-
- `devbox/examples/react-native` — React Native app wired to Android + iOS plugins.
14-
15-
## Android plugin highlights
16-
- Device definitions live in `devbox.d/android/devices/*.json`.
17-
- Use `devbox run --pure android.sh devices list|create|update|delete` to manage devices.
18-
- Set `EVALUATE_DEVICES` environment variable in `plugin.json` to limit which device APIs are evaluated by the flake (empty means all).
19-
- `devbox run --pure start-emu [device]` boots an emulator.
20-
- `devbox run --pure start-app [device]` builds/installs/launches on the resolved emulator.
21-
See `devbox/plugins/android/REFERENCE.md` for the full Android reference.
22-
23-
## iOS plugin highlights
24-
- Simulator definitions live in `devbox.d/ios/devices/*.json`.
25-
- `devbox run --pure start-sim [device]` boots a simulator.
26-
- `devbox run --pure stop-sim` stops it.
27-
See `devbox/plugins/ios/REFERENCE.md` for the full iOS reference.
28-
29-
## React Native plugin highlights
30-
- Composes the Android + iOS plugins.
31-
- Android: `devbox run --pure start-emu`, `devbox run --pure start-app`, `devbox run --pure stop-emu`.
32-
- iOS: `devbox run --pure start-sim`, `devbox run --pure stop-sim`.
33-
See `devbox/plugins/react-native/REFERENCE.md` for the full React Native reference.
34-
35-
## CI/CD
36-
37-
Comprehensive GitHub Actions workflows are configured for testing:
38-
39-
### Fast PR Checks (`pr-checks.yml`)
40-
Runs automatically on every PR with quick validation:
41-
- Plugin validation and unit tests
42-
- Quick smoke tests on default devices
43-
- ~15-30 minutes total
44-
45-
### Full E2E Tests (`e2e-full.yml`)
46-
Manually triggered or scheduled weekly to test:
47-
- **Android**: API 21 (min) to API 36 (max)
48-
- **iOS**: iOS 15.4 (min) to iOS 26.2 (max)
49-
- **React Native**: Full cross-platform testing
50-
- Matrix execution for parallel testing
51-
- ~45-60 minutes per platform
52-
53-
See [.github/workflows/README.md](.github/workflows/README.md) for detailed documentation.
93+
94+
The repository includes example projects demonstrating plugin usage:
95+
96+
- **[examples/android](examples/android/)** - Minimal Android app
97+
- **[examples/ios](examples/ios/)** - Swift package example
98+
- **[examples/react-native](examples/react-native/)** - React Native app with Android, iOS, and Web
99+
100+
Each example includes device definitions, test suites, and build scripts.
101+
102+
## Common Commands
103+
104+
```bash
105+
# Android
106+
devbox run start-emu # Start Android emulator
107+
devbox run start-app # Build and launch app
108+
devbox run stop-emu # Stop emulator
109+
110+
# iOS
111+
devbox run start-sim # Start iOS simulator
112+
devbox run start-ios # Build and launch app
113+
devbox run stop-sim # Stop simulator
114+
115+
# Device management
116+
devbox run android.sh devices list
117+
devbox run ios.sh devices list
118+
119+
# Testing
120+
devbox run test:fast # Quick tests (~2-5 min)
121+
devbox run test:e2e # Full E2E tests (~15-30 min)
122+
```
123+
124+
## Requirements
125+
126+
- **[Devbox](https://www.jetify.com/devbox)** - Install with `curl -fsSL https://get.jetify.com/devbox | bash`
127+
- **macOS** - Required for iOS plugin (Xcode required)
128+
- **Linux** - Supported for Android and React Native (Android only)
129+
130+
## License
131+
132+
MIT
133+
134+
## Support
135+
136+
- **Questions?** Check [Troubleshooting](wiki/guides/troubleshooting.md)
137+
- **Found a bug?** [Open an issue](https://github.com/segment-integrations/devbox-plugins/issues)
138+
- **Want to contribute?** Read the [Contributing Guide](wiki/project/CONTRIBUTING.md)

devbox.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,17 @@
137137
"echo 'Running devbox-mcp plugin tests (interactive mode)...'",
138138
"TEST_TUI=true process-compose -f plugins/devbox-mcp/tests/test-suite.yaml"
139139
],
140+
"test:plugin:rn:lib": [
141+
"bash plugins/tests/react-native/test-lib.sh"
142+
],
143+
"test:plugin:rn": [
144+
"devbox run test:plugin:rn:lib"
145+
],
140146
"test:plugin:unit": [
141147
"echo 'Running plugin unit tests...'",
142148
"devbox run test:plugin:android",
143149
"devbox run test:plugin:ios",
150+
"devbox run test:plugin:rn",
144151
"devbox run test:plugin:devbox-mcp"
145152
],
146153
"test:integration:android:device-mgmt": [

examples/android/devbox.d/android/devices/devices.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@
1313
"tag": "google_apis"
1414
}
1515
],
16-
"checksum": "2f3ab0e3cefd3e9909185c0717dc9d63038da1e81625eb6fce585e3af446bfef",
17-
"generated_at": "2026-02-12T06:21:41Z"
16+
"checksum": "8df4d3393b61fbbb08e45cf8762f95c521316938e514527916e4fce88a849d57",
17+
"generated_at": "2026-02-18T16:48:27Z"
1818
}

examples/ios/devbox.d/ios/devices/devices.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
"runtime": "15.4"
1010
}
1111
],
12-
"checksum": "dd575d31a5adf2f471655389df301215f6ef7130ca284d433929b08b68e42890",
13-
"generated_at": "2026-02-12T06:21:46Z"
12+
"checksum": "4d5276f203d7ad62860bfc067f76194df53be449d4aa8a3b2d069855ec1f3232",
13+
"generated_at": "2026-02-18T16:49:54Z"
1414
}

examples/react-native/devbox.d/android/devices/devices.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@
1313
"tag": "google_apis"
1414
}
1515
],
16-
"checksum": "2f3ab0e3cefd3e9909185c0717dc9d63038da1e81625eb6fce585e3af446bfef",
17-
"generated_at": "2026-02-12T06:54:22Z"
16+
"checksum": "8df4d3393b61fbbb08e45cf8762f95c521316938e514527916e4fce88a849d57",
17+
"generated_at": "2026-02-18T16:50:49Z"
1818
}

examples/react-native/devbox.d/ios/devices/devices.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
"runtime": "15.4"
1010
}
1111
],
12-
"checksum": "dd575d31a5adf2f471655389df301215f6ef7130ca284d433929b08b68e42890",
13-
"generated_at": "2026-02-12T06:55:59Z"
12+
"checksum": "4d5276f203d7ad62860bfc067f76194df53be449d4aa8a3b2d069855ec1f3232",
13+
"generated_at": "2026-02-18T16:50:50Z"
1414
}

0 commit comments

Comments
 (0)