[Android] Add the open subtitles API key from the gradle properties
Nicolas Pomepuy
git at videolan.org
Thu Nov 21 13:19:10 UTC 2024
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Wed Oct 30 08:12:20 2024 +0100| [072d5fc30d46ecbef0362f8b67b82d8650308feb] | committer: Duncan McNamara
Add the open subtitles API key from the gradle properties
> https://code.videolan.org/videolan/vlc-android/commit/072d5fc30d46ecbef0362f8b67b82d8650308feb
---
application/resources/build.gradle | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/application/resources/build.gradle b/application/resources/build.gradle
index 44b0486296..bfb8f1f074 100644
--- a/application/resources/build.gradle
+++ b/application/resources/build.gradle
@@ -15,6 +15,7 @@ android {
compileSdk rootProject.ext.compileSdkVersion
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
buildConfigField "String", "APP_ID", "\"${rootProject.ext.appId}\""
+ buildConfigField 'String', 'VLC_OPEN_SUBTITLES_API_KEY', "\"${getOSApiKey(project)}\""
vectorDrawables.useSupportLibrary = true
}
@@ -53,6 +54,11 @@ android {
}
}
+
+static def getOSApiKey(project) {
+ return System.getenv('VLC_OPEN_SUBTITLES_API_KEY') ?: project.properties['vlc_open_subtitles_api_key'] ?: ""
+}
+
dependencies {
api "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
api 'androidx.multidex:multidex:2.0.1'
More information about the Android
mailing list