From bf41532e414a0a83fbf69666df8aa99d64ab79eb Mon Sep 17 00:00:00 2001 From: timkimadobe <95260439+timkimadobe@users.noreply.github.com> Date: Tue, 28 Jan 2025 16:19:28 -0800 Subject: [PATCH 1/6] Migrate to reusable workflows 3.1.1 --- .github/workflows/build-and-test.yml | 29 +++++++++++ .github/workflows/maven-release.yml | 78 ++++++++-------------------- .github/workflows/maven-snapshot.yml | 36 +++---------- .github/workflows/update-version.yml | 50 +++++++++--------- Makefile | 2 + 5 files changed, 86 insertions(+), 109 deletions(-) create mode 100644 .github/workflows/build-and-test.yml diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml new file mode 100644 index 0000000..1a55cb3 --- /dev/null +++ b/.github/workflows/build-and-test.yml @@ -0,0 +1,29 @@ +# +# Copyright 2025 Adobe. All rights reserved. +# This file is licensed to you under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. You may obtain a copy +# of the License at http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed under +# the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS +# OF ANY KIND, either express or implied. See the License for the specific language +# governing permissions and limitations under the License. +# + +name: Build and Test + +on: + pull_request: + +jobs: + build-and-test: + name: "CI" + uses: adobe/aepsdk-commons/.github/workflows/android-build-and-test.yml@gha-android-3.1.1 + with: + android-api-levels: '[29]' + run-test-unit: true + run-test-functional: true + run-build-app: true + enable-codecov: true + javadoc-build-path: code/analytics/build/docs/javadoc + secrets: inherit \ No newline at end of file diff --git a/.github/workflows/maven-release.yml b/.github/workflows/maven-release.yml index 3a95b8f..a4f7e69 100644 --- a/.github/workflows/maven-release.yml +++ b/.github/workflows/maven-release.yml @@ -11,66 +11,34 @@ # name: Publish Release + on: workflow_dispatch: inputs: tag: - description: 'tag/version' - required: true - - action_tag: - description: 'Create tag? ("no" to skip)' + description: 'The tag (version) to be released (ex: 1.2.3).' + type: string required: true - default: 'yes' -jobs: - publish: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: Set up Java - uses: actions/setup-java@v3 - with: - distribution: 'zulu' - java-version: 17 - - name: Cache Gradle packages - uses: actions/cache@v2 - with: - path: ~/.gradle/caches - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} - restore-keys: ${{ runner.os }}-gradle - - - name: Verify version - run: | - set -eo pipefail - echo Release version: ${{ github.event.inputs.tag }} - (./scripts/version.sh -v ${{ github.event.inputs.tag }}) + create-github-release: + description: 'Create GitHub release using tag. If the provided `tag` does not exist, it will be created.' + type: boolean + required: true + default: true - - name: Create GH Release - id: create_release - uses: release-drafter/release-drafter@v5 - if: ${{ github.event.inputs.action_tag == 'yes' }} - with: - name: v${{ github.event.inputs.tag }} - tag: v${{ github.event.inputs.tag }} - version: v${{ github.event.inputs.tag }} - publish: true - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Import GPG key - env: - GPG_SECRET_KEYS: ${{ secrets.GPG_SECRET_KEYS }} - GPG_OWNERTRUST: ${{ secrets.GPG_OWNERTRUST }} - run: | - echo $GPG_SECRET_KEYS | base64 --decode | gpg --import --no-tty --batch --yes - echo $GPG_OWNERTRUST | base64 --decode | gpg --import-ownertrust --no-tty --batch --yes + core-dependency: + description: 'The Core dependency version in gradle.properties to be validated (ex: 1.2.3).' + type: string + required: true - - name: Publish to Maven Central Repository - run: make ci-publish - env: - SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} - SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} - GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} - GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }} +jobs: + publish: + permissions: + contents: write + uses: adobe/aepsdk-commons/.github/workflows/android-maven-release.yml@gha-android-3.1.1 + with: + tag: ${{ github.event.inputs.tag }} + create-github-release: ${{ github.event.inputs.create-github-release == 'true' }} + version-validation-paths: code/gradle.properties, code/analytics/src/main/java/com/adobe/marketing/mobile/analytics/internal/AnalyticsConstants.kt + version-validation-dependencies: Core ${{ github.event.inputs.core-dependency }} + secrets: inherit \ No newline at end of file diff --git a/.github/workflows/maven-snapshot.yml b/.github/workflows/maven-snapshot.yml index 1a19c19..b730a98 100644 --- a/.github/workflows/maven-snapshot.yml +++ b/.github/workflows/maven-snapshot.yml @@ -11,37 +11,13 @@ # name: Publish Snapshot -on: + +on: workflow_dispatch: jobs: publish: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: Set up Java - uses: actions/setup-java@v3 - with: - distribution: 'zulu' - java-version: 17 - - name: Cache Gradle packages - uses: actions/cache@v2 - with: - path: ~/.gradle/caches - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} - restore-keys: ${{ runner.os }}-gradle - - name: Import GPG key - env: - GPG_SECRET_KEYS: ${{ secrets.GPG_SECRET_KEYS }} - GPG_OWNERTRUST: ${{ secrets.GPG_OWNERTRUST }} - run: | - echo $GPG_SECRET_KEYS | base64 --decode | gpg --import --no-tty --batch --yes - echo $GPG_OWNERTRUST | base64 --decode | gpg --import-ownertrust --no-tty --batch --yes - - name: Publish to Maven Snapshot Repository - run: make ci-publish-staging - env: - SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} - SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} - GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} - GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }} + permissions: + contents: write + uses: adobe/aepsdk-commons/.github/workflows/android-maven-snapshot.yml@gha-android-3.1.1 + secrets: inherit \ No newline at end of file diff --git a/.github/workflows/update-version.yml b/.github/workflows/update-version.yml index eace367..5abae88 100644 --- a/.github/workflows/update-version.yml +++ b/.github/workflows/update-version.yml @@ -10,36 +10,38 @@ # governing permissions and limitations under the License. # -name: Update Version +name: Update Versions + on: workflow_dispatch: inputs: - version: - description: 'New version to use for the Analytics extension. Example: 3.0.0' + version: + description: 'New version to use for the extension (ex: 1.2.3).' + type: string + required: true + + branch: + description: 'The target branch where the version update will be applied and the pull request will be merged into.' + type: string required: true core-dependency: - description: '[Optional] Update Core dependency in pom.xml. Example: 3.0.0' + description: | + If a version is provided, update Core dependency in gradle.properties (ex: 1.2.3). + This is a published dependency in the pom.xml file. + type: string required: false + default: '' jobs: - update-version: - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Update Analytics - run: (./scripts/version.sh -u -v ${{ github.event.inputs.version }} -d "Core ${{ github.event.inputs.core-dependency }},") - - - name: Create Pull Request - uses: peter-evans/create-pull-request@v5 - with: - token: ${{ github.token }} - commit-message: Updating version to ${{ github.event.inputs.version }}. - branch: version-${{ github.event.inputs.version }}-update - delete-branch: true - title: Updating version to ${{ github.event.inputs.version }} - body: Updating version to ${{ github.event.inputs.version }} - + update-versions: + permissions: + contents: write + pull-requests: write + uses: adobe/aepsdk-commons/.github/workflows/versions.yml@gha-android-3.1.1 + with: + version: ${{ github.event.inputs.version }} + branch: ${{ github.event.inputs.branch }} + dependencies: Core ${{ github.event.inputs.core-dependency }} + paths: code/gradle.properties, code/analytics/src/main/java/com/adobe/marketing/mobile/analytics/internal/AnalyticsConstants.kt + update: true \ No newline at end of file diff --git a/Makefile b/Makefile index 1fcc7a9..c6eaad4 100644 --- a/Makefile +++ b/Makefile @@ -21,6 +21,8 @@ checkformat: checkstyle: (./code/gradlew -p code/$(EXTENSION-LIBRARY-FOLDER-NAME) checkstyle) +lint: checkstyle + unit-test: (./code/gradlew -p code/$(EXTENSION-LIBRARY-FOLDER-NAME) testPhoneDebugUnitTest) From 8ea6f39e647446e017489f0729e637a1155d22b3 Mon Sep 17 00:00:00 2001 From: timkimadobe <95260439+timkimadobe@users.noreply.github.com> Date: Tue, 28 Jan 2025 16:19:50 -0800 Subject: [PATCH 2/6] Remove migrated scripts --- .circleci/config.yml | 189 ------------------------------------------- scripts/version.sh | 131 ------------------------------ 2 files changed, 320 deletions(-) delete mode 100644 .circleci/config.yml delete mode 100755 scripts/version.sh diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 544dfed..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,189 +0,0 @@ -# -# Copyright 2022 Adobe. All rights reserved. -# This file is licensed to you under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. You may obtain a copy -# of the License at http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software distributed under -# the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS -# OF ANY KIND, either express or implied. See the License for the specific language -# governing permissions and limitations under the License. -# - -version: 2.1 -orbs: - # Use the circleci android orb version that supports OpenJDK17 required by AGP 8.2+ - android: circleci/android@2.4.0 - codecov: codecov/codecov@4.0.1 - -parameters: - gradle-cache-prefix: - type: string - default: v1 - build-cache-prefix: - type: string - default: v1 - build-path: - type: string - default: "code/analytics/build" - -# Workflows orchestrate a set of jobs to be run; -workflows: - version: 2 - build-test-deploy: - jobs: - - validate-code - - build-and-unit-test: - requires: - - validate-code - - functional-test: - requires: - - validate-code - - build-test-app: - requires: - - validate-code - filters: - branches: - only: - - main - - staging - -jobs: - validate-code: - executor: - name: android/android-docker - resource-class: medium - tag: 2024.01.1 - - steps: - - checkout - - - android/restore-gradle-cache: - cache-prefix: << pipeline.parameters.gradle-cache-prefix >> - - - android/restore-build-cache: - cache-prefix: << pipeline.parameters.build-cache-prefix >> - - - run: - name: Check Format - command: make checkformat - - - run: - name: Check Style - command: make checkstyle - - - android/save-gradle-cache: - cache-prefix: << pipeline.parameters.gradle-cache-prefix >> - - - android/save-build-cache: - cache-prefix: << pipeline.parameters.build-cache-prefix >> - - - store_artifacts: - path: << pipeline.parameters.build-path >>/reports - - build-and-unit-test: - executor: - name: android/android-docker - resource-class: medium - tag: 2024.01.1 - - steps: - - checkout - - - android/restore-gradle-cache: - cache-prefix: << pipeline.parameters.gradle-cache-prefix >> - - - android/restore-build-cache: - cache-prefix: << pipeline.parameters.build-cache-prefix >> - - - run: - name: Javadoc - command: make javadoc - - - store_artifacts: - path: << pipeline.parameters.build-path >>/docs/javadoc - - - run: - name: Assemble Phone - command: make assemble-phone - - - android/run-tests: - test-command: make unit-test-coverage - - - android/save-gradle-cache: - cache-prefix: << pipeline.parameters.gradle-cache-prefix >> - - - android/save-build-cache: - cache-prefix: << pipeline.parameters.build-cache-prefix >> - - - store_artifacts: - path: << pipeline.parameters.build-path >>/reports/tests - - - store_test_results: - path: << pipeline.parameters.build-path >>/test-results/testPhoneDebugUnitTest - - - codecov/upload: - file: << pipeline.parameters.build-path >>/reports/coverage/test/phone/debug/report.xml - flags: unit-tests - - functional-test: - executor: - name: android/android-machine - resource-class: medium - tag: 2024.01.1 - - steps: - - checkout - - - android/restore-build-cache: - cache-prefix: << pipeline.parameters.build-cache-prefix >> - - - run: - name: List available emulator images - command: sdkmanager --list - - - android/start-emulator-and-run-tests: - # It should match the name seen in the "sdkmanager --list" output - system-image: system-images;android-29;default;x86 - # The command to be run, while waiting for emulator startup - post-emulator-launch-assemble-command: make assemble-phone - # The test command - test-command: make functional-test-coverage - restore-gradle-cache-prefix: << pipeline.parameters.gradle-cache-prefix >> - - - android/save-build-cache: - cache-prefix: << pipeline.parameters.build-cache-prefix >> - - - codecov/upload: - file: << pipeline.parameters.build-path >>/reports/coverage/androidTest/phone/debug/connected/report.xml - flags: functional-tests - - - store_artifacts: - path: << pipeline.parameters.build-path >>/reports/androidTests - - - store_test_results: - path: << pipeline.parameters.build-path >>/outputs/androidTest-results - - build-test-app: - - executor: - name: android/android-docker - resource-class: medium - tag: 2024.01.1 - - steps: - - checkout - - - android/restore-gradle-cache: - cache-prefix: << pipeline.parameters.gradle-cache-prefix >> - - android/restore-build-cache: - cache-prefix: << pipeline.parameters.build-cache-prefix >> - - - run: - name: Assemble App - command: make assemble-app - - - android/save-gradle-cache: - cache-prefix: << pipeline.parameters.gradle-cache-prefix >> - - android/save-build-cache: - cache-prefix: << pipeline.parameters.build-cache-prefix >> \ No newline at end of file diff --git a/scripts/version.sh b/scripts/version.sh deleted file mode 100755 index 55c19e1..0000000 --- a/scripts/version.sh +++ /dev/null @@ -1,131 +0,0 @@ -#!/bin/bash - -# Make this script executable from terminal: -# chmod 755 version.sh -set -e # Any subsequent(*) commands which fail will cause the shell script to exit immediately - -ROOT_DIR=$(git rev-parse --show-toplevel) -LINE="================================================================================" -VERSION_REGEX="[0-9]+\.[0-9]+\.[0-9]+" - -GRADLE_PROPERTIES_FILE=$ROOT_DIR"/code/gradle.properties" -CONSTANTS_FILE=$ROOT_DIR"/code/analytics/src/main/java/com/adobe/marketing/mobile/analytics/internal/AnalyticsConstants.kt" -# Java files -#EXTENSION_VERSION_REGEX="^.*String EXTENSION_VERSION *= *" -# Kotlin files -EXTENSION_VERSION_REGEX="^ +const val EXTENSION_VERSION *= *" - -help() -{ - echo "" - echo "Usage: $0 -v VERSION -d DEPENDENCIES" - echo "" - echo -e " -v\t- Version to update or verify for the extension. \n\t Example: 3.0.2\n" - echo -e " -d\t- Comma seperated dependecies to update along with their version. \n\t Example: "Core 3.1.1, Edge 3.2.1"\n" - echo -e " -u\t- Updates the version. If this flag is absent, the script verifies if the version is correct\n" - exit 1 # Exit script after printing help -} - -sed_platform() { - # Ensure sed works properly in linux and mac-os. - if [[ "$OSTYPE" == "darwin"* ]]; then - sed -i '' "$@" - else - sed -i "$@" - fi -} - -update() { - echo "Changing version to $VERSION" - - # Replace version in Constants file - echo "Changing 'EXTENSION_VERSION' to '$VERSION' in '$CONSTANTS_FILE'" - sed_platform -E "/$EXTENSION_VERSION_REGEX/{s/$VERSION_REGEX/$VERSION/;}" $CONSTANTS_FILE - - # Replace version in gradle.properties - echo "Changing 'moduleVersion' to '$VERSION' in '$GRADLE_PROPERTIES_FILE'" - sed_platform -E "/^moduleVersion/{s/$VERSION_REGEX/$VERSION/;}" $GRADLE_PROPERTIES_FILE - - # Replace dependencies in gradle.properties - if [ "$DEPENDENCIES" != "none" ]; then - IFS="," - dependenciesArray=($(echo "$DEPENDENCIES")) - - IFS=" " - for dependency in "${dependenciesArray[@]}"; do - dependencyArray=(${dependency// / }) - dependencyName=${dependencyArray[0]} - dependencyVersion=${dependencyArray[1]} - - if [ "$dependencyVersion" != "" ]; then - echo "Changing 'maven${dependencyName}Version' to '$dependencyVersion' in '$GRADLE_PROPERTIES_FILE'" - sed_platform -E "/^maven${dependencyName}Version/{s/$VERSION_REGEX/$dependencyVersion/;}" $GRADLE_PROPERTIES_FILE - fi - done - fi -} - -verify() { - echo "Verifing version is $VERSION" - - if ! grep -E "$EXTENSION_VERSION_REGEX\"$VERSION\"" "$CONSTANTS_FILE" >/dev/null; then - echo "'EXTENSION_VERSION' does not match '$VERSION' in '$CONSTANTS_FILE'" - exit 1 - fi - - if ! grep -E "^moduleVersion=.*$VERSION" "$GRADLE_PROPERTIES_FILE" >/dev/null; then - echo "'moduleVersion' does not match '$VERSION' in '$GRADLE_PROPERTIES_FILE'" - exit 1 - fi - - if [ "$DEPENDENCIES" != "none" ]; then - IFS="," - dependenciesArray=($(echo "$DEPENDENCIES")) - - IFS=" " - for dependency in "${dependenciesArray[@]}"; do - dependencyArray=(${dependency// / }) - dependencyName=${dependencyArray[0]} - dependencyVersion=${dependencyArray[1]} - - if [ "$dependencyVersion" != "" ]; then - if ! grep -E "^maven${dependencyName}Version=.*$dependencyVersion" "$GRADLE_PROPERTIES_FILE" >/dev/null; then - echo "maven${dependencyName}Version does not match '$dependencyVersion' in '$GRADLE_PROPERTIES_FILE'" - exit 1 - fi - fi - done - fi - - echo "Success" -} - - -while getopts "v:d:u" opt -do - case "$opt" in - v ) VERSION="$OPTARG" ;; - d ) DEPENDENCIES="$OPTARG" ;; - u ) UPDATE="true" ;; - ? ) help ;; # Print help in case parameter is non-existent - esac -done - -# Print help in case parameters are empty -if [ -z "$VERSION" ] -then - echo "********** USAGE ERROR **********" - echo "Some or all of the parameters are empty. See usage below:"; - help -fi - - - -echo "$LINE" -if [[ ${UPDATE} = "true" ]]; -then - update -else - verify -fi -echo "$LINE" \ No newline at end of file From e1e470226945bc1c8952647faa0320fdfa10f34d Mon Sep 17 00:00:00 2001 From: timkimadobe <95260439+timkimadobe@users.noreply.github.com> Date: Tue, 28 Jan 2025 16:37:44 -0800 Subject: [PATCH 3/6] Fix javadoc path to actual --- .github/workflows/build-and-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 1a55cb3..4a518d0 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -25,5 +25,5 @@ jobs: run-test-functional: true run-build-app: true enable-codecov: true - javadoc-build-path: code/analytics/build/docs/javadoc + javadoc-build-path: code/analytics/build/dokka/javadoc secrets: inherit \ No newline at end of file From 9eabd3b031b869396bb65aa62ba5e61b5a3e664c Mon Sep 17 00:00:00 2001 From: timkimadobe <95260439+timkimadobe@users.noreply.github.com> Date: Tue, 28 Jan 2025 17:02:09 -0800 Subject: [PATCH 4/6] Remove migrated script --- .github/release-drafter.yml | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 .github/release-drafter.yml diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml deleted file mode 100644 index e053484..0000000 --- a/.github/release-drafter.yml +++ /dev/null @@ -1,16 +0,0 @@ -# -# Copyright 2024 Adobe. All rights reserved. -# This file is licensed to you under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. You may obtain a copy -# of the License at http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software distributed under -# the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS -# OF ANY KIND, either express or implied. See the License for the specific language -# governing permissions and limitations under the License. -# - -template: | - ## What’s Changed - - $CHANGES \ No newline at end of file From 480ed04160d5916831337ae70c5c6d3498a37b81 Mon Sep 17 00:00:00 2001 From: timkimadobe <95260439+timkimadobe@users.noreply.github.com> Date: Wed, 29 Jan 2025 19:22:49 -0800 Subject: [PATCH 5/6] Update to 3.2.0 and add ci-lint --- .github/workflows/build-and-test.yml | 2 +- .github/workflows/maven-release.yml | 2 +- .github/workflows/maven-snapshot.yml | 2 +- .github/workflows/update-version.yml | 2 +- Makefile | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 4a518d0..b143979 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -18,7 +18,7 @@ on: jobs: build-and-test: name: "CI" - uses: adobe/aepsdk-commons/.github/workflows/android-build-and-test.yml@gha-android-3.1.1 + uses: adobe/aepsdk-commons/.github/workflows/android-build-and-test.yml@gha-android-3.2.0 with: android-api-levels: '[29]' run-test-unit: true diff --git a/.github/workflows/maven-release.yml b/.github/workflows/maven-release.yml index a4f7e69..9d30ec3 100644 --- a/.github/workflows/maven-release.yml +++ b/.github/workflows/maven-release.yml @@ -35,7 +35,7 @@ jobs: publish: permissions: contents: write - uses: adobe/aepsdk-commons/.github/workflows/android-maven-release.yml@gha-android-3.1.1 + uses: adobe/aepsdk-commons/.github/workflows/android-maven-release.yml@gha-android-3.2.0 with: tag: ${{ github.event.inputs.tag }} create-github-release: ${{ github.event.inputs.create-github-release == 'true' }} diff --git a/.github/workflows/maven-snapshot.yml b/.github/workflows/maven-snapshot.yml index b730a98..fc6f4a2 100644 --- a/.github/workflows/maven-snapshot.yml +++ b/.github/workflows/maven-snapshot.yml @@ -19,5 +19,5 @@ jobs: publish: permissions: contents: write - uses: adobe/aepsdk-commons/.github/workflows/android-maven-snapshot.yml@gha-android-3.1.1 + uses: adobe/aepsdk-commons/.github/workflows/android-maven-snapshot.yml@gha-android-3.2.0 secrets: inherit \ No newline at end of file diff --git a/.github/workflows/update-version.yml b/.github/workflows/update-version.yml index 5abae88..4efe824 100644 --- a/.github/workflows/update-version.yml +++ b/.github/workflows/update-version.yml @@ -38,7 +38,7 @@ jobs: permissions: contents: write pull-requests: write - uses: adobe/aepsdk-commons/.github/workflows/versions.yml@gha-android-3.1.1 + uses: adobe/aepsdk-commons/.github/workflows/versions.yml@gha-android-3.2.0 with: version: ${{ github.event.inputs.version }} branch: ${{ github.event.inputs.branch }} diff --git a/Makefile b/Makefile index c6eaad4..1fdac9e 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,7 @@ checkformat: checkstyle: (./code/gradlew -p code/$(EXTENSION-LIBRARY-FOLDER-NAME) checkstyle) -lint: checkstyle +ci-lint: checkformat checkstyle unit-test: (./code/gradlew -p code/$(EXTENSION-LIBRARY-FOLDER-NAME) testPhoneDebugUnitTest) From 0a40b8f089ed2d2d740a853595e8bb9b22fb21b8 Mon Sep 17 00:00:00 2001 From: timkimadobe <95260439+timkimadobe@users.noreply.github.com> Date: Thu, 30 Jan 2025 17:39:11 -0800 Subject: [PATCH 6/6] Update workflows to 3.3.0 and update lint rule to include all checks required by CI --- .github/workflows/build-and-test.yml | 2 +- .github/workflows/maven-release.yml | 2 +- .github/workflows/maven-snapshot.yml | 2 +- .github/workflows/update-version.yml | 2 +- Makefile | 3 ++- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index b143979..21e4b8a 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -18,7 +18,7 @@ on: jobs: build-and-test: name: "CI" - uses: adobe/aepsdk-commons/.github/workflows/android-build-and-test.yml@gha-android-3.2.0 + uses: adobe/aepsdk-commons/.github/workflows/android-build-and-test.yml@gha-android-3.3.0 with: android-api-levels: '[29]' run-test-unit: true diff --git a/.github/workflows/maven-release.yml b/.github/workflows/maven-release.yml index 9d30ec3..75ac2b7 100644 --- a/.github/workflows/maven-release.yml +++ b/.github/workflows/maven-release.yml @@ -35,7 +35,7 @@ jobs: publish: permissions: contents: write - uses: adobe/aepsdk-commons/.github/workflows/android-maven-release.yml@gha-android-3.2.0 + uses: adobe/aepsdk-commons/.github/workflows/android-maven-release.yml@gha-android-3.3.0 with: tag: ${{ github.event.inputs.tag }} create-github-release: ${{ github.event.inputs.create-github-release == 'true' }} diff --git a/.github/workflows/maven-snapshot.yml b/.github/workflows/maven-snapshot.yml index fc6f4a2..c0f398d 100644 --- a/.github/workflows/maven-snapshot.yml +++ b/.github/workflows/maven-snapshot.yml @@ -19,5 +19,5 @@ jobs: publish: permissions: contents: write - uses: adobe/aepsdk-commons/.github/workflows/android-maven-snapshot.yml@gha-android-3.2.0 + uses: adobe/aepsdk-commons/.github/workflows/android-maven-snapshot.yml@gha-android-3.3.0 secrets: inherit \ No newline at end of file diff --git a/.github/workflows/update-version.yml b/.github/workflows/update-version.yml index 4efe824..4e549ea 100644 --- a/.github/workflows/update-version.yml +++ b/.github/workflows/update-version.yml @@ -38,7 +38,7 @@ jobs: permissions: contents: write pull-requests: write - uses: adobe/aepsdk-commons/.github/workflows/versions.yml@gha-android-3.2.0 + uses: adobe/aepsdk-commons/.github/workflows/versions.yml@gha-android-3.3.0 with: version: ${{ github.event.inputs.version }} branch: ${{ github.event.inputs.branch }} diff --git a/Makefile b/Makefile index 1fdac9e..a705cf7 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,8 @@ checkformat: checkstyle: (./code/gradlew -p code/$(EXTENSION-LIBRARY-FOLDER-NAME) checkstyle) -ci-lint: checkformat checkstyle +# Used by build and test CI workflow +lint: checkformat checkstyle unit-test: (./code/gradlew -p code/$(EXTENSION-LIBRARY-FOLDER-NAME) testPhoneDebugUnitTest)