Skip to content

Commit

Permalink
Merge pull request #39 from adobe/staging
Browse files Browse the repository at this point in the history
Merge to Main for 2.0.0 release
  • Loading branch information
emdobrin committed Feb 4, 2023
2 parents 3f54810 + 6d35d70 commit cf9f1b1
Show file tree
Hide file tree
Showing 96 changed files with 13,163 additions and 113 deletions.
104 changes: 104 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# Use the latest 2.1 version of CircleCI pipeline process engine.
# See: https://circleci.com/docs/2.0/configuration-reference
# For a detailed guide to building and testing on Android, read the docs:
# https://circleci.com/docs/2.0/language-android/ for more details.
version: 2.1

# Orbs are reusable packages of CircleCI configuration that you may share across projects, enabling you to create encapsulated, parameterized commands, jobs, and executors that can be used across multiple projects.
# See: https://circleci.com/docs/2.0/orb-intro/
orbs:
android: circleci/android@2.1.2

jobs:
build-project:
executor:
name: android/android-machine
resource-class: large
tag: 2021.10.1

steps:
# Checkout the code as the first step.
- checkout
- run:
name: Check format
command: make checkformat

- run:
name: build library
command: |
make assemble-phone
- run:
name: publish jitpack build to local repository
command: |
make publish-maven-local-jitpack
- run:
name: build test app
command: |
make assemble-app
- run:
name: build java doc
command: |
make java-doc
- store_artifacts:
path: code/analytics/build/libs

unit-test:
executor:
name: android/android-machine
resource-class: large
tag: 2021.10.1

steps:
# Checkout the code as the first step.
- checkout
- android/create-avd:
avd-name: myavd
install: true
system-image: system-images;android-29;default;x86
- run:
name: unit test
command: |
make unit-test
- run:
name: code coverage
command: |
make unit-test-coverage
- run:
name: Upload Code Coverage Report
command: |
curl -s https://codecov.io/bash > codecov;
VERSION=$(grep 'VERSION=\"[0-9\.]*\"' codecov | cut -d'"' -f2);
SHAVERSION=$(shasum -v);
echo "Using CodeCov version '$VERSION'"
echo "Using shasum '$SHAVERSION'"
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
bash ./codecov -v -X s3 -c -D "./code/analytics/build/reports/coverage/test/phone/debug" -F unit-functional-tests
integration-test:
executor:
name: android/android-machine
resource-class: large
tag: 2022.01.1

steps:
- checkout

- android/start-emulator-and-run-tests:
system-image: system-images;android-29;default;x86
post-emulator-launch-assemble-command: make assemble-phone
test-command: make integration-test
# Invoke jobs via workflows
# See: https://circleci.com/docs/2.0/configuration-reference/#workflows
workflows:
build-it: # This is the name of the workflow, feel free to change it to better match your workflow.
# Inside the workflow, you define the jobs you want to run.
jobs:
- build-project
- unit-test
- integration-test
# - functional-test
36 changes: 0 additions & 36 deletions .github/workflows/blank.yml

This file was deleted.

32 changes: 32 additions & 0 deletions .github/workflows/maven-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Publish package to the Maven Central Repository
on: workflow_dispatch

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Java
uses: actions/setup-java@v1
with:
java-version: 11
- 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 central staging repository
run: make ci-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 }}
34 changes: 34 additions & 0 deletions .github/workflows/maven-snapshot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Publish package to the Maven Central Repository
on:
push:
branches:
- staging
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Java
uses: actions/setup-java@v1
with:
java-version: 11
- 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 central staging 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 }}
12 changes: 1 addition & 11 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,7 @@ captures/

# IntelliJ
*.iml
.idea/workspace.xml
.idea/tasks.xml
.idea/gradle.xml
.idea/assetWizardSettings.xml
.idea/dictionaries
.idea/libraries
# Android Studio 3 in .gitignore file.
.idea/caches
.idea/modules.xml
# Comment next line if keeping position of elements in Navigation Editor is relevant for you
.idea/navEditor.xml
.idea/

# Keystore files
# Uncomment the following lines if you do not want to check your keystore files in.
Expand Down
6 changes: 6 additions & 0 deletions Documentation/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Analytics extension documentation

### Contents

- [Getting Started](./getting-started.md)
- [API Usage](./api-reference.md)

0 comments on commit cf9f1b1

Please sign in to comment.