Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(TESTING) Convert jellyfin-model to Kotlin Multiplatform #187

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
55 changes: 34 additions & 21 deletions jellyfin-model/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,30 +1,43 @@
plugins {
id("kotlin")
id("kotlin-multiplatform")
kotlin("plugin.serialization") version Dependencies.Kotlin.version
}

dependencies {
compileOnly(Dependencies.KotlinX.serializationJson)

// Testing
testImplementation(Dependencies.Kotlin.Test.junit)
testImplementation(Dependencies.KotlinX.serializationJson)
}

kotlin {
explicitApi()
}

sourceSets.getByName("main").java.srcDir("src/main/kotlin-generated")

val sourcesJar by tasks.creating(Jar::class) {
archiveClassifier.set("sources")

from(sourceSets.getByName("main").allSource)
jvm {
withJava()
}

sourceSets {
val commonMain by getting {
kotlin.srcDir("src/commonMain/kotlin-generated")

dependencies {
compileOnly(Dependencies.KotlinX.serializationJson)
}
}

val commonTest by getting {
dependencies {
// Testing
implementation(Dependencies.Kotlin.Test.junit)
implementation(Dependencies.KotlinX.serializationJson)
}
}
}
}

publishing.publications.create<MavenPublication>("default") {
from(components["kotlin"])

artifact(sourcesJar)
}
// TODO
//val sourcesJar by tasks.creating(Jar::class) {
// archiveClassifier.set("sources")
//
// from(sourceSets.getByName("main").allSource)
//}
//
//publishing.publications.create<MavenPublication>("default") {
// from(components["kotlin"])
//
// artifact(sourcesJar)
//}
Loading