Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
8d42e40
feat: Implement Trunk tool
Mansi-mParticle Sep 12, 2025
609a661
fix linting issue and adress review comment
Mansi-mParticle Sep 15, 2025
baa8ba2
fix linting issue
Mansi-mParticle Sep 15, 2025
03a0ccf
resolve Trunk tool issue with ktlint check
Mansi-mParticle Sep 16, 2025
8be7838
quote adb output in emulator startup script to resolve Semgrep error
Mansi-mParticle Sep 17, 2025
921d1c8
fix Semgrep error
Mansi-mParticle Sep 17, 2025
86fbf32
fix Semgrep error for ci check
Mansi-mParticle Sep 17, 2025
c732e91
quote bootanim variable in until loop to avoid unquoted expansion
Mansi-mParticle Sep 17, 2025
e37b98d
quote variable to avoid unquoted expansion
Mansi-mParticle Sep 17, 2025
2e71d18
ignore emulator script in lint checks
Mansi-mParticle Sep 17, 2025
7b20da6
add .editorconfig for consistent code style
Mansi-mParticle Sep 26, 2025
cef0403
fix the test yml file test case error
Mansi-mParticle Sep 29, 2025
2cac022
fix the syntax issue
Mansi-mParticle Sep 29, 2025
4798823
fix the error for v4
Mansi-mParticle Sep 29, 2025
dbc1ddb
fix syntax issue
Mansi-mParticle Sep 29, 2025
31ba262
correct GitHub Actions script to remove unterminated quotes
Mansi-mParticle Sep 29, 2025
abe23e3
Fixed indentation of for loop in script: block
Mansi-mParticle Sep 29, 2025
dda108b
fix: correct shell loop in instrumented orchestrator tests
Mansi-mParticle Sep 29, 2025
11ea2f3
Prevents shell errors when packages are missing
Mansi-mParticle Sep 29, 2025
5a596a4
fix the test case and syntax of instrument test cases
Mansi-mParticle Sep 29, 2025
fe9924d
Remove unnecessary bash pipefail line from script
Mansi-mParticle Sep 29, 2025
e1dda29
fix lint issue and sonarqube issue
Mansi-mParticle Sep 29, 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
36 changes: 36 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Top-most EditorConfig file
root = true

[*]
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true
# don't set end_of_line; let correct git setting checkout the appropriate one for OS
charset = utf-8

[*.{json,yml,yaml,html,tf}]
indent_size = 2
ij_json_array_wrapping = normal

[*.{kt,kts}]
ktlint_code_style = intellij_idea
max_line_length = 150
ij_kotlin_allow_trailing_comma = true
ij_kotlin_allow_trailing_comma_on_call_site = true

[tooling/**/*.kt]
max_line_length = 200

# IntelliJ/Android Studio specific (ktlint respects these too)
ij_kotlin_continuation_indent_size = 4
ij_kotlin_align_multiline_parameters = false
ij_kotlin_align_multiline_parameters_in_calls = false
ij_kotlin_call_parameters_new_line_after_left_paren = true
ij_kotlin_call_parameters_right_paren_on_new_line = true

[**/test/**/*.kt]
max_line_length = off

[**/androidTest/**/*.kt]
max_line_length = off
24 changes: 12 additions & 12 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
version: 2
updates:
- package-ecosystem: gradle
directory: "/"
schedule:
interval: daily
target-branch: "chore/dependabot"
labels: ["dependabot"]
open-pull-requests-limit: 10
ignore:
- dependency-name: "com.mparticle:android-core"
- dependency-name: "com.google.firebase:firebase-messaging"
commit-message:
prefix: "chore"
- package-ecosystem: gradle
directory: "/"
schedule:
interval: daily
target-branch: "chore/dependabot"
labels: ["dependabot"]
open-pull-requests-limit: 10
ignore:
- dependency-name: "com.mparticle:android-core"
- dependency-name: "com.google.firebase:firebase-messaging"
commit-message:
prefix: "chore"
19 changes: 11 additions & 8 deletions .github/workflows/cross-platform-tests.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,31 @@
name: "Cross Platform Tests"
on:
pull_request
on: pull_request

permissions:
contents: read
pull-requests: read
jobs:
cross-platform-tests:
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- name: "Checkout Cross Platform Tests Repo"
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: mParticle/crossplatform-sdk-tests

- name: "Checkout Android SDK Branch"
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: ${{github.event.pull_request.head.repo.full_name}}
ref: ${{github.head_ref}}
path: .sdks/android

- name: Gradle cache
uses: gradle/gradle-build-action@842c587ad8aa4c68eeba24c396e15af4c2e9f30a #v2.9.0

- name: AVD cache
uses: actions/cache@v3
uses: actions/cache@v4
id: avd-cache
with:
path: |
Expand All @@ -45,7 +48,7 @@ jobs:
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: "Install JDK 17"
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: "17"
Expand Down
155 changes: 80 additions & 75 deletions .github/workflows/daily.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: "Daily Cron"

# checkov:skip=CKV_GHA_7: This workflow requires dryRun parameter for release control
on:
# Allow workflow to be manually run from the GitHub UI
workflow_dispatch:
Expand All @@ -18,8 +19,12 @@ on:
default: "development"
type: string

jobs:
permissions:
contents: read
pull-requests: read
checks: write

jobs:
confirm-public-repo:
name: "Confirm android daily cron is run from public origin repo"
runs-on: ubuntu-latest
Expand All @@ -40,7 +45,7 @@ jobs:
GIT_COMMITTER_EMAIL: [email protected]
steps:
- name: "Clone branch"
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: mparticle/mparticle-android-sdk
ref: ${{ inputs.branch_name }}
Expand All @@ -64,67 +69,67 @@ jobs:
- name: "Push kit updates to release branch"
run: git push origin regression/${{ github.run_number }}

# instrumented-tests:
# name: "Instrumented Tests"
# timeout-minutes: 30
# runs-on: ubuntu-latest
# needs: create-regression-branch
# steps:
# - name: "Checkout future release branch"
# uses: actions/checkout@v3
# with:
# repository: mparticle/mparticle-android-sdk
# ref: regression/${{ github.run_number }}
# - name: "Install JDK 17"
# uses: actions/setup-java@v3
# with:
# distribution: "zulu"
# java-version: "17"
# cache: "gradle"
# - name: "Run Instrumented Tests"
# uses: reactivecircus/android-emulator-runner@62dbb605bba737720e10b196cb4220d374026a6d #v2.33.0
# with:
# api-level: 28
# #script: ./gradlew :android-core:cAT :android-kit-base:cAT --stacktrace
# script: |
# #Disable benchmark tests as they do not work on emulators
# adb uninstall com.mparticle.kits.test; ./gradlew connectedCheck --stacktrace
# ./gradlew :android-core:cAT :android-kit-base:cAT -Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=none
# - name: "Archive Instrumented Test Results"
# uses: actions/upload-artifact@v4
# if: always()
# with:
# name: instrumented-test-results
# path: android-core/build/reports/androidTests/connected/**
#
# instrumented-orchestrator-tests:
# name: "Instrumented Orchestrator Tests"
# timeout-minutes: 30
# runs-on: ubuntu-latest
# needs: create-regression-branch
# steps:
# - name: "Checkout Branch"
# uses: actions/checkout@v3
# with:
# repository: mparticle/mparticle-android-sdk
# ref: regression/${{ github.run_number }}
# - name: "Install JDK 17"
# uses: actions/setup-java@v3
# with:
# distribution: "zulu"
# java-version: "17"
# cache: "gradle"
# - name: "Run Instrumented Orchestrator Tests"
# uses: reactivecircus/android-emulator-runner@62dbb605bba737720e10b196cb4220d374026a6d #v2.33.0
# with:
# api-level: 28
# script: ./gradlew -Porchestrator=true :android-core:cAT --stacktrace
# - name: "Archive Instrumented Orchestrator Tests Results"
# uses: actions/upload-artifact@v4
# if: always()
# with:
# name: "instrumented-orchestrator-tests-results"
# path: android-core/build/orchestrator/**
# instrumented-tests:
# name: "Instrumented Tests"
# timeout-minutes: 30
# runs-on: ubuntu-latest
# needs: create-regression-branch
# steps:
# - name: "Checkout future release branch"
# uses: actions/checkout@v4
# with:
# repository: mparticle/mparticle-android-sdk
# ref: regression/${{ github.run_number }}
# - name: "Install JDK 17"
# uses: actions/setup-java@v4
# with:
# distribution: "zulu"
# java-version: "17"
# cache: "gradle"
# - name: "Run Instrumented Tests"
# uses: reactivecircus/android-emulator-runner@62dbb605bba737720e10b196cb4220d374026a6d #v2.33.0
# with:
# api-level: 28
# #script: ./gradlew :android-core:cAT :android-kit-base:cAT --stacktrace
# script: |
# #Disable benchmark tests as they do not work on emulators
# adb uninstall com.mparticle.kits.test; ./gradlew connectedCheck --stacktrace
# ./gradlew :android-core:cAT :android-kit-base:cAT -Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=none
# - name: "Archive Instrumented Test Results"
# uses: actions/upload-artifact@v4
# if: always()
# with:
# name: instrumented-test-results
# path: android-core/build/reports/androidTests/connected/**
#
# instrumented-orchestrator-tests:
# name: "Instrumented Orchestrator Tests"
# timeout-minutes: 30
# runs-on: ubuntu-latest
# needs: create-regression-branch
# steps:
# - name: "Checkout Branch"
# uses: actions/checkout@v4
# with:
# repository: mparticle/mparticle-android-sdk
# ref: regression/${{ github.run_number }}
# - name: "Install JDK 17"
# uses: actions/setup-java@v4
# with:
# distribution: "zulu"
# java-version: "17"
# cache: "gradle"
# - name: "Run Instrumented Orchestrator Tests"
# uses: reactivecircus/android-emulator-runner@62dbb605bba737720e10b196cb4220d374026a6d #v2.33.0
# with:
# api-level: 28
# script: ./gradlew -Porchestrator=true :android-core:cAT --stacktrace
# - name: "Archive Instrumented Orchestrator Tests Results"
# uses: actions/upload-artifact@v4
# if: always()
# with:
# name: "instrumented-orchestrator-tests-results"
# path: android-core/build/orchestrator/**

unit-tests:
name: "Unit Tests"
Expand All @@ -133,12 +138,12 @@ jobs:
needs: create-regression-branch
steps:
- name: "Checkout future release branch"
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: mparticle/mparticle-android-sdk
ref: regression/${{ github.run_number }}
- name: "Install JDK 17"
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: "17"
Expand All @@ -162,12 +167,12 @@ jobs:
needs: create-regression-branch
steps:
- name: "Checkout Branch"
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: regression/${{ github.run_number }}
submodules: recursive
- name: "Install JDK 17"
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: "17"
Expand Down Expand Up @@ -198,12 +203,12 @@ jobs:
needs: create-regression-branch
steps:
- name: "Checkout Branch"
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: regression/${{ github.run_number }}
submodules: recursive
- name: "Install JDK 17"
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: "17"
Expand Down Expand Up @@ -238,13 +243,13 @@ jobs:
GIT_COMMITTER_EMAIL: [email protected]
steps:
- name: "Checkout future release branch"
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: mparticle/mparticle-android-sdk
ref: regression/${{ github.run_number }}
submodules: recursive
- name: "Install JDK 17"
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: "17"
Expand All @@ -256,7 +261,7 @@ jobs:

semantic-release-dryrun:
name: "Test Semantic Release - Dry Run"
needs: [ unit-tests, lint-checks, kotlin-lint-checks, update-kits ]
needs: [unit-tests, lint-checks, kotlin-lint-checks, update-kits]
runs-on: macos-latest
env:
GITHUB_TOKEN: ${{ secrets.MP_SEMANTIC_RELEASE_BOT }}
Expand All @@ -266,15 +271,15 @@ jobs:
GIT_COMMITTER_EMAIL: [email protected]
steps:
- name: "Checkout public main branch"
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: main
- name: "Merge future release branch into main branch"
run: |
git pull origin regression/${{ github.run_number }}
- name: "Semantic Release --dry-run"
if: ${{ inputs.dryRun }} == 'true'
if: inputs.dryRun == 'true'
run: |
npx \
-p lodash \
Expand All @@ -297,7 +302,7 @@ jobs:
GIT_COMMITTER_EMAIL: [email protected]
steps:
- name: "Checkout repo"
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
repository: ${{ github.repository }}
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/dependabot-automerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ on:
types:
- completed

permissions:
contents: read
pull-requests: read
checks: write

jobs:
automerge-dependabot:
name: "Automerge Dependabot PR"
uses: mParticle/mparticle-workflows/.github/workflows/dependabot-automerge.yml@main
uses: mParticle/mparticle-workflows/.github/workflows/dependabot-automerge.yml@main
5 changes: 5 additions & 0 deletions .github/workflows/dependabot-rebase-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ on:
- development
workflow_dispatch:

permissions:
contents: read
pull-requests: read
checks: write

jobs:
rebase-branch:
name: "Rebase Development onto Dependabot Branch"
Expand Down
Loading
Loading