Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
e9ab3b0
Update to AGP 9.1.0
MattiasBuelens Mar 26, 2026
39f37db
Migrate to Gradle Daemon toolchain
MattiasBuelens Mar 26, 2026
b05368e
Remove deprecated Gradle options
MattiasBuelens Mar 26, 2026
0999ea9
Migrate to built-in Kotlin
MattiasBuelens Mar 26, 2026
b21e70f
Convert settings.gradle to Kotlin
MattiasBuelens Mar 26, 2026
df9da51
Convert build.gradle to Kotlin
MattiasBuelens Mar 26, 2026
8e2aae0
Tweak updateVersion
MattiasBuelens Mar 26, 2026
c795d39
More tweaks
MattiasBuelens Mar 26, 2026
f3318e0
Move comments
MattiasBuelens Mar 26, 2026
d41326e
Link to v10 docs
MattiasBuelens Mar 26, 2026
bc890e2
Convert build.gradle in connectors to Kotlin
MattiasBuelens Mar 26, 2026
7a195c0
Move publishing repositories to convention plugin
MattiasBuelens Mar 26, 2026
17bb2ac
Refactor to convention plugin class
MattiasBuelens Mar 26, 2026
c3d0980
Move more stuff to convention plugin
MattiasBuelens Mar 26, 2026
f6c363a
Tweak
MattiasBuelens Mar 26, 2026
8f5c4c6
Move THEOplayer to version catalog
MattiasBuelens Mar 26, 2026
6c72fe5
Move more publishing to convention plugin
MattiasBuelens Mar 26, 2026
6c5e733
Move dokkaJavadocJar to convention plugin
MattiasBuelens Mar 26, 2026
e6072f2
Convert build.gradle in app to Kotlin
MattiasBuelens Mar 26, 2026
2b00ca4
Move
MattiasBuelens Mar 26, 2026
5db7025
Write new version to version catalog file
MattiasBuelens Mar 26, 2026
2665b50
Check input
MattiasBuelens Mar 26, 2026
59077e0
Update to Dokka 2
MattiasBuelens Mar 26, 2026
b0f2596
Small tweaks
MattiasBuelens Mar 26, 2026
487fa9f
Simplify Yospace dependency
MattiasBuelens Mar 26, 2026
007aa95
Move to package
MattiasBuelens Mar 26, 2026
18fa191
Fix CI
MattiasBuelens Mar 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Run unit tests
run: ./gradlew testReleaseUnitTest
run: ./gradlew test
env:
YOSPACE_USERNAME: ${{ secrets.YOSPACE_USERNAME }}
YOSPACE_PASSWORD: ${{ secrets.YOSPACE_PASSWORD }}
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Build API documentation with Dokka
run: ./gradlew :dokkaHtmlMultiModule --no-configuration-cache
run: ./gradlew :dokkaGenerateHtml
env:
YOSPACE_USERNAME: ${{ secrets.YOSPACE_USERNAME }}
YOSPACE_PASSWORD: ${{ secrets.YOSPACE_PASSWORD }}
Expand Down
80 changes: 0 additions & 80 deletions app/build.gradle

This file was deleted.

79 changes: 79 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion

plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.compose.compiler)
}

android {
namespace = "com.theoplayer.android.connector"
compileSdk = 36

defaultConfig {
applicationId = "com.theoplayer.android.connector"
minSdk = 23
targetSdk = 36
versionCode = 1
versionName = "1.0"
}

buildTypes {
release {
isMinifyEnabled = false
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
}
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

buildFeatures {
compose = true
}
}

kotlin {
compilerOptions {
apiVersion = KotlinVersion.KOTLIN_2_0
jvmTarget = JvmTarget.JVM_1_8
}
}

dependencies {
implementation(libs.androidx.core.ktx)
implementation(libs.androidx.appcompat)
implementation(libs.kotlinx.coroutines.android)

val composeBom = platform(libs.androidx.compose.bom)
implementation(composeBom)
androidTestImplementation(composeBom)
implementation(libs.androidx.activity.compose)
implementation(libs.androidx.lifecycle.compose)
implementation(libs.androidx.compose.material3)
implementation(libs.androidx.compose.ui.ui)
implementation(libs.androidx.compose.ui.tooling.preview)
debugImplementation(libs.androidx.compose.ui.tooling)

implementation(libs.theoplayer)
implementation(libs.theoplayer.integration.ima)
implementation(libs.theoplayer.integration.dai)
implementation(libs.theoplayer.android.ui)

implementation(project(":connectors:analytics:conviva"))
implementation(libs.conviva)

implementation(project(":connectors:analytics:nielsen"))
implementation(libs.nielsen)

implementation(project(":connectors:analytics:comscore"))
implementation(libs.comscore)

// FIXME Re-enable Yospace connector
// implementation(project(":connectors:yospace"))
// implementation(libs.yospace)

implementation(project(":connectors:uplynk"))
}
1 change: 1 addition & 0 deletions build-logic/convention/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
26 changes: 26 additions & 0 deletions build-logic/convention/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
plugins {
`kotlin-dsl`
}

dependencies {
compileOnly(libs.android.gradlePlugin)
compileOnly(libs.android.tools.common)
compileOnly(libs.kotlin.gradlePlugin)
compileOnly(libs.dokka.gradlePlugin)
}

gradlePlugin {
plugins {
register("androidConnectorLibrary") {
id = libs.plugins.android.connector.library.get().pluginId
implementationClass = "AndroidConnectorLibraryConventionPlugin"
}
}
}

tasks {
validatePlugins {
enableStricterValidation = true
failOnWarning = true
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
import com.android.build.api.dsl.LibraryExtension
import extension.libs
import extension.versions
import org.gradle.api.JavaVersion
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.publish.PublishingExtension
import org.gradle.api.publish.maven.MavenPublication
import org.gradle.jvm.tasks.Jar
import org.gradle.kotlin.dsl.apply
import org.gradle.kotlin.dsl.configure
import org.gradle.kotlin.dsl.named
import org.gradle.kotlin.dsl.register
import org.jetbrains.dokka.gradle.DokkaExtension
import org.jetbrains.dokka.gradle.tasks.DokkaGenerateTask
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.dsl.KotlinAndroidExtension
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion

class AndroidConnectorLibraryConventionPlugin : Plugin<Project> {
override fun apply(target: Project) = with(target) {
apply(plugin = "com.android.library")
apply(plugin = "org.jetbrains.dokka")
apply(plugin = "org.jetbrains.dokka-javadoc")
apply(plugin = "maven-publish")

extensions.configure<LibraryExtension> {
compileSdk = 36

defaultConfig {
minSdk = 23
consumerProguardFiles(file("consumer-rules.pro"))
}

buildTypes {
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
file("proguard-rules.pro")
)
}
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

buildFeatures {
buildConfig = true
}

publishing {
singleVariant("release") {
withSourcesJar()
// We use Dokka for JavaDoc generation, see dokkaJavadocJar below
// withJavadocJar()
}
}
}

extensions.configure<KotlinAndroidExtension> {
compilerOptions {
apiVersion.set(KotlinVersion.KOTLIN_2_0)
jvmTarget.set(JvmTarget.JVM_1_8)
}
}

extensions.configure<DokkaExtension> {
val connectorVersion = libs.versions.androidConnector
version = connectorVersion

dokkaSourceSets.configureEach {
externalDocumentationLinks.register("com.theoplayer.android.api") {
url("https://optiview.dolby.com/docs/theoplayer/v10/api-reference/android/")
packageListUrl("https://optiview.dolby.com/docs/theoplayer/v10/api-reference/android/package-list")
}

perPackageOption {
matchingRegex.set("com[.]theoplayer[.]android[.]connector[.].*[.]internal.*")
suppress.set(true)
}
}
}

// https://kotlinlang.org/docs/dokka-gradle.html#build-javadoc-jar
val dokkaGeneratePublicationJavadoc = tasks.named<DokkaGenerateTask>("dokkaGeneratePublicationJavadoc")
val dokkaJavadocJar = tasks.register<Jar>("dokkaJavadocJar") {
group = "dokka"
dependsOn(dokkaGeneratePublicationJavadoc)
from(dokkaGeneratePublicationJavadoc)
archiveClassifier.set("javadoc")
}

extensions.configure<PublishingExtension> {
repositories {
maven {
name = "reposilite"
url = uri("https://maven.theoplayer.com/releases")
credentials {
username = System.getenv("REPOSILITE_USERNAME")
password = System.getenv("REPOSILITE_PASSWORD")
}
}
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/THEOplayer/android-connector")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}

afterEvaluate {
publications {
register<MavenPublication>("release") {
groupId = "com.theoplayer.android-connector"
artifactId = project.name
version = libs.versions.androidConnector
artifact(dokkaJavadocJar)
from(components.getByName("release"))
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package extension

import org.gradle.api.Project
import org.gradle.api.artifacts.VersionCatalog
import org.gradle.api.artifacts.VersionCatalogsExtension
import org.gradle.kotlin.dsl.getByType

internal val Project.libs: VersionCatalog
get() = getVersionCatalog()

private fun Project.getVersionCatalog(name: String = "libs"): VersionCatalog {
return extensions
.getByType<VersionCatalogsExtension>()
.named(name)
}

internal val VersionCatalog.versions: Versions
get() = Versions(this)

internal class Versions(catalog: VersionCatalog) {
val androidConnector: String = catalog.findVersionOrThrow("androidConnector")
}

private fun VersionCatalog.findVersionOrThrow(name: String): String {
return findVersion(name)
.orElseThrow { NoSuchElementException("Version $name not found in version catalog") }
.requiredVersion
}
21 changes: 21 additions & 0 deletions build-logic/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
dependencyResolutionManagement {
repositories {
google {
content {
includeGroupByRegex("com\\.android.*")
includeGroupByRegex("com\\.google.*")
includeGroupByRegex("androidx.*")
}
}
gradlePluginPortal()
mavenCentral()
}
versionCatalogs {
create("libs") {
from(files("../gradle/libs.versions.toml"))
}
}
}

rootProject.name = "build-logic"
include(":convention")
Loading
Loading