Use type-safe project dependencies

This commit is contained in:
Niels van Velzen 2021-04-10 10:22:22 +02:00
parent 5a4edfab8b
commit 711482cd44
6 changed files with 7 additions and 19 deletions

View File

@ -80,17 +80,3 @@ object Dependencies {
const val nexusPublishPluginVersion = "1.0.0"
const val dokkaVersion = "1.4.30"
}
/**
* Add given project as api
*/
fun DependencyHandler.apiProject(path: String) {
add("api", project(path))
}
/**
* Add given project as implementation
*/
fun DependencyHandler.implementationProject(path: String) {
add("implementation", project(path))
}

View File

@ -3,7 +3,7 @@ plugins {
}
dependencies {
implementationProject(":jellyfin-model")
implementation(projects.jellyfinModel)
// HTTP
implementation(Dependencies.KotlinX.coroutinesCore)

View File

@ -3,8 +3,8 @@ plugins {
}
dependencies {
apiProject(":jellyfin-api")
apiProject(":jellyfin-model")
api(projects.jellyfinApi)
api(projects.jellyfinModel)
implementation(Dependencies.KotlinX.coroutinesCore)
implementation(Dependencies.KotlinX.serializationJson)

View File

@ -69,7 +69,7 @@ afterEvaluate {
}
dependencies {
apiProject(":jellyfin-core")
api(projects.jellyfinCore)
implementation(Dependencies.Kotlin.stdlib)

View File

@ -9,7 +9,7 @@ application {
dependencies {
// Depend on the library project
implementationProject(":jellyfin-core")
implementation(projects.jellyfinCore)
// Use Kotlin stdlib
implementation(Dependencies.Kotlin.stdlib)

View File

@ -1,3 +1,5 @@
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
// Core
include(":jellyfin-core")
include(":jellyfin-model")