Skip to content

Commit b1c7feb

Browse files
authored
Merge pull request #5 from apivideo/feature/new-analytics
feat(*): move to new analytics endpoint
2 parents 44a84c7 + 05f9314 commit b1c7feb

File tree

97 files changed

+1846
-2258
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+1846
-2258
lines changed

.github/workflows/build.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
name: Build project
1+
name: build
22

33
on: [push]
44

55
jobs:
66
build:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v3
10-
- name: Set up Java
11-
uses: actions/setup-java@v3
12-
with:
13-
java-version: '12'
14-
distribution: 'adopt'
15-
- name: Grant execute permission for gradlew
16-
run: chmod +x gradlew
17-
- name: Build
18-
run: ./gradlew build
9+
- uses: actions/checkout@v4
10+
- name: Set up Java
11+
uses: actions/setup-java@v4
12+
with:
13+
java-version: '18'
14+
distribution: 'adopt'
15+
- name: Grant execute permission for gradlew
16+
run: chmod +x gradlew
17+
- name: Build and run tests
18+
run: ./gradlew build

.github/workflows/create-documentation-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414

1515
steps:
1616
- name: Check out current repository code
17-
uses: actions/checkout@v2
17+
uses: actions/checkout@v4
1818

1919
- name: Create the documentation pull request
2020
uses: apivideo/api.video-create-readme-file-pull-request-action@main

.github/workflows/create-release-from-changelog.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ jobs:
99
update-documentation:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v3
12+
- uses: actions/checkout@v2
1313
- name: Create draft release if needed
14-
uses: apivideo/api.video-release-from-changelog-action@v1.1.0
14+
uses: apivideo/api.video-release-from-changelog-action@main
1515
with:
1616
github-auth-token: ${{ secrets.GITHUB_TOKEN }}
1717
prefix: v
18-
18+
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Run integration tests
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
media_id:
7+
description: 'Media ID'
8+
required: true
9+
default: 'vi77Dgk0F8eLwaFOtC5870yn'
10+
playback_timeout_s:
11+
description: 'Playback timeout in seconds'
12+
required: true
13+
default: 60
14+
15+
jobs:
16+
integration-tests:
17+
runs-on: ubuntu-latest
18+
timeout-minutes: 55
19+
strategy:
20+
matrix:
21+
api-level: [ 34 ]
22+
steps:
23+
- name: Enable KVM group perms
24+
run: |
25+
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
26+
sudo udevadm control --reload-rules
27+
sudo udevadm trigger --name-match=kvm
28+
ls /dev/kvm
29+
- uses: actions/checkout@v4
30+
- uses: actions/setup-java@v4
31+
with:
32+
java-version: '17'
33+
distribution: 'adopt'
34+
- name: Make gradlew executable
35+
run: chmod +x ./gradlew
36+
- name: Run Android Tests
37+
uses: reactivecircus/android-emulator-runner@v2
38+
with:
39+
api-level: ${{ matrix.api-level }}
40+
arch: x86_64
41+
disable-animations: true
42+
emulator-options: -no-snapshot -no-window -no-boot-anim -camera-back emulated -camera-front emulated -gpu swiftshader_indirect
43+
script: |
44+
adb logcat -c
45+
adb logcat -s Agent:D TestRunner:D ExoPlayerAnalyticsAgentTest:D &
46+
./gradlew player-analytics-exoplayer:connectedAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=video.api.player.analytics.exoplayer.ApiVideoExoPlayerAnalyticsListenerTest -Pandroid.testInstrumentationRunnerArguments.INTEGRATION_MEDIA_ID=$INTEGRATION_MEDIA_ID -Pandroid.testInstrumentationRunnerArguments.INTEGRATION_PLAYBACK_TIMEOUT_S=$INTEGRATION_PLAYBACK_TIMEOUT_S
47+
env:
48+
INTEGRATION_MEDIA_ID: ${{ github.event.inputs.media_id }}
49+
INTEGRATION_PLAYBACK_TIMEOUT_S: ${{ github.event.inputs.playback_timeout_s }}
50+
- name: Upload test reports
51+
if: ${{ !cancelled() }}
52+
uses: actions/upload-artifact@v4
53+
with:
54+
name: test-reports-${{ matrix.api-level }}
55+
path: '**/build/reports/androidTests'

.github/workflows/release.yml

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ jobs:
88
publish:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v3
11+
- uses: actions/checkout@v4
1212
- name: Set up Java
13-
uses: actions/setup-java@v3
13+
uses: actions/setup-java@v4
1414
with:
15-
java-version: '12'
15+
java-version: '17'
1616
distribution: 'adopt'
1717
- name: Grant execute permission for gradlew
1818
run: chmod +x gradlew
@@ -26,4 +26,24 @@ jobs:
2626
NEXUS_USERNAME: ${{ secrets.OSSRH_USERNAME }}
2727
NEXUS_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
2828
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
29-
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
29+
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
30+
update-api-documentation:
31+
runs-on: ubuntu-latest
32+
needs: publish
33+
steps:
34+
- uses: actions/checkout@v4
35+
- name: Set up Java
36+
uses: actions/setup-java@v4
37+
with:
38+
java-version: '17'
39+
distribution: 'adopt'
40+
- name: Grant execute permission for gradlew
41+
run: chmod +x gradlew
42+
- name: Generate API documentation
43+
run: ./gradlew dokkaHtmlMultiModule
44+
- name: Deploy API documentation to Github Pages
45+
uses: JamesIves/github-pages-deploy-action@v4
46+
with:
47+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48+
BRANCH: gh-pages
49+
FOLDER: build/dokka/htmlMultiModule

.github/workflows/test.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

.github/workflows/update-documentation.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

.gitignore

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1-
*.iml
1+
# Gradle/build
22
.gradle
3-
/local.properties
4-
/.idea
5-
.DS_Store
63
/build
7-
/captures
84
.externalNativeBuild
95
.cxx
6+
7+
# Intellij
8+
*.iml
9+
.idea/
10+
11+
# Local file
1012
local.properties
13+
14+
# Mac
15+
.DS_Store

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
All changes to this project will be documented in this file.
44

5+
## [3.0.0] - 2024-07-24
6+
7+
- Use Analytics endpoint v2
8+
- Use Kotlin DSL for Gradle
9+
510
## [2.0.2] - 2023-10-09
611

712
- Fix a crash on ExoPlayer Analytics when position < 0.0f

0 commit comments

Comments
 (0)