mirror of
https://github.com/BrenBroZAYT/gameyfin.git
synced 2026-06-17 00:30:04 +00:00
Got 3rd party dependencies working in development mode
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
group = "de.grimsi"
|
||||
val pluginDir: File by rootProject.extra
|
||||
val appMainClass = "de.grimsi.gameyfin.GameyfinApplication"
|
||||
|
||||
plugins {
|
||||
@@ -86,31 +85,6 @@ dependencyManagement {
|
||||
}
|
||||
}
|
||||
|
||||
tasks.named<JavaExec>("run") {
|
||||
systemProperty("pf4j.pluginsDir", pluginDir.absolutePath)
|
||||
}
|
||||
|
||||
tasks.register<Jar>("uberJar") {
|
||||
dependsOn(tasks.named("compileKotlin"))
|
||||
archiveClassifier.set("uber")
|
||||
|
||||
from(sourceSets.main.get().output)
|
||||
|
||||
dependsOn(configurations.runtimeClasspath)
|
||||
from({
|
||||
configurations.runtimeClasspath.get().filter { it.name.endsWith("jar") }.map { zipTree(it) }
|
||||
})
|
||||
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
isZip64 = true
|
||||
|
||||
manifest {
|
||||
attributes["Main-Class"] = appMainClass
|
||||
}
|
||||
|
||||
archiveBaseName.set(project.name)
|
||||
}
|
||||
|
||||
tasks.withType<Test> {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
@@ -10,10 +10,10 @@ import java.nio.file.Path
|
||||
@Configuration
|
||||
class PluginManagerConfig {
|
||||
private val log = KotlinLogging.logger {}
|
||||
private val pluginPath = Path.of("plugins")
|
||||
private val pluginPath = System.getProperty("pf4j.pluginsDir", "plugins")
|
||||
|
||||
@Bean
|
||||
fun pluginManager() = SpringDevtoolsPluginManager(pluginPath)
|
||||
fun pluginManager() = SpringDevtoolsPluginManager(Path.of(pluginPath))
|
||||
|
||||
@EventListener(ApplicationReadyEvent::class)
|
||||
fun loadedPlugins() {
|
||||
|
||||
@@ -48,7 +48,7 @@ class AsyncFileTailer(
|
||||
tailer.run()
|
||||
}
|
||||
|
||||
log.info { "Started tailing the file: ${file.name}" }
|
||||
log.debug { "Started tailing the file: ${file.name}" }
|
||||
} else {
|
||||
log.error { "File tailing for file ${file.name} is already running!" }
|
||||
}
|
||||
@@ -58,7 +58,7 @@ class AsyncFileTailer(
|
||||
tailerJob?.let {
|
||||
it.cancel()
|
||||
tailerJob = null
|
||||
log.info { "Stopped tailing the file: ${file.name}" }
|
||||
log.debug { "Stopped tailing the file: ${file.name}" }
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user