From aab17b36b1724aa93432f1b5a7823a47dedd1861 Mon Sep 17 00:00:00 2001
From: volodymyr-bondarenko85
<131799099+volodymyr-bondarenko85@users.noreply.github.com>
Date: Mon, 23 Dec 2024 14:33:52 +0200
Subject: [PATCH] KUX-1761: Upgrade exoplayer to Media 3 (#108)
* KUX-1761: Upgrade exoplayer to Media 3
* ASTRO-1204: Astro -support Android 14 in player playkit SDK
* ASTRO-1204: Astro -support Android 14 in player playkit SDK
* Custom branch release publish updated
---
.github/publish.sh | 2 +-
.github/workflows/build.yml | 4 ++--
.github/workflows/publish.yml | 7 ++++++
build.gradle | 4 ++--
gradle/wrapper/gradle-wrapper.properties | 2 +-
jitpack.yml | 2 +-
kavaplugin/build.gradle | 23 +++++++++++++------
kavaplugin/gradle-mvn-local.gradle | 4 ++--
kavaplugin/gradle-mvn-push.gradle | 6 ++---
kavaplugin/src/main/AndroidManifest.xml | 3 +--
.../plugins/kava/KavaAnalyticsPlugin.java | 2 +-
11 files changed, 37 insertions(+), 22 deletions(-)
diff --git a/.github/publish.sh b/.github/publish.sh
index bfc40f0..45dc842 100644
--- a/.github/publish.sh
+++ b/.github/publish.sh
@@ -42,7 +42,7 @@ set_version() {
fi
if [ "$RELEASE_TYPE" == "Full" ]; then
echo "RELEASE_TYPE = '$RELEASE_TYPE'"
- perl -pi -e "s/:playkit-android:dev-SNAPSHOT/.playkit:playkit:$NEW_VERSION/" $BUILD_GRADLE
+ perl -pi -e "s/:playkit-android:.*?-SNAPSHOT/.playkit:playkit:$NEW_VERSION/" $BUILD_GRADLE
fi
}
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 07735d9..cdf69fc 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -20,10 +20,10 @@ jobs:
- name: Checkout repo and clone to CI workspace
uses: actions/checkout@v3
- - name: Setup JDK 11
+ - name: Setup JDK 17
uses: actions/setup-java@v3
with:
- java-version: '11'
+ java-version: '17'
distribution: 'adopt'
cache: 'gradle'
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index c74a1b8..ca62ce4 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -49,6 +49,13 @@ jobs:
run: |
mkdir $PWD/.kltrenv && echo "${{ secrets.SIGNING_KEY }}" > $PWD/.kltrenv/secring.gpg.b64
base64 -d $PWD/.kltrenv/secring.gpg.b64 > $PWD/.kltrenv/secring.gpg
+
+ - name: Setup JDK 17
+ uses: actions/setup-java@v3
+ with:
+ java-version: '17'
+ distribution: 'adopt'
+ cache: 'gradle'
- name: Run publish Script
run: |
diff --git a/build.gradle b/build.gradle
index 5d3d291..81fe88f 100644
--- a/build.gradle
+++ b/build.gradle
@@ -7,14 +7,14 @@ ext["signingKeyId"] = System.getenv('SIGNING_KEYID')
ext["signingPassword"] = System.getenv('SIGNING_PASSWORD')
buildscript {
- ext.kotlin_version = '1.7.10'
+ ext.kotlin_version = '1.8.0'
repositories {
google()
mavenCentral()
maven { url "https://jitpack.io" }
}
dependencies {
- classpath 'com.android.tools.build:gradle:7.2.1'
+ classpath 'com.android.tools.build:gradle:8.3.2'
classpath 'io.github.gradle-nexus:publish-plugin:1.1.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 75b7378..42bac00 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.3-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip
diff --git a/jitpack.yml b/jitpack.yml
index dd7fa11..09ce364 100644
--- a/jitpack.yml
+++ b/jitpack.yml
@@ -1,4 +1,4 @@
jdk:
- - openjdk11
+ - openjdk17
before_install:
- curl https://kaltura.github.io/fe-tools/android/license.sh | sh
diff --git a/kavaplugin/build.gradle b/kavaplugin/build.gradle
index 8944220..c6785f7 100644
--- a/kavaplugin/build.gradle
+++ b/kavaplugin/build.gradle
@@ -2,20 +2,29 @@ apply plugin: 'com.android.library'
apply from: 'version.gradle'
android {
- compileSdkVersion 33
+ namespace 'com.kaltura.playkit.plugin.kava'
+ compileSdk 34
compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
+ sourceCompatibility JavaVersion.VERSION_17
+ targetCompatibility JavaVersion.VERSION_17
}
defaultConfig {
- minSdkVersion 16
- targetSdkVersion 33
+ minSdkVersion 21
+ targetSdkVersion 34
versionName libVersion
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
buildConfigField("String","VERSION_NAME","\"${libVersion}\"")
}
-
+ buildFeatures {
+ buildConfig true
+ }
+ publishing {
+ publishing {
+ singleVariant('release') {
+ }
+ }
+ }
buildTypes {
release {
minifyEnabled false
@@ -27,7 +36,7 @@ android {
dependencies {
implementation 'com.kaltura.netkit:netkit-core:1.3.17'
- implementation 'com.kaltura:playkit-android:dev-SNAPSHOT'
+ implementation 'com.kaltura:playkit-android:KUX-1761-SNAPSHOT'
//implementation project(":netkit")
//implementation project(":playkit")
diff --git a/kavaplugin/gradle-mvn-local.gradle b/kavaplugin/gradle-mvn-local.gradle
index 6d0d890..389f44f 100644
--- a/kavaplugin/gradle-mvn-local.gradle
+++ b/kavaplugin/gradle-mvn-local.gradle
@@ -1,7 +1,7 @@
apply plugin: 'maven-publish'
task androidSourcesJar(type: Jar) {
- classifier 'sources'
+ archiveClassifier = 'sources'
from android.sourceSets.main.java.sourceFiles
}
@@ -9,7 +9,7 @@ project.afterEvaluate {
publishing {
publications {
mavenJava(MavenPublication) {
- from components.release
+ from components.findByName('release')
}
}
repositories {
diff --git a/kavaplugin/gradle-mvn-push.gradle b/kavaplugin/gradle-mvn-push.gradle
index e26cac0..f2c6402 100644
--- a/kavaplugin/gradle-mvn-push.gradle
+++ b/kavaplugin/gradle-mvn-push.gradle
@@ -27,7 +27,7 @@ afterEvaluate { project ->
publishing {
publications {
mavenJava(MavenPublication) {
- from components.release
+ from components.findByName('release')
groupId = GROUP
artifactId = POM_ARTIFACT_ID
@@ -97,12 +97,12 @@ afterEvaluate { project ->
}
task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) {
- classifier 'javadoc'
+ archiveClassifier = 'javadoc'
from androidJavadocs.destinationDir
}
task androidSourcesJar(type: Jar) {
- classifier 'sources'
+ archiveClassifier = 'sources'
from android.sourceSets.main.java.sourceFiles
}
diff --git a/kavaplugin/src/main/AndroidManifest.xml b/kavaplugin/src/main/AndroidManifest.xml
index 7b99270..94cbbcf 100644
--- a/kavaplugin/src/main/AndroidManifest.xml
+++ b/kavaplugin/src/main/AndroidManifest.xml
@@ -1,2 +1 @@
-
+
diff --git a/kavaplugin/src/main/java/com/kaltura/playkit/plugins/kava/KavaAnalyticsPlugin.java b/kavaplugin/src/main/java/com/kaltura/playkit/plugins/kava/KavaAnalyticsPlugin.java
index 3e6ec4b..f97f9fc 100644
--- a/kavaplugin/src/main/java/com/kaltura/playkit/plugins/kava/KavaAnalyticsPlugin.java
+++ b/kavaplugin/src/main/java/com/kaltura/playkit/plugins/kava/KavaAnalyticsPlugin.java
@@ -17,7 +17,7 @@
import com.google.gson.Gson;
import com.google.gson.JsonObject;
-import com.kaltura.android.exoplayer2.C;
+import com.kaltura.androidx.media3.common.C;
import com.kaltura.netkit.connect.executor.APIOkRequestsExecutor;
import com.kaltura.netkit.connect.executor.RequestQueue;
import com.kaltura.netkit.connect.request.RequestBuilder;