Skip to content

Commit

Permalink
ASTRO-1204: Astro -support Android 14 in player playkit SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
dominik11165 committed Oct 2, 2024
1 parent f60034d commit 3cef549
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 18 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@ jobs:
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: |
RELEASE_TYPE=${RELEASE_TYPE} NEW_VERSION=${NEW_VERSION}
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ buildscript {
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 'com.novoda:bintray-release:0.9.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'io.github.gradle-nexus:publish-plugin:1.1.0'
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=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
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion jitpack.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
jdk:
- openjdk11
- openjdk17
before_install:
- curl https://kaltura.github.io/fe-tools/android/license.sh | sh
19 changes: 14 additions & 5 deletions smartswitchplugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@ apply plugin: 'kotlin-android'
apply from: 'version.gradle'

android {
compileSdkVersion 33
namespace 'com.kaltura.playkit.plugin.smartswitch'
compileSdk 34
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

defaultConfig {
minSdkVersion 17
targetSdkVersion 33
minSdkVersion 21
targetSdkVersion 34
versionCode 1
versionName libVersion

Expand All @@ -25,7 +26,15 @@ android {
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}

buildFeatures {
buildConfig true
}
publishing {
publishing {
singleVariant('release') {
}
}
}
kotlinOptions {
jvmTarget = '1.8'
}
Expand All @@ -34,7 +43,7 @@ android {
dependencies {

//TODO change to latest playkit version after tagging.
implementation 'com.kaltura:kaltura-player-android:develop-SNAPSHOT'
implementation 'com.kaltura:kaltura-player-android:KUX-1761-SNAPSHOT'
//implementation project(':tvplayer')

implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
Expand Down
4 changes: 2 additions & 2 deletions smartswitchplugin/gradle-mvn-local.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
apply plugin: 'maven-publish'

task androidSourcesJar(type: Jar) {
classifier 'sources'
archiveClassifier = 'sources'
from android.sourceSets.main.java.sourceFiles
}

project.afterEvaluate {
publishing {
publications {
mavenJava(MavenPublication) {
from components.release
from components.findByName('release')
}
}
repositories {
Expand Down
6 changes: 3 additions & 3 deletions smartswitchplugin/gradle-mvn-push.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ afterEvaluate { project ->
publishing {
publications {
mavenJava(MavenPublication) {
from components.release
from components.findByName('release')
groupId = GROUP
artifactId = POM_ARTIFACT_ID

Expand Down Expand Up @@ -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
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ internal class SmartSwitchExecutor {
private val smartSwitchExecutor: ExecutorService = Executors.newSingleThreadExecutor()

@Nullable
fun sendRequestToYoubora(@Nullable smartSwitchUrl: String,
fun sendRequestToYoubora(smartSwitchUrl: String,
resourceUrl: String?,
@Nullable optionalParams: HashMap<String, String>?): Future<Any?>? {
val sendConfigToYoubora = SendConfigToYoubora(smartSwitchUrl, resourceUrl, optionalParams)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ import java.util.HashMap
*
* @return SmartSwitchConfig
*/
data class SmartSwitchConfig @JvmOverloads constructor(@NonNull val accountCode: String? = null,
data class SmartSwitchConfig @JvmOverloads constructor(val accountCode: String? = null,
val optionalParams: HashMap<String, String>? = null,
@NonNull val application: String? = "default",
val application: String? = "default",
var domainUrl: String? = null) {
init {
val apiPathParams = "${accountCode}/${application}/decision"
Expand Down

0 comments on commit 3cef549

Please sign in to comment.