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
12 changes: 12 additions & 0 deletions devbox.d/segment-integrations.devbox-plugins.android/android.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"ANDROID_BUILD_TOOLS_VERSION": "36.1.0",
"ANDROID_CMDLINE_TOOLS_VERSION": "19.0",
"ANDROID_MIN_SDK": 24,
"ANDROID_COMPILE_SDK": 36,
"ANDROID_TARGET_SDK": 36,
"ANDROID_SYSTEM_IMAGE_TAG": "google_apis",
"ANDROID_INCLUDE_NDK": false,
"ANDROID_NDK_VERSION": "27.0.12077973",
"ANDROID_INCLUDE_CMAKE": false,
"ANDROID_CMAKE_VERSION": "3.22.1"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"devices": [
{
"name": "medium_phone_api36",
"api": "36.1",
"device": "medium_phone",
"tag": "google_apis_playstore",
"filename": "max"
},
{
"name": "pixel_api21",
"api": 21,
"device": "pixel",
"tag": "google_apis",
"filename": "min"
}
],
"checksum": "d489119af00ea8562a5bbb190b7fced74981b36a4ffbb8bf70b2e5ed20536d2a"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "medium_phone_api36",
"api": "36.1",
"device": "medium_phone",
"tag": "google_apis_playstore"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "pixel_api21",
"api": 21,
"device": "pixel",
"tag": "google_apis"
}
48 changes: 45 additions & 3 deletions devbox.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
{
"$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.14.2/.schema/devbox.schema.json",
"include": [
"github:segment-integrations/devbox-plugins?dir=plugins/android",
"github:segment-integrations/devbox-plugins?dir=plugins/ios"
],
"packages": {
"flutter": "3.29.2-sdk-links"
"flutter": "3.41.9-sdk-links",
"jdk17": "latest",
"gradle": "latest"
},
"env": {
"IOS_APP_ARTIFACT": "example/build/DerivedData/Build/Products/Debug-iphonesimulator/Runner.app",
"ANDROID_APP_ID": "com.segment.analytics_example",
"ANDROID_APP_APK": "example/android/app/build/outputs/apk/debug/app-debug.apk",
"ANDROID_LOCAL_SDK": "1"
},
"shell": {
"init_hook": [
"export PROJECT_ROOT=\"$(git rev-parse --show-toplevel 2>/dev/null || echo $DEVBOX_PROJECT_ROOT)\""
"export PROJECT_ROOT=\"$(git rev-parse --show-toplevel 2>/dev/null || echo $DEVBOX_PROJECT_ROOT)\"",
"export ANDROID_SDK_ROOT=\"${ANDROID_SDK_ROOT:-$HOME/Library/Android/sdk}\"",
"export PATH=\"$ANDROID_SDK_ROOT/cmdline-tools/latest/bin:$ANDROID_SDK_ROOT/emulator:$ANDROID_SDK_ROOT/platform-tools:$PATH\""
],
"scripts": {
"get": ["cd \"$PROJECT_ROOT/packages/core\" && flutter pub get"],
Expand All @@ -17,7 +31,35 @@
"devbox run test"
],
"codegen": ["cd \"$PROJECT_ROOT/packages/core\" && bash build_json_models.sh"],
"pigeon": ["cd \"$PROJECT_ROOT/packages/core\" && bash build_pigeon_plugins.sh"]
"pigeon": ["cd \"$PROJECT_ROOT/packages/core\" && bash build_pigeon_plugins.sh"],
"build:ios": [
"cd \"$PROJECT_ROOT/example\" && flutter pub get",
"cd \"$PROJECT_ROOT/example/ios\" && pod install",
"chmod -R u+w \"$PROJECT_ROOT/example/build/DerivedData\" 2>/dev/null || true",
"xcodebuild -workspace \"$PROJECT_ROOT/example/ios/Runner.xcworkspace\" -scheme Runner -configuration Debug -destination 'generic/platform=iOS Simulator' -derivedDataPath \"$PROJECT_ROOT/example/build/DerivedData\" build CODE_SIGNING_ALLOWED=NO STRIP_INSTALLED_PRODUCT=NO DEPLOYMENT_POSTPROCESSING=NO"
],
"build:android": [
"cd \"$PROJECT_ROOT/example\" && flutter pub get",
"cd \"$PROJECT_ROOT/example\" && flutter build apk --debug"
],
"start:emu": [
"android.sh emulator start \"${1:-}\""
],
"stop:emu": [
"android.sh emulator stop"
],
"start:android": [
"android.sh run ${1:-${ANDROID_DEFAULT_DEVICE:-max}}"
],
"start:sim": [
"ios.sh simulator start \"${1:-}\""
],
"stop:sim": [
"ios.sh simulator stop"
],
"start:app": [
"ios.sh run \"${1:-}\""
]
}
}
}
Loading