Add IntelliJ run configurations
This commit is contained in:
parent
63b676f062
commit
c4b4465d51
5 changed files with 63 additions and 6 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -1,9 +1,6 @@
|
||||||
.gradle/
|
.gradle/
|
||||||
build/
|
build/
|
||||||
!src/**/build
|
!src/**/build
|
||||||
|
|
||||||
/serverData/
|
|
||||||
|
|
||||||
/buildSrcTemp/
|
/buildSrcTemp/
|
||||||
|
/serverData/
|
||||||
generatedKotlin/
|
generatedKotlin/
|
||||||
|
|
21
.runConfigurations/Clean.run.xml
Normal file
21
.runConfigurations/Clean.run.xml
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="Clean" type="GradleRunConfiguration" factoryName="Gradle">
|
||||||
|
<ExternalSystemSettings>
|
||||||
|
<option name="executionName" />
|
||||||
|
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||||
|
<option name="externalSystemIdString" value="GRADLE" />
|
||||||
|
<option name="scriptParameters" value="" />
|
||||||
|
<option name="taskDescriptions">
|
||||||
|
<list />
|
||||||
|
</option>
|
||||||
|
<option name="taskNames">
|
||||||
|
<list>
|
||||||
|
<option value="clean" />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
<option name="vmOptions" value="" />
|
||||||
|
</ExternalSystemSettings>
|
||||||
|
<GradleScriptDebugEnabled>true</GradleScriptDebugEnabled>
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
</component>
|
21
.runConfigurations/Generate.run.xml
Normal file
21
.runConfigurations/Generate.run.xml
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="Generate" type="GradleRunConfiguration" factoryName="Gradle">
|
||||||
|
<ExternalSystemSettings>
|
||||||
|
<option name="executionName" />
|
||||||
|
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||||
|
<option name="externalSystemIdString" value="GRADLE" />
|
||||||
|
<option name="scriptParameters" value="" />
|
||||||
|
<option name="taskDescriptions">
|
||||||
|
<list />
|
||||||
|
</option>
|
||||||
|
<option name="taskNames">
|
||||||
|
<list>
|
||||||
|
<option value="generate" />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
<option name="vmOptions" value="" />
|
||||||
|
</ExternalSystemSettings>
|
||||||
|
<GradleScriptDebugEnabled>true</GradleScriptDebugEnabled>
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
</component>
|
15
.runConfigurations/Run.run.xml
Normal file
15
.runConfigurations/Run.run.xml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="Run" type="JetRunConfigurationType">
|
||||||
|
<module name="blokk.blokk-server.main" />
|
||||||
|
<option name="VM_PARAMETERS" value="" />
|
||||||
|
<option name="PROGRAM_PARAMETERS" value="" />
|
||||||
|
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
|
||||||
|
<option name="ALTERNATIVE_JRE_PATH" />
|
||||||
|
<option name="PASS_PARENT_ENVS" value="true" />
|
||||||
|
<option name="MAIN_CLASS_NAME" value="space.blokk.BlokkServer" />
|
||||||
|
<option name="WORKING_DIRECTORY" value="" />
|
||||||
|
<method v="2">
|
||||||
|
<option name="Make" enabled="true" />
|
||||||
|
</method>
|
||||||
|
</configuration>
|
||||||
|
</component>
|
|
@ -3,7 +3,8 @@ package space.blokk
|
||||||
import com.sksamuel.hoplite.ConfigFilePropertySource
|
import com.sksamuel.hoplite.ConfigFilePropertySource
|
||||||
import com.sksamuel.hoplite.ConfigLoader
|
import com.sksamuel.hoplite.ConfigLoader
|
||||||
import com.sksamuel.hoplite.ConfigSource
|
import com.sksamuel.hoplite.ConfigSource
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.cancel
|
||||||
|
import kotlinx.coroutines.runBlocking
|
||||||
import space.blokk.config.BlokkConfig
|
import space.blokk.config.BlokkConfig
|
||||||
import space.blokk.event.EventBus
|
import space.blokk.event.EventBus
|
||||||
import space.blokk.event.EventTargetGroup
|
import space.blokk.event.EventTargetGroup
|
||||||
|
@ -93,7 +94,9 @@ class BlokkServer internal constructor() : Server {
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun shutdown() {
|
override fun shutdown() {
|
||||||
scope.launch {
|
scope.cancel("Shutdown")
|
||||||
|
|
||||||
|
runBlocking {
|
||||||
scheduler.shutdown()
|
scheduler.shutdown()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue