1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-26 16:28:12 -07:00
This commit is contained in:
Cedric Beust 2016-04-25 22:10:59 -08:00
parent a6cb4c3314
commit d02def081a
5 changed files with 8 additions and 8 deletions

View file

@ -4,7 +4,7 @@ interface IPluginActor {
/** /**
* Clean up any state that your actor might have saved so it can be run again. * Clean up any state that your actor might have saved so it can be run again.
*/ */
fun shutdownActors() {} fun cleanUpActors() {}
} }
interface IContributor : IPluginActor interface IContributor : IPluginActor

View file

@ -229,7 +229,7 @@ open class JvmCompilerPlugin @Inject constructor(
// IProjectContributor // IProjectContributor
override fun projects() = allProjects override fun projects() = allProjects
override fun shutdownActors() { override fun cleanUpActors() {
allProjects.clear() allProjects.clear()
} }

View file

@ -168,7 +168,7 @@ class PluginInfo(val xml: KobaltPluginXml, val classLoader: ClassLoader?) {
} }
} }
fun shutdown() { fun cleanUp() {
listOf(projectContributors, classpathContributors, initContributors, listOf(projectContributors, classpathContributors, initContributors,
repoContributors, compilerFlagContributors, compilerInterceptors, repoContributors, compilerFlagContributors, compilerInterceptors,
sourceDirectoriesInterceptors, buildDirectoryInterceptors, sourceDirectoriesInterceptors, buildDirectoryInterceptors,
@ -179,7 +179,7 @@ class PluginInfo(val xml: KobaltPluginXml, val classLoader: ClassLoader?) {
incrementalAssemblyContributors incrementalAssemblyContributors
).forEach { ).forEach {
it.forEach { it.forEach {
it.shutdownActors() it.cleanUpActors()
} }
} }
} }

View file

@ -343,7 +343,7 @@ class TaskManager @Inject constructor(val args: Args,
/** /**
* Invoked by the server whenever it's done processing a command so the state can be reset for the next command. * Invoked by the server whenever it's done processing a command so the state can be reset for the next command.
*/ */
private fun cleanUp() { fun cleanUp() {
annotationTasks.clear() annotationTasks.clear()
dynamicTasks.clear() dynamicTasks.clear()
taskAnnotations.clear() taskAnnotations.clear()

View file

@ -45,7 +45,7 @@ fun mainNoExit(argv: Array<String>): Int {
Kobalt.init(MainModule(args, KobaltSettings.readSettingsXml())) Kobalt.init(MainModule(args, KobaltSettings.readSettingsXml()))
val result = Kobalt.INJECTOR.getInstance(Main::class.java).run { val result = Kobalt.INJECTOR.getInstance(Main::class.java).run {
val runResult = run(jc, args, argv) val runResult = run(jc, args, argv)
pluginInfo.shutdown() pluginInfo.cleanUp()
executors.shutdown() executors.shutdown()
runResult runResult
} }
@ -221,8 +221,8 @@ private class Main @Inject constructor(
} }
private fun cleanUp() { private fun cleanUp() {
pluginInfo.shutdown() pluginInfo.cleanUp()
taskManager.shutdown() taskManager.cleanUp()
} }
private fun initForBuildFile(buildFile: BuildFile, args: Args): List<Project> { private fun initForBuildFile(buildFile: BuildFile, args: Args): List<Project> {