DoveRunner Widevine Android SDK is recommended to be integrated into your App Project using GitHub Packages.
This process requires a GitHub Personal Access Token (PAT) and can be completed by following the steps below.
The following instructions are based on the Advanced Sample included in the SDK.
Implementation Steps
1) Generate a GitHub Personal Access Token (PAT)
Navigate to:
GitHub → Settings → Developer settings → Personal access tokens (classic) → Generate new token (classic)-
Include the
read:packagespermission in the scopes.It is recommended not to hardcode the token in your code, but to manage it as follows::
gradle.properties(either in the project root or user home)OS environment variables
Example (gradle.properties)
# gradle.properties (project root or ~/.gradle/gradle.properties)
gpr.user=YOUR_GITHUB_USERNAME
gpr.key=YOUR_GITHUB_PAT_WITH_read:packages
2) Add the GitHub Packages Repository in settings.gradle
Kotlin DSL (settings.gradle.kts)
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
// GitHub Packages: Widevine Android SDK
maven("https://maven.pkg.github.com/doverunner/widevine-android-sdk") {
name = "GitHubPackages"
credentials {
username = providers.gradleProperty("gpr.user")
.orElse(System.getenv("GITHUB_USER")).get()
password = providers.gradleProperty("gpr.key")
.orElse(System.getenv("GITHUB_TOKEN")).get()
}
}
}
}
3) Apply the Configuration in app/build.gradle.kts
Key points
Ensure proper
minSdk,targetSdk, and Java/Kotlin compatibility.Include essential AndroidX/Media3 dependencies.
Add the Widevine Android SDK dependency using the provided group/artifact/version.
Package coordinates may differ depending on your account or plan.
Use thegroupId:artifactId:versionprovided to you, or refer to your internal version catalog.
Kotlin DSL (app/build.gradle.kts)
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.parcelize)
}
android {
compileSdk = libs.versions.compileSdk.get().toInt()
namespace = "com.doverunner.advencedsample"
// ...
}
dependencies {
// Replace <VERSION> with the actual release (e.g., 4.5.0)
implementation("com.doverunner:widevine:<VERSION>")
// ...
}
4) Gradle Sync and Build
Run Sync → Build.
Once configured correctly, Gradle will authenticate to GitHub Packages, resolve the package, and complete the build.
Expected Result
Gradle Sync/Build completes successfully.
Gradle logs show messages for
GitHubPackagesaccess and artifact resolution.(For the Advanced Sample) The app builds and runs successfully after these steps.
Possible Issues and Resolutions
-
401 Unauthorized / Authentication failed
Cause: Expired/invalid PAT, missing
read:packagesscope, or unapproved organization SSO.Resolution: Reissue PAT, verify scopes, approve organization SSO, and retry.
-
403 Forbidden / 404 Not Found
Cause: Repository or package access denied, or incorrect URL.
Resolution: Verify
https://maven.pkg.github.com/doverunner/widevine-android-sdk
and request repository access if necessary.
-
Could not resolve artifact / Could not GET
Cause: Proxy/firewall restrictions, or Gradle cache issues.
Resolution: Configure proxy, run with
--refresh-dependencies, and clear Gradle cache.
References
QuickStart.md (Included in the SDK)
DoveRunner Docs - Widevine Android SDK Guide
https://docs.doverunner.com/content-security/multi-drm/clients/widevine-android/GitHub Docs — Personal Access Tokens (classic)
https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens