From a02e72ce887a593a4418a45db6badc88f3279ccc Mon Sep 17 00:00:00 2001
From: mchuangatmp <85254535+mchuangatmp@users.noreply.github.com>
Date: Mon, 24 Oct 2022 10:08:52 -0700
Subject: [PATCH] ci: bump up to Android 13 and add in CI improvements (#5)
---
.github/PULL_REQUEST_TEMPLATE.md | 13 ++++++++----
.github/dependabot.yml | 13 ++++++++++++
.github/workflows/pull-request.yml | 27 ++++++++++++------------
.github/workflows/release.yml | 13 ++++++------
.github/workflows/reusable-workflows.yml | 6 +++---
gradle/wrapper/gradle-wrapper.properties | 2 +-
media/build.gradle.kts | 7 +++---
media/src/main/AndroidManifest.xml | 5 +----
release.config.js | 2 +-
settings.gradle.kts | 9 ++++----
10 files changed, 57 insertions(+), 40 deletions(-)
create mode 100644 .github/dependabot.yml
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index 0f6af4e..056a041 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -1,8 +1,13 @@
+## Instructions
+1. PR target branch should be against main
+2. PR title name should follow this format: https://github.com/mParticle/mparticle-workflows/blob/main/.github/workflows/pr-title-check.yml
+3. PR branch prefix should follow this format: https://github.com/mParticle/mparticle-workflows/blob/main/.github/workflows/pr-branch-check-name.yml
+
## Summary
-{provide a thorough description of the changes}
+- {provide a thorough description of the changes}
## Testing Plan
-{explain how this has been tested, and what additional testing should be done}
+- {explain how this has been tested, and what additional testing should be done}
-## Master Issue
-Closes https://go.mparticle.com/work/REPLACEME
+## Reference Issue
+- Closes https://go.mparticle.com/work/REPLACEME
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 0000000..9a2d9cc
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,13 @@
+version: 2
+updates:
+ - package-ecosystem: gradle
+ directory: "/"
+ schedule:
+ interval: daily
+ target-branch: "main"
+ labels: ["dependabot"]
+ open-pull-requests-limit: 10
+ ignore:
+ - dependency-name: "com.google.firebase:firebase-messaging"
+ commit-message:
+ prefix: "chore"
diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml
index 4f8d10b..32fe988 100644
--- a/.github/workflows/pull-request.yml
+++ b/.github/workflows/pull-request.yml
@@ -4,15 +4,16 @@ jobs:
unit-tests:
name: "Unit Tests"
timeout-minutes: 15
- runs-on: ubuntu-18.04
+ runs-on: ubuntu-latest
steps:
- name: "Checkout Branch"
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
with:
+ token: ${{ secrets.MP_SEMANTIC_RELEASE_BOT }}
repository: ${{github.event.pull_request.head.repo.full_name}}
ref: ${{github.head_ref}}
- name: "Install JDK 11"
- uses: actions/setup-java@v2
+ uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: "11"
@@ -22,7 +23,7 @@ jobs:
uses: asadmansr/android-test-report-action@v1.2.0
if: ${{ always() }}
- name: "Archive Unit Test Results"
- uses: actions/upload-artifact@v2
+ uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: "unit-tests-results"
@@ -30,19 +31,19 @@ jobs:
lint-checks:
name: "Lint Checks"
timeout-minutes: 15
- runs-on: ubuntu-latest
+ runs-on: macos-latest
steps:
- name: "Checkout Branch"
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
- name: "Install JDK 11"
- uses: actions/setup-java@v2
+ uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: "11"
- name: "Run Lint"
- run: ./gradlew lint --info
+ run: ./gradlew lint
- name: "Archive Lint Test Results"
- uses: actions/upload-artifact@v2
+ uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: "lint-results"
@@ -53,17 +54,17 @@ jobs:
runs-on: macos-latest
steps:
- name: "Checkout Branch"
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
- name: "Install JDK 11"
- uses: actions/setup-java@v2
+ uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: "11"
- name: "Run Android Core SDK Kotlin Lint"
run: ./gradlew ktlintCheck
- name: "Archive Kotlin Lint Test Results"
- uses: actions/upload-artifact@v2
+ uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: "kotlin-lint-results"
- path: ./**/build/reports/**
\ No newline at end of file
+ path: ./**/build/reports/**
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index f71db2a..9e24953 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -13,18 +13,19 @@ jobs:
runs-on: macos-latest
env:
GITHUB_TOKEN: ${{ secrets.MP_SEMANTIC_RELEASE_BOT }}
- GIT_AUTHOR_NAME: mparticle-bot
+ GIT_AUTHOR_NAME: mparticle-automation
GIT_AUTHOR_EMAIL: developers@mparticle.com
- GIT_COMMITTER_NAME: mparticle-bot
+ GIT_COMMITTER_NAME: mparticle-automation
GIT_COMMITTER_EMAIL: developers@mparticle.com
steps:
- name: "Checkout public main branch"
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
with:
+ token: ${{ secrets.MP_SEMANTIC_RELEASE_BOT }}
fetch-depth: 0
ref: main
- name: "Import GPG Key"
- uses: crazy-max/ghaction-import-gpg@v4
+ uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
@@ -69,11 +70,11 @@ jobs:
mavenSigningKeyPassword: ${{ secrets.MAVEN_CENTRAL_SIGNING_KEY_PASSWORD }}
steps:
- name: "Checkout"
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
with:
ref: main
- name: "Install JDK 11"
- uses: actions/setup-java@v2
+ uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: "11"
diff --git a/.github/workflows/reusable-workflows.yml b/.github/workflows/reusable-workflows.yml
index ce8a3cf..dcda009 100644
--- a/.github/workflows/reusable-workflows.yml
+++ b/.github/workflows/reusable-workflows.yml
@@ -6,10 +6,10 @@ on:
jobs:
pr-branch-check-name:
name: "Check PR for semantic branch name"
- uses: mParticle/mparticle-workflows/.github/workflows/pr-branch-check-name.yml@stable
+ uses: mParticle/mparticle-workflows/.github/workflows/pr-branch-check-name.yml@main
pr-title-check:
name: "Check PR for semantic title"
- uses: mParticle/mparticle-workflows/.github/workflows/pr-title-check.yml@stable
+ uses: mParticle/mparticle-workflows/.github/workflows/pr-title-check.yml@main
pr-branch-target-gitflow:
name: "Check PR for semantic target branch"
- uses: mParticle/mparticle-workflows/.github/workflows/pr-branch-target-continuous.yml@stable
+ uses: mParticle/mparticle-workflows/.github/workflows/pr-branch-target-continuous.yml@main
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index c9f014a..f03af8e 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.2-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip
diff --git a/media/build.gradle.kts b/media/build.gradle.kts
index 084150f..b7e5bad 100644
--- a/media/build.gradle.kts
+++ b/media/build.gradle.kts
@@ -8,13 +8,14 @@ ext["kitDescription"] = "Media Api to supplement core SDK"
apply(from= "../.scripts/maven.gradle")
android {
- compileSdk = 31
+ namespace = "com.mparticle.media"
+ compileSdk = 33
defaultConfig {
minSdk = 16
- targetSdk = 31
+ targetSdk = 33
}
lint {
- abortOnError = false
+ abortOnError = true
}
}
diff --git a/media/src/main/AndroidManifest.xml b/media/src/main/AndroidManifest.xml
index 112f97f..de749ac 100644
--- a/media/src/main/AndroidManifest.xml
+++ b/media/src/main/AndroidManifest.xml
@@ -1,5 +1,2 @@
-
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/release.config.js b/release.config.js
index f0ca2aa..16d6260 100644
--- a/release.config.js
+++ b/release.config.js
@@ -93,7 +93,7 @@ module.exports = {
{
assets: ["CHANGELOG.md", "build.gradle", "README.md"],
message:
- "chore(release): ${nextRelease.version} \n\n${nextRelease.notes}",
+ "chore: ${nextRelease.version} (release) \n\n${nextRelease.notes}",
},
],
],
diff --git a/settings.gradle.kts b/settings.gradle.kts
index 00ab6d2..0816d3e 100644
--- a/settings.gradle.kts
+++ b/settings.gradle.kts
@@ -6,10 +6,9 @@ pluginManagement {
gradlePluginPortal()
}
plugins {
- id("com.android.library") version "7.1.3"
- id("org.jlleitschuh.gradle.ktlint") version "10.2.1"
- kotlin("android") version "1.6.20"
- id("org.sonarqube") version "3.3"
- id("org.jlleitschuh.gradle.ktlint") version "10.2.1"
+ id("com.android.library") version "7.3.1"
+ id("org.jlleitschuh.gradle.ktlint") version "11.0.0"
+ kotlin("android") version "1.7.20"
+ id("org.sonarqube") version "3.4.0.2513"
}
}