mirror of
https://github.com/jellyfin/jellyfin-android.git
synced 2026-09-03 05:10:27 +03:00
Add dependency substitution for the apiclient
Add "enable.dependency.substitution=true" to local.properties to enable
This commit is contained in:
@@ -9,3 +9,23 @@ pluginManagement {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Load properties from local.properties
|
||||
val properties = java.util.Properties().apply {
|
||||
val location = file("local.properties")
|
||||
if (location.exists())
|
||||
load(location.inputStream())
|
||||
}
|
||||
|
||||
// Get value for dependency substitution
|
||||
val enableDependencySubstitution = properties.getProperty("enable.dependency.substitution", "true").equals("true", true)
|
||||
|
||||
// Replace apiclient dependency with local version
|
||||
val apiclientLocation = "../jellyfin-apiclient-java"
|
||||
if (File(apiclientLocation).exists() && enableDependencySubstitution) {
|
||||
includeBuild(apiclientLocation) {
|
||||
dependencySubstitution {
|
||||
substitute(module("org.jellyfin.apiclient:android")).with(project(":android"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user