Skip to content
Merged
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
5 changes: 5 additions & 0 deletions .github/workflows/build-kits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ jobs:
distribution: zulu
java-version: "17"

- name: Setup Gradle
uses: gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # v5.0.2
with:
cache-read-only: true

- name: Publish core SDK to Maven Local
run: ./gradlew publishMavenPublicationToMavenLocal

Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/instrumented-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,10 @@ jobs:
with:
distribution: "zulu"
java-version: "17"
- name: Gradle cache
uses: gradle/gradle-build-action@842c587ad8aa4c68eeba24c396e15af4c2e9f30a #v2.9.0
- name: "Setup Gradle"
uses: gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # v5.0.2
with:
cache-read-only: true
# AVD cache disabled: causes indefinite hangs on emulator shutdown (see
# ReactiveCircus/android-emulator-runner#373, #385, #362; WordPress/gutenberg#66771)
- name: Enable KVM group perms
Expand Down
18 changes: 17 additions & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: "Build and Test"

on: [workflow_dispatch, pull_request]
on:
push:
branches:
- main
pull_request:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand All @@ -17,6 +22,7 @@ jobs:
trunk-check:
name: Trunk code check
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
Expand Down Expand Up @@ -72,6 +78,8 @@ jobs:
with:
distribution: "zulu"
java-version: "17"
- name: "Setup Gradle"
uses: gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # v5.0.2
- name: "Run Unit Tests"
run: ./gradlew test
- name: "Print Android Unit Tests Report"
Expand All @@ -98,6 +106,8 @@ jobs:
with:
distribution: "zulu"
java-version: "17"
- name: "Setup Gradle"
uses: gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # v5.0.2
- name: "Run Android Core SDK Lint"
run: ./gradlew lint
- name: "Setup Android Kit Lint"
Expand Down Expand Up @@ -125,6 +135,8 @@ jobs:
with:
distribution: "zulu"
java-version: "17"
- name: "Setup Gradle"
uses: gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # v5.0.2
- name: "Run Android Core SDK Kotlin Lint"
run: ./gradlew ktlintCheck
- name: "Setup Android Kit Kotlin Lint"
Expand All @@ -140,6 +152,7 @@ jobs:

security-checks:
name: "Security Lint Checks"
if: github.event_name == 'pull_request'
uses: mparticle/mparticle-workflows/.github/workflows/security-checks.yml@main
with:
base_branch: main
Expand All @@ -161,6 +174,8 @@ jobs:
with:
distribution: "zulu"
java-version: "17"
- name: "Setup Gradle"
uses: gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # v5.0.2
- name: "Generate Core Release Build"
run: ./gradlew publishMavenPublicationToMavenLocal
- name: "Run Kit-Base Release Tests and Build"
Expand All @@ -176,6 +191,7 @@ jobs:

automerge-dependabot:
name: "Save PR Number for Dependabot Automerge"
if: github.event_name == 'pull_request'
needs:
[
instrumented-core,
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-draft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ jobs:
echo "${{ steps.compose-version.outputs.new-version }}" > VERSION
- name: Publish to Maven local (smoke test)
run: ./gradlew publishMavenPublicationToMavenLocal -PVERSION=${{ steps.compose-version.outputs.new-version }}
run: ./gradlew publishMavenPublicationToMavenLocal -PVERSION=${{ steps.compose-version.outputs.new-version }} --no-build-cache

- name: Generate changelog entry
id: changelog
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/release-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ jobs:
uses: gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # v5.0.2

- name: Publish core to Maven local (required before kits can compile)
run: ./gradlew publishMavenPublicationToMavenLocal -PVERSION=${{ needs.setup-and-version.outputs.final_version }}
run: ./gradlew publishMavenPublicationToMavenLocal -PVERSION=${{ needs.setup-and-version.outputs.final_version }} --no-build-cache

- name: Publish core to Maven Central
run: ./gradlew publishMavenPublicationToMavenCentralRepository -PVERSION=${{ needs.setup-and-version.outputs.final_version }}
run: ./gradlew publishMavenPublicationToMavenCentralRepository -PVERSION=${{ needs.setup-and-version.outputs.final_version }} --no-build-cache

- name: Publish kits to Maven Central
run: ./gradlew publishMavenPublicationToMavenCentralRepository -PVERSION=${{ needs.setup-and-version.outputs.final_version }} -c settings-kits.gradle
run: ./gradlew publishMavenPublicationToMavenCentralRepository -PVERSION=${{ needs.setup-and-version.outputs.final_version }} -c settings-kits.gradle --no-build-cache

# rokt-sdk-plus (com.rokt:rokt-sdk-plus) is an umbrella over the mParticle Rokt kit + the
# Rokt Payment Extension. The "Publish core to Maven local" step above already placed
Expand All @@ -69,7 +69,7 @@ jobs:
# Maven Central propagation. com.rokt:payment-extension (+ roktsdk) come from Central,
# released independently from the ROKT sdk-android-source repo.
- name: Publish Rokt kit to Maven local (so rokt-sdk-plus resolves it locally)
run: ./gradlew :kits:android-rokt:rokt:publishMavenPublicationToMavenLocal -PVERSION=${{ needs.setup-and-version.outputs.final_version }} -c settings-kits.gradle
run: ./gradlew :kits:android-rokt:rokt:publishMavenPublicationToMavenLocal -PVERSION=${{ needs.setup-and-version.outputs.final_version }} -c settings-kits.gradle --no-build-cache

# Published under the com.rokt namespace, so this step signs with the Rokt signing key.
# The Sonatype account is shared with the com.mparticle publish (that account owns both
Expand All @@ -80,7 +80,7 @@ jobs:
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.ROKT_MAVEN_CENTRAL_SIGNING_KEY_PASSWORD }}
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
run: ./gradlew publishMavenPublicationToMavenCentralRepository -PVERSION=${{ needs.setup-and-version.outputs.final_version }} -c settings-rokt-sdk-plus.gradle
run: ./gradlew publishMavenPublicationToMavenCentralRepository -PVERSION=${{ needs.setup-and-version.outputs.final_version }} -c settings-rokt-sdk-plus.gradle --no-build-cache

- name: Create GitHub release
uses: ncipollo/release-action@b7eabc95ff50cbeeedec83973935c8f306dfcd0b # v1.20.0
Expand Down
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ android.useAndroidX=true
org.gradle.daemon=true
org.gradle.jvmargs=-Xmx2560m
#-XX:ThreadStackSize=4096 -XX:CompilerThreadStackSize=4096
org.gradle.caching=true
android.defaults.buildfeatures.buildconfig=true
systemProp.org.gradle.kotlin.dsl.precompiled.accessors.strict=true
JAVA_VERSION=17
Expand Down
Loading