Skip to content

Commit

Permalink
Merge pull request #636 from adobe/staging
Browse files Browse the repository at this point in the history
staging -> main (v3.0.0 release)
  • Loading branch information
yangyansong-adbe authored Apr 1, 2024
2 parents 74fe097 + e8ebb95 commit 257d036
Show file tree
Hide file tree
Showing 378 changed files with 14,603 additions and 18,691 deletions.
86 changes: 27 additions & 59 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
version: 2.1

orbs:
android: circleci/[email protected]
android: circleci/[email protected]
codecov: codecov/[email protected]

jobs:
build-and-unit-test:
executor:
name: android/android-machine
name: android/android-docker
resource-class: large
tag: 2022.01.1
tag: 2024.01.1

steps:
- checkout
Expand Down Expand Up @@ -56,40 +57,27 @@ jobs:
- store_artifacts:
path: code/identity/build/libs

- run:
name: Download Codecov Uploader
command: |
curl -s https://codecov.io/bash > codecov;
VERSION=$(grep 'VERSION=\"[0-9\.]*\"' codecov | cut -d'"' -f2);
for i in 1 256 512
do
shasum -a $i -c --ignore-missing <(curl -s "https://raw.githubusercontent.com/codecov/codecov-bash/${VERSION}/SHA${i}SUM") ||
shasum -a $i -c <(curl -s "https://raw.githubusercontent.com/codecov/codecov-bash/${VERSION}/SHA${i}SUM" | grep -w "codecov")
done
- run:
name: Run Core unit tests
command: make core-unit-test-coverage

- store_test_results:
path: code/core/build/test-results/testPhoneDebugUnitTest

- run:
name: Upload Core unit test coverage
command: |
bash ./codecov -v -X s3 -c -D "./code/core/build/reports/coverage/test/phone/debug" -F unit-tests
- codecov/upload:
file: ./code/core/build/reports/coverage/test/phone/debug/report.xml
flags: unit-tests

- run:
name: Run Signal unit tests
command: make signal-unit-test-coverage

- store_test_results:
path: code/signal/build/test-results/testPhoneDebugUnitTest

- run:
name: Upload Signal coverage report
command: |
bash ./codecov -v -X s3 -c -D "./code/signal/build/reports/coverage/test/phone/debug" -F unit-tests
- codecov/upload:
file: ./code/signal/build/reports/coverage/test/phone/debug/report.xml
flags: unit-tests

- run:
name: Run Lifecycle unit tests
Expand All @@ -98,10 +86,9 @@ jobs:
- store_test_results:
path: code/lifecycle/build/test-results/testPhoneDebugUnitTest

- run:
name: Upload Lifecycle coverage report
command: |
bash ./codecov -v -X s3 -c -D "./code/lifecycle/build/reports/coverage/test/phone/debug" -F unit-tests
- codecov/upload:
file: ./code/lifecycle/build/reports/coverage/test/phone/debug/report.xml
flags: unit-tests

- run:
name: Run Identity unit tests
Expand All @@ -110,16 +97,15 @@ jobs:
- store_test_results:
path: code/identity/build/test-results/testPhoneDebugUnitTest

- run:
name: Upload Identity coverage report
command: |
bash ./codecov -v -X s3 -c -D "./code/identity/build/reports/coverage/test/phone/debug" -F unit-tests
- codecov/upload:
file: ./code/identity/build/reports/coverage/test/phone/debug/report.xml
flags: unit-tests

functional-test:
executor:
name: android/android-machine
resource-class: large
tag: 2022.01.1
tag: 2024.01.1

steps:
- checkout
Expand All @@ -128,38 +114,20 @@ jobs:
system-image: system-images;android-29;default;x86
post-emulator-launch-assemble-command: make assemble-phone
test-command: make functional-test-coverage

- run:
name: Download Codecov Uploader
command: |
curl -s https://codecov.io/bash > codecov;
VERSION=$(grep 'VERSION=\"[0-9\.]*\"' codecov | cut -d'"' -f2);
for i in 1 256 512
do
shasum -a $i -c --ignore-missing <(curl -s "https://raw.githubusercontent.com/codecov/codecov-bash/${VERSION}/SHA${i}SUM") ||
shasum -a $i -c <(curl -s "https://raw.githubusercontent.com/codecov/codecov-bash/${VERSION}/SHA${i}SUM" | grep -w "codecov")
done
- run:
name: Upload Core coverage report
command: |
bash ./codecov -v -X s3 -c -D "./code/core/build/reports/coverage/androidTest/phone/debug" -F functional-tests
- run:
name: Upload Signal coverage report
command: |
bash ./codecov -v -X s3 -c -D "./code/signal/build/reports/coverage/androidTest/phone/debug" -F functional-tests
- run:
name: Upload Lifecycle coverage report
command: |
bash ./codecov -v -X s3 -c -D "./code/lifecycle/build/reports/coverage/androidTest/phone/debug" -F functional-tests

- codecov/upload:
file: "\
./code/core/build/reports/coverage/androidTest/phone/debug/connected/report.xml,\
./code/signal/build/reports/coverage/androidTest/phone/debug/connected/report.xml,\
./code/identity/build/reports/coverage/androidTest/phone/debug/connected/report.xml,\
./code/lifecycle/build/reports/coverage/androidTest/phone/debug/connected/report.xml"
flags: functional-tests

integration-test:
executor:
name: android/android-machine
resource-class: large
tag: 2022.01.1
tag: 2024.01.1

steps:
- checkout
Expand Down
4 changes: 4 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
template: |
## What’s Changed
$CHANGES
100 changes: 43 additions & 57 deletions .github/workflows/maven-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,35 @@ name: Publish Release
on:
workflow_dispatch:
inputs:
release_core:
required: false
type: boolean
default: false
description: Release Core

release_identity:
required: false
type: boolean
default: false
description: Release Identity

release_lifecycle:
required: false
type: boolean
default: false
description: Release Lifecycle

release_signal:
required: false
type: boolean
default: false
description: Release Signal
extension:
type: choice
description: Extension to release
options:
- core
- identity
- lifecycle
- signal

tag:
description: 'tag/version'
required: true

action_tag:
description: 'Create tag? ("no" to skip)'
required: true
default: 'yes'

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Java
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'zulu'
java-version: 17

- name: Cache Gradle packages
uses: actions/cache@v2
Expand All @@ -43,6 +39,24 @@ jobs:
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 -n ${{ github.event.inputs.extension }} -v ${{ github.event.inputs.tag }})
- 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 }}-${{ github.event.inputs.extension }}
tag: v${{ github.event.inputs.tag }}-${{ github.event.inputs.extension }}
version: v${{ github.event.inputs.tag }}-${{ github.event.inputs.extension }}
publish: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Import GPG key
env:
GPG_SECRET_KEYS: ${{ secrets.GPG_SECRET_KEYS }}
Expand All @@ -51,38 +65,10 @@ jobs:
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 Core to maven central repository
if: ${{ inputs.release_core }}
run: make core-publish-main
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}

- name: Publish Identity to maven central repository
if: ${{ inputs.release_identity }}
run: make identity-publish-main
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}

- name: Publish Lifecycle to maven central repository
if: ${{ inputs.release_lifecycle }}
run: make lifecycle-publish-main
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}

- name: Publish Signal to maven central repository
if: ${{ inputs.release_signal }}
run: make signal-publish-main
- name: Publish to Maven Central Repository
run: make ${{ github.event.inputs.extension }}-publish-main
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
8 changes: 5 additions & 3 deletions .github/workflows/maven-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@ jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Java
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'zulu'
java-version: 17

- name: Cache Gradle packages
uses: actions/cache@v2
Expand Down
17 changes: 5 additions & 12 deletions .github/workflows/update-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ on:
signal-version:
description: 'New version to use for Signal. Example: 3.0.2'
required: false

branch:
description: 'Branch to be used when updating versions'
required: true

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
Expand All @@ -42,25 +38,23 @@ jobs:
steps:

- name: Checkout
uses: actions/[email protected]
with:
ref: ${{ github.event.inputs.branch }}
uses: actions/checkout@v3

- if: ${{ github.event.inputs.core-version != '' }}
name: Update Core Version
run: (sh ./scripts/update-versions.sh -n Core -v ${{ github.event.inputs.core-version }})
run: (sh ./scripts/version.sh -u -n Core -v ${{ github.event.inputs.core-version }})

- if: ${{ github.event.inputs.identity-version != '' }}
name: Update Identity Version
run: (sh ./scripts/update-versions.sh -n Identity -v ${{ github.event.inputs.identity-version }})
run: (sh ./scripts/version.sh -u -n Identity -v ${{ github.event.inputs.identity-version }})

- if: ${{ github.event.inputs.lifecycle-version != '' }}
name: Update Lifecycle Version
run: (sh ./scripts/update-versions.sh -n Lifecycle -v ${{ github.event.inputs.lifecycle-version }})
run: (sh ./scripts/version.sh -u -n Lifecycle -v ${{ github.event.inputs.lifecycle-version }})

- if: ${{ github.event.inputs.signal-version != '' }}
name: Update Signal Version
run: (sh ./scripts/update-versions.sh -n Signal -v ${{ github.event.inputs.signal-version }})
run: (sh ./scripts/version.sh -u -n Signal -v ${{ github.event.inputs.signal-version }})

- name: Generate Commit Message
shell: bash
Expand Down Expand Up @@ -88,4 +82,3 @@ jobs:
commit-message: Update versions ${{ env.COMMIT_MSG }}
title: Update versions ${{ env.COMMIT_MSG }}
body: Update versions ${{ env.COMMIT_MSG }}
base: ${{ github.event.inputs.branch }}
17 changes: 9 additions & 8 deletions Documentation/Debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,19 @@ The AEP SDK offers an extension to quickly inspect, validate, debug data collect

#### Add Assurance to your app

Installation via [Maven](https://maven.apache.org/) & [Gradle](https://gradle.org/) is the easiest and recommended way to get the AEP SDK into your Android app. In your `build.gradle` file, include the latest version of following dependency:
Installation via [Maven](https://maven.apache.org/) & [Gradle](https://gradle.org/) is the easiest and recommended way to get the AEP SDK into your Android app. In your `build.gradle` file, include the latest version of Assurance:

```
implementation 'com.adobe.marketing.mobile:assurance:2.x.x'
##### Kotlin
```kotlin
implementation(platform("com.adobe.marketing.mobile:sdk-bom:3.+"))
implementation("com.adobe.marketing.mobile:assurance")
```

**Note**: Assurance SDK displays some UI components using the source app context. If you see an error similar to

```
AAPT: error: attribute layout_constraintStart_toStartOf (aka <your_app_name>:layout_constraintStart_toStartOf) not found
##### Groovy
```groovy
implementation platform('com.adobe.marketing.mobile:sdk-bom:3.+')
implementation 'com.adobe.marketing.mobile:assurance'
```
while building your app with Assurance SDK, include a dependency on `implementation 'androidx.constraintlayout:constraintlayout:1.x.x'` in your app.

#### Update Extension Registration

Expand Down
Loading

0 comments on commit 257d036

Please sign in to comment.