mirror of
https://github.com/jellyfin/jellyfin-android.git
synced 2026-09-02 21:04:10 +03:00
Add snapshot repository for Jellyfin SDK (#374)
* Add snapshot repository for Jellyfin SDK * Use maven repo shorthand
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import com.android.build.gradle.options.parseBoolean
|
||||
import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask
|
||||
import com.github.benmanes.gradle.versions.updates.gradle.GradleReleaseChannel
|
||||
import io.gitlab.arturbosch.detekt.Detekt
|
||||
@@ -126,7 +127,14 @@ dependencies {
|
||||
kapt(Dependencies.Room.compiler)
|
||||
|
||||
// Network
|
||||
implementation(Dependencies.Network.jellyfinSdk)
|
||||
val useSdkSnapshot: String by project
|
||||
implementation(Dependencies.Network.jellyfinSdk) {
|
||||
version {
|
||||
if (parseBoolean("useSdkSnapshot", useSdkSnapshot)) {
|
||||
strictly(Dependencies.Versions.jellyfinSdkSnapshot)
|
||||
}
|
||||
}
|
||||
}
|
||||
implementation(Dependencies.Network.okHttp)
|
||||
implementation(Dependencies.Network.coil)
|
||||
implementation(Dependencies.Network.exoPlayerHLS)
|
||||
|
||||
@@ -17,6 +17,11 @@ allprojects {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
google()
|
||||
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/") {
|
||||
content {
|
||||
includeGroup(Dependencies.Groups.jellyfin)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ object Dependencies {
|
||||
|
||||
// Network
|
||||
const val jellyfinSdk = "1.0.0-beta.4"
|
||||
const val jellyfinSdkSnapshot = "latest-SNAPSHOT"
|
||||
const val okHttp = "4.9.1"
|
||||
const val coil = "1.1.1"
|
||||
|
||||
@@ -51,6 +52,10 @@ object Dependencies {
|
||||
const val androidDesugarLibs = "1.1.5"
|
||||
}
|
||||
|
||||
object Groups {
|
||||
const val jellyfin = "org.jellyfin.sdk"
|
||||
}
|
||||
|
||||
object Kotlin {
|
||||
val coroutinesCore = kotlinx("coroutines-core", Versions.coroutines)
|
||||
val coroutinesAndroid = kotlinx("coroutines-android", Versions.coroutines)
|
||||
@@ -89,7 +94,7 @@ object Dependencies {
|
||||
}
|
||||
|
||||
object Network {
|
||||
const val jellyfinSdk = "org.jellyfin.sdk:jellyfin-platform-android:${Versions.jellyfinSdk}"
|
||||
const val jellyfinSdk = "${Groups.jellyfin}:jellyfin-platform-android:${Versions.jellyfinSdk}"
|
||||
const val okHttp = "com.squareup.okhttp3:okhttp:${Versions.okHttp}"
|
||||
const val coil = "io.coil-kt:coil-base:${Versions.coil}"
|
||||
val exoPlayerHLS = exoPlayer("hls")
|
||||
|
||||
@@ -20,3 +20,5 @@ android.enableJetifier=true
|
||||
kotlin.code.style=official
|
||||
# Kotlin version for this project
|
||||
kotlinVersion=1.5.0
|
||||
# Use snapshot release of Jellyfin SDK
|
||||
useSdkSnapshot=false
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import java.util.*
|
||||
|
||||
include(":app")
|
||||
|
||||
pluginManagement {
|
||||
@@ -11,24 +9,3 @@ pluginManagement {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Load properties from local.properties
|
||||
val properties = Properties().apply {
|
||||
val propFile = File("local.properties")
|
||||
if (propFile.exists()) {
|
||||
load(propFile.inputStream())
|
||||
}
|
||||
}
|
||||
|
||||
// Check if dependency substitution is enabled
|
||||
val enableDependencySubstitution = properties.getProperty("enable.dependency.substitution", "true").equals("true", true)
|
||||
|
||||
// Replace SDK dependency with local version
|
||||
val sdkLocation = "../jellyfin-sdk-kotlin"
|
||||
if (File(sdkLocation).exists() && enableDependencySubstitution) {
|
||||
includeBuild(sdkLocation) {
|
||||
dependencySubstitution {
|
||||
substitute(module("org.jellyfin.sdk:jellyfin-platform-android")).with(project(":jellyfin-platform-android"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user