mirror of
https://github.com/BrenBroZAYT/gameyfin.git
synced 2026-06-16 00:30:02 +00:00
Further work and debugging on plugin integration
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
val pluginDir: File by rootProject.extra
|
||||
|
||||
plugins {
|
||||
kotlin("jvm")
|
||||
}
|
||||
|
||||
subprojects {
|
||||
apply(plugin = "org.jetbrains.kotlin.jvm")
|
||||
|
||||
dependencies {
|
||||
implementation(project(":plugin-api"))
|
||||
}
|
||||
|
||||
tasks.register<Jar>("plugin") {
|
||||
archiveBaseName.set("plugin-${project.name}")
|
||||
|
||||
// first taking the classes generated by the jar task
|
||||
into("classes") {
|
||||
with(tasks.named<Jar>("jar").get())
|
||||
}
|
||||
// and then we also need to include any libraries that are needed by the plugin
|
||||
dependsOn(configurations.runtimeClasspath)
|
||||
into("lib") {
|
||||
from({
|
||||
configurations.runtimeClasspath.get().filter { it.name.endsWith("jar") }
|
||||
})
|
||||
}
|
||||
archiveExtension.set("jar")
|
||||
}
|
||||
|
||||
tasks.register<Copy>("assemblePlugin") {
|
||||
from(project.tasks.named("plugin"))
|
||||
into(pluginDir)
|
||||
}
|
||||
|
||||
tasks.jar {
|
||||
manifest {
|
||||
from("./src/main/resources/MANIFEST.MF")
|
||||
}
|
||||
}
|
||||
|
||||
tasks.named("build") {
|
||||
dependsOn(tasks.named("plugin"))
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register<Copy>("assemblePlugins") {
|
||||
dependsOn(subprojects.map { it.tasks.named("assemblePlugin") })
|
||||
}
|
||||
|
||||
tasks {
|
||||
"build" {
|
||||
dependsOn(named("assemblePlugins"))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user