Got 3rd party dependencies working in development mode

This commit is contained in:
grimsi
2024-10-30 14:10:51 +01:00
parent 0563f2b366
commit 1bb46e3a71
15 changed files with 104 additions and 71 deletions
+3 -1
View File
@@ -10,7 +10,9 @@ repositories {
dependencies {
// PF4J (shared)
api("org.pf4j:pf4j:${rootProject.extra["pf4jVersion"]}")
api("org.pf4j:pf4j:${rootProject.extra["pf4jVersion"]}") {
exclude(group = "org.slf4j")
}
implementation(kotlin("stdlib"))
@@ -0,0 +1,5 @@
package de.grimsi.gameyfin.pluginapi.core
import org.pf4j.Plugin
abstract class GameyfinPlugin(protected val context: PluginContext) : Plugin()
@@ -0,0 +1,3 @@
package de.grimsi.gameyfin.pluginapi.core
class PluginConfigError(message: String) : RuntimeException(message)
@@ -0,0 +1,9 @@
package de.grimsi.gameyfin.pluginapi.core
import org.pf4j.RuntimeMode
class PluginContext(private val runtimeMode: RuntimeMode) {
fun getRuntimeMode(): RuntimeMode {
return runtimeMode
}
}
@@ -3,7 +3,5 @@ package de.grimsi.gameyfin.pluginapi.gamemetadata
import org.pf4j.ExtensionPoint
interface GameMetadataFetcher : ExtensionPoint {
fun getConfig(): Map<String, String>
fun setConfig(config: Map<String, String>)
fun fetchMetadata(gameId: String): GameMetadata
}