mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-05 16:49:04 +00:00
Move stub.kt to main game module
This commit is contained in:
@@ -16,6 +16,14 @@ ext.pluginsDir = "$projectDir/src/plugins"
|
|||||||
apply plugin: 'kotlin'
|
apply plugin: 'kotlin'
|
||||||
apply from: 'plugins.gradle'
|
apply from: 'plugins.gradle'
|
||||||
|
|
||||||
|
sourceSets {
|
||||||
|
main {
|
||||||
|
kotlin {
|
||||||
|
exclude 'stub.kt'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile project(':cache')
|
compile project(':cache')
|
||||||
compile project(':net')
|
compile project(':net')
|
||||||
|
|||||||
@@ -15,19 +15,6 @@ buildscript {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
|
||||||
pluginStub {
|
|
||||||
kotlin {
|
|
||||||
srcDir "$pluginsDir/stub"
|
|
||||||
exclude 'stub.kt'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
pluginStubCompile(project(":game"))
|
|
||||||
}
|
|
||||||
|
|
||||||
task pluginTests {
|
task pluginTests {
|
||||||
group = "plugin-verification"
|
group = "plugin-verification"
|
||||||
|
|
||||||
@@ -73,7 +60,6 @@ def configurePluginDependencies(SourceSet mainSources, SourceSet testSources,
|
|||||||
|
|
||||||
dependencies.add(mainConfiguration, configurations.compile)
|
dependencies.add(mainConfiguration, configurations.compile)
|
||||||
dependencies.add(mainConfiguration, sourceSets.main.output)
|
dependencies.add(mainConfiguration, sourceSets.main.output)
|
||||||
dependencies.add(mainConfiguration, sourceSets.pluginStub.output)
|
|
||||||
|
|
||||||
dependencies.add(testConfiguration, mainSources.output)
|
dependencies.add(testConfiguration, mainSources.output)
|
||||||
dependencies.add(testConfiguration, configurations.testCompile)
|
dependencies.add(testConfiguration, configurations.testCompile)
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
/**
|
||||||
|
* NOTE: This file is a stub, intended only for use within an IDE. It should be updated
|
||||||
|
* each time [org.apollo.game.plugin.kotlin.KotlinPluginScript] has a new method added to it.
|
||||||
|
*
|
||||||
|
* Until IntelliJ IDEA starts to support ScriptTemplateDefinitions this is
|
||||||
|
* required to resolve references within plugin code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import org.apollo.game.model.World
|
||||||
|
import org.apollo.game.plugin.PluginContext
|
||||||
|
import org.apollo.game.plugin.kotlin.*
|
||||||
|
import org.apollo.net.message.Message
|
||||||
|
import kotlin.reflect.KClass
|
||||||
|
|
||||||
|
fun <T : Message> on(type: () -> KClass<T>): KotlinMessageHandler<T> {
|
||||||
|
null!!
|
||||||
|
}
|
||||||
|
|
||||||
|
fun start(callback: (World) -> Unit) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
fun stop(callback: (World) -> Unit) {
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user