Skip to content

Commit

Permalink
Support different SDK flavors
Browse files Browse the repository at this point in the history
  • Loading branch information
nielsvanvelzen committed Jun 29, 2021
1 parent d235f68 commit 1385cfb
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 9 deletions.
15 changes: 10 additions & 5 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,18 @@ val versionTxt by tasks.registering {
}

dependencies {
// Jellyfin
// Jellyfin apiclient
implementation("com.github.jellyfin.jellyfin-sdk-kotlin:android:v0.7.10")
val sdkVersion = when (getProperty("sdk.useSnapshot")?.toBoolean()) {
true -> "master-SNAPSHOT"
else -> "1.0.0-beta.8"
// Jellyfin SDK
val sdkVersion = findProperty("sdk.version")?.toString()
implementation("org.jellyfin.sdk:jellyfin-platform-android:1.0.0-beta.8") {
// Change version if desired
when (sdkVersion) {
"local" -> version { strictly("latest-SNAPSHOT") }
"snapshot" -> version { strictly("master-SNAPSHOT") }
"unstable-snapshot" -> version { strictly("openapi-unstable-SNAPSHOT") }
}
}
implementation("org.jellyfin.sdk:jellyfin-platform-android:$sdkVersion")

// Kotlin
val kotlinxCoroutinesVersion = "1.4.3"
Expand Down
11 changes: 9 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,19 @@ allprojects {
repositories {
mavenCentral()
google()
// Jellyfin SDK
mavenLocal {
content {
includeVersionByRegex("org.jellyfin.sdk", ".*", "latest-SNAPSHOT")
}
}
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/") {
content {
// Only allow SDK snapshots
includeVersionByRegex("org\\.jellyfin\\.sdk", ".*", ".*-SNAPSHOT")
includeVersionByRegex("org.jellyfin.sdk", ".*", "master-SNAPSHOT")
includeVersionByRegex("org.jellyfin.sdk", ".*", "openapi-unstable-SNAPSHOT")
}
}
// Jellyfin apiclient
maven("https://jitpack.io") {
content {
// Only allow legacy apiclient
Expand Down
8 changes: 6 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# Gradle
org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m

# Jellyfin SDK
sdk.useSnapshot=false
# Allow switching between flavors of the Jellyfin SDK. Possible values are:
# - "default"
# - "local" (local Maven repository)
# - "snapshot" (SDK master)
# - "unstable-snapshot" (SDK with unstable Jellyfin API)
sdk.version=default

# Kotlin
kotlin.version=1.5.0
Expand Down

0 comments on commit 1385cfb

Please sign in to comment.