Skip to content
Open
Show file tree
Hide file tree
Changes from 63 commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
1b0c98d
EMT-1963 Add BranchConfigurationController to manage SDK configuratio…
wpinho-branch Jun 6, 2025
a464915
Add coroutines-based request queue implementation and adapter for bac…
wpinho-branch Jun 12, 2025
aef77d0
Complete Phase 2 integration of coroutines-based queue system
wpinho-branch Jun 12, 2025
73b2828
Implement complete compatibility for BranchRequestQueue with ServerRe…
wpinho-branch Jun 12, 2025
e4cae64
Refactor BranchRequestQueue for improved performance and compatibility
wpinho-branch Jun 12, 2025
489617e
Add BranchMigrationTest for comprehensive queue testing
wpinho-branch Jun 12, 2025
eae4847
Enhance BranchMigrationTest and refactor BranchRequestQueue components
wpinho-branch Jun 12, 2025
7b39aa2
Refactor BranchMigrationTest to enhance request handling and prioriti…
wpinho-branch Jun 12, 2025
addecbe
Update BranchMigrationTest to improve request action handling
wpinho-branch Jun 12, 2025
bf63af2
GPTDriver Integration (#1275)
gdeluna-branch Jun 16, 2025
6e9441c
Release 5.18.2 (#1279)
gdeluna-branch Jun 17, 2025
3caf036
INTENG-22685 - Integration validator protected endpoint bugfix (#1269)
rob-gioia-branch Jun 17, 2025
e8d6933
Implement StateFlow-based session state management in Branch SDK
wpinho-branch Jun 17, 2025
3214341
Add StateFlow-based session state management documentation
wpinho-branch Jun 17, 2025
c0dc682
Refactor session state management in Branch SDK to utilize StateFlow
wpinho-branch Jun 17, 2025
37c237f
WIP: Add unit tests for session state management in Branch SDK
wpinho-branch Jun 20, 2025
3a5a50b
Add manual unlock method (#1281)
gdeluna-branch Jun 23, 2025
3d096cf
Release 5.19.0 (#1282)
gdeluna-branch Jun 24, 2025
b68bf86
Add modernization components for Branch SDK API preservation
wpinho-branch Jun 27, 2025
9fe12ef
Remove ApiFilterConfig.kt file
wpinho-branch Jun 30, 2025
74ef3b8
Add migration guide and implementation summary for Branch SDK moderni…
wpinho-branch Jun 30, 2025
05a89a3
Add version configuration and timeline documentation for Branch SDK
wpinho-branch Jun 30, 2025
0b0aa97
feat: Add comprehensive Migration Master Plan documentation
wpinho-branch Jun 30, 2025
e487c1e
refactor: Reorganize documentation structure with improved categoriza…
wpinho-branch Jun 30, 2025
c521be9
build: Update build configuration for modernization components
wpinho-branch Jul 7, 2025
840fe15
refactor: Enhance ModernBranchCore with improved error handling and l…
wpinho-branch Jul 7, 2025
8eec999
feat: Enhance wrapper implementations with improved API preservation
wpinho-branch Jul 7, 2025
6e0b8c8
test: Improve session management test coverage and reliability
wpinho-branch Jul 7, 2025
8216480
test: Add comprehensive test suite for modernization framework
wpinho-branch Jul 7, 2025
5807871
refactor: Major code cleanup and modernization for Branch SDK
wpinho-branch Jul 8, 2025
4e1d2c9
feat: remove getAutoInstance() method and simplify Branch singleton p…
wpinho-branch Jul 8, 2025
02b3710
docs: update migration documentation to reflect getAutoInstance removal
wpinho-branch Jul 8, 2025
902abfc
fix: update validator error messages to reference getInstance() method
wpinho-branch Jul 8, 2025
ac0bd1d
refactor: clean up modernization components and remove unused callbacks
wpinho-branch Jul 8, 2025
c64d5a0
test: update test applications and test cases for singleton pattern c…
wpinho-branch Jul 8, 2025
c85920f
refactor: clean up deprecated API registrations and unused callback a…
wpinho-branch Jul 8, 2025
d0c7c5e
test: update test suites to reflect modernization cleanup changes
wpinho-branch Jul 8, 2025
2d1f83d
refactor: remove deprecated methods and cleanup callback references
wpinho-branch Jul 8, 2025
48b1516
feat: add getInstance(Context) method to Branch class
wpinho-branch Jul 8, 2025
7658eee
fix: update CustomBranchApp to use getInstance(Context) method
wpinho-branch Jul 8, 2025
d1cabe3
refactor: remove deprecated delay initialization check in BranchWrapper
wpinho-branch Jul 8, 2025
8184777
refactor: simplify user agent processing in DeviceInfo
wpinho-branch Jul 15, 2025
f69fed6
refactor: remove processNextQueueItem method and related calls for au…
wpinho-branch Jul 15, 2025
c22fcd0
refactor: update Branch SDK initialization to use init() method
wpinho-branch Jul 24, 2025
90452c2
feat: restore interfaces and methods
wpinho-branch Jul 24, 2025
7b6d39f
eliminate comments and references to the processNextQueueItem method …
wpinho-branch Jul 24, 2025
f2342c1
refactor: remove unnecessary debug comments in BranchUniversalObject
wpinho-branch Jul 24, 2025
08ecbcf
refactor: remove indexMode from BranchUniversalObject
wpinho-branch Jul 24, 2025
790d8b3
feat: log VIEW_ITEM event in MainActivity
wpinho-branch Jul 24, 2025
49f3a49
omitted this for now to avoid questions
wpinho-branch Jul 24, 2025
42e4353
ensure getAutoInstance apply on init and restore NativeShareLinkManager
wpinho-branch Jul 24, 2025
3ae3ebb
refactor: remove unused code in Branch class
wpinho-branch Jul 24, 2025
26e0e57
refactor: simplify intent state check in Branch class
wpinho-branch Jul 24, 2025
8cd6de8
fix: restore sharing functionality in Branch SDK
wpinho-branch Jul 24, 2025
6631223
feat: enhance session management and request queue handling
wpinho-branch Jul 30, 2025
c9b227c
refactor: improve memory management and session handling in BranchReq…
wpinho-branch Jul 30, 2025
22e62fe
Merge branch 'master' into wpinho-branch/EMT-2260
wpinho-branch Jul 31, 2025
cfd250f
refactor: update Branch SDK to use init() method for instance retrieval
wpinho-branch Jul 31, 2025
6e85554
feat: introduce ModernLinkGenerator for improved link generation
wpinho-branch Aug 8, 2025
aacf9d6
refactor: clean up imports in ModernLinkGenerator
wpinho-branch Aug 8, 2025
dcdef48
refactor: streamline link data retrieval in ModernLinkGenerator
wpinho-branch Aug 8, 2025
4920cc9
refactor: update Branch SDK to use getInstance() for instance retrieval
wpinho-branch Aug 11, 2025
2b6976c
Merge branch 'wpinho-branch/EMT-2260' into wpinho-branch/EMT-2274
wpinho-branch Aug 11, 2025
9933734
feat: add legacy link generator for backward compatibility
wpinho-branch Aug 20, 2025
2d0db8a
Merge branch '6.0.0.alpha.0' into wpinho-branch/EMT-2274
wpinho-branch Aug 21, 2025
939380e
refactor: clean up unused imports in Branch class
wpinho-branch Aug 21, 2025
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
124 changes: 124 additions & 0 deletions .github/gptdriverrunscript.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
#!/usr/bin/env bash

set -eo pipefail

# Constants should ideally be set as environment variables for security
readonly API_URL="https://api.mobileboost.io"
readonly API_ORG_KEY="${API_ORG_KEY}"
readonly API_TOKEN="${API_TOKEN:-null}"
readonly TEST_TIMEOUT="${TEST_TIMEOUT:-7200}"
readonly TEST_TAGS="${TEST_TAGS:-}"

# Function to post data using curl and handle errors
post_data() {
local url=$1
local body=$2
if ! response=$(curl -s -f -X POST -H "Authorization: Bearer $API_TOKEN" -H "Content-Type: application/json" -d "$body" "$url"); then
echo "Error: Network request failed with error $response" >&2
exit 1
fi
echo "$response"
}

# Validate inputs
if [[ -z "$1" || -z "$2" ]]; then
echo "Usage: $0 <build_filename> <build_platform>"
exit 1
fi

# Validate environment variables
if [[ -z "$API_ORG_KEY" ]]; then
echo "Please set API_ORG_KEY to your organization key"
exit 1
fi

buildFilename="$1"
buildPlatform="$2"
tags=()

# Check if TEST_TAGS is provided and split into an array
if [[ -n "$TEST_TAGS" ]]; then
IFS=',' read -ra tags <<< "$TEST_TAGS"
fi

# Upload build file
echo -n "Uploading build from $buildFilename for $buildPlatform: "
if ! uploadedBuildResponse=$(curl -s -f -X POST \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: multipart/form-data" \
-F "build=@$buildFilename" \
-F "organisation_key=$API_ORG_KEY" \
-F "platform=$buildPlatform" \
-F "metadata={}" \
"$API_URL/uploadBuild/"); then
echo "Error: Failed to upload build" >&2
exit 1
fi

# Extract the buildId
if ! buildId=$(jq -r '.buildId' <<< "$uploadedBuildResponse") || [ -z "$buildId" ]; then
echo "Error: Failed to extract build ID from the response" >&2
exit 1
fi
echo "uploaded (ID: $buildId), app link: $(jq -r '.app_link' <<< "$uploadedBuildResponse")"

# Execute test suite
echo "Executing test suite..."
jsonPayload="{\"organisationId\": \"$API_ORG_KEY\", \"uploadId\": \"$buildId\""
if [ ${#tags[@]} -gt 0 ]; then
jsonTags=$(printf ',\"%s\"' "${tags[@]}")
jsonTags="[${jsonTags:1}]"
jsonPayload+=", \"tags\": $jsonTags"
fi
jsonPayload+="}"
if ! testSuiteRunId=$(post_data "$API_URL/tests/execute" "$jsonPayload" | jq -r '.test_suite_ids[0]') || [ -z "$testSuiteRunId" ]; then
echo "Error: Test suite execution failed" >&2
exit 1
fi

# Wait for test suite to finish
echo -n "Waiting for test suite to finish..."
startTime=$(date +%s)
while true; do
if ! testSuiteData=$(curl -s -f "$API_URL/testSuiteRuns/$testSuiteRunId/gh"); then
echo "Error: Failed to retrieve test suite data" >&2
exit 1
fi
testSuiteStatus=$(jq -r '.status' <<< "$testSuiteData")

if [[
"$testSuiteStatus" == "completed"
]]; then
echo "Status is $testSuiteStatus!" >&2
break
fi

if (( $(date +%s) - startTime >= TEST_TIMEOUT )); then
echo "Timeout exceeded while waiting for test suite to finish." >&2
exit 1
fi

echo -n "."
sleep 1
done
echo " done!"

# Write test suite summary to file if available
if [[ -n "$GITHUB_STEP_SUMMARY" && -w "$GITHUB_STEP_SUMMARY" ]]; then
jq -r '.markdown' <<< "$testSuiteData" >> "$GITHUB_STEP_SUMMARY"
echo "Step summary written to $GITHUB_STEP_SUMMARY"
fi

# Check test suite result
if ! testSuiteResult=$(jq -r '.result' <<< "$testSuiteData"); then
echo "Test suite did not pass, result: $testSuiteResult" >&2
exit 1
fi

if [[ "$testSuiteResult" == "succeeded" ]]; then
echo "Test passed successfully"
exit 0
else
echo "Test suite did not pass, result: $testSuiteResult" >&2
exit 1
fi
110 changes: 0 additions & 110 deletions .github/workflows/appium-automation.yml

This file was deleted.

17 changes: 0 additions & 17 deletions .github/workflows/automation-trigger-test.yml

This file was deleted.

98 changes: 98 additions & 0 deletions .github/workflows/gptdriverautomation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: GPTDriver Test Suite Automation

on:
push:
branches:
- 'Release-*' # Trigger for branches starting with "Release-"

jobs:
BuildAndTestAppOnGPTDriver: # Updated job name
runs-on: ubuntu-latest
steps:
# --- Step 1: Extract version from branch name ---
- name: Extract version from branch name
id: extract_version_step
run: |
BRANCH_NAME="${{ github.ref }}"
# Remove 'refs/heads/' prefix
BRANCH_NAME_WITHOUT_PREFIX="${BRANCH_NAME#refs/heads/}"
# Extract version after "Release-"
VERSION=$(echo "$BRANCH_NAME_WITHOUT_PREFIX" | sed -n 's/^Release-\([0-9]*\.[0-9]*\.[0-9]*\)$/\1/p')

if [ -z "$VERSION" ]; then
echo "Error: Could not extract version from branch name '$BRANCH_NAME_WITHOUT_PREFIX'. Expected format: Release-X.Y.Z"
exit 1
fi

echo "Extracted version: $VERSION"
echo "VERSION_STRING=$VERSION" >> $GITHUB_ENV

# --- Step 2: Checkout the Branch SDK repository ---
- name: Checkout BranchMetrics/android-branch-deep-linking-attribution (SDK)
uses: actions/checkout@v4
with:
repository: BranchMetrics/android-branch-deep-linking-attribution
ref: ${{ github.ref }} # Use the same branch that triggered the workflow
path: ./branch-sdk-repo # Checkout into a subdirectory

# --- Step 3: Build the Branch SDK AAR ---
- name: Set up JDK for SDK build
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17' # Ensure this matches the SDK's build requirements

- name: Build Branch SDK AAR
run: ./gradlew :Branch-SDK:assembleDebug # Use the specific module command
working-directory: ./branch-sdk-repo # Run Gradle from the SDK's checkout directory

# --- Step 4: Checkout the BranchLinkSimulatorAndroid repository ---
- name: Checkout BranchMetrics/BranchLinkSimulatorAndroid (App)
uses: actions/checkout@v4
with:
repository: BranchMetrics/BranchLinkSimulatorAndroid
ref: gptdriver/linkingTests # Checkout the specific app branch
path: ./app-repo # Checkout into another subdirectory

# --- Step 5: Copy the generated AAR to the App's libs directory ---
- name: Copy generated AAR to App's libs directory
run: |
mkdir -p ./app-repo/app/libs # Create libs directory if it doesn't exist
cp ./branch-sdk-repo/Branch-SDK/build/outputs/aar/Branch-SDK-debug.aar ./app-repo/app/libs/branch-sdk-debug.aar
# Adjust the AAR name (Branch-SDK-debug.aar) if the actual output name is different
# The path within the SDK repo might vary based on its build structure
working-directory: ${{ github.workspace }} # Run from the root of the GITHUB_WORKSPACE

# --- Step 6: Build the BranchLinkSimulatorAndroid App using the local AAR ---
- name: Set up JDK for App build
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17' # Ensure this matches the App's build requirements

- name: Build App with local AAR and pass version
run: ./gradlew build -PversionNameFromCi=${{ env.VERSION_STRING }}
working-directory: ./app-repo # Run Gradle from the App's checkout directory

# --- Step 7: Echo the location of the generated APK file ---
- name: Echo APK location
run: |
APK_PATH="./app-repo/app/build/outputs/apk/debug/app-debug.apk"
echo "Generated APK location: $APK_PATH"

# --- Step 8: Upload Build Artifacts ---
- name: Upload Build Artifacts
uses: actions/upload-artifact@v4
with:
name: BranchLinkSimulator-App-Debug-Build
path: ./app-repo/app/build/outputs/apk/debug/app-debug.apk

# --- Step 9: Upload and run tests on GPTDriver service. ---
- name: Run GPTDriver tests
run: |
chmod +x ./branch-sdk-repo/.github/gptdriverrunscript.sh
bash ./branch-sdk-repo/.github/gptdriverrunscript.sh ./app-repo/app/build/outputs/apk/debug/app-debug.apk android
env:
API_ORG_KEY: ${{ secrets.MOBILEBOOST_API_ORG_KEY }}
API_KEY: ${{ secrets.MOBILEBOOST_API_ORG_KEY }}
TEST_TAGS: Release
Loading