1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-26 08:27:12 -07:00

Rename to IRunnerContributor.

This commit is contained in:
Cedric Beust 2015-11-28 06:03:15 -08:00
parent dfa429336b
commit 6630f55197
4 changed files with 7 additions and 7 deletions

View file

@ -5,7 +5,7 @@ import com.beust.kobalt.TaskResult
/**
* Plugins that can run a project (task "run") should implement this interface.
*/
interface IRunContributor : IContributor {
interface IRunnerContributor : IContributor {
companion object {
/**
* The recommended default affinity if your plug-in can run this project. Use a higher

View file

@ -91,7 +91,7 @@ class PluginInfo(val xml: KobaltPluginXml, val classLoader: ClassLoader?) {
val compilerInterceptors = arrayListOf<ICompilerInterceptor>()
val sourceDirectoriesInterceptors = arrayListOf<ISourceDirectoriesIncerceptor>()
val buildDirectoryInterceptors = arrayListOf<IBuildDirectoryIncerceptor>()
val runContributors = arrayListOf<IRunContributor>()
val runContributors = arrayListOf<IRunnerContributor>()
// Future contributors:
// source files
@ -166,7 +166,7 @@ class PluginInfo(val xml: KobaltPluginXml, val classLoader: ClassLoader?) {
buildDirectoryInterceptors.add(factory.instanceOf(forName(it)) as IBuildDirectoryIncerceptor)
}
xml.runContributors?.className?.forEach {
runContributors.add(factory.instanceOf(forName(it)) as IRunContributor)
runContributors.add(factory.instanceOf(forName(it)) as IRunnerContributor)
}
}

View file

@ -26,7 +26,7 @@ import java.nio.file.Paths
@Singleton
public class AndroidPlugin @Inject constructor(val javaCompiler: JavaCompiler, val merger: Merger)
: ConfigPlugin<AndroidConfig>(), IClasspathContributor, IRepoContributor, ICompilerFlagContributor,
ICompilerInterceptor, IBuildDirectoryIncerceptor, IRunContributor {
ICompilerInterceptor, IBuildDirectoryIncerceptor, IRunnerContributor {
companion object {
const val PLUGIN_NAME = "Android"
@ -394,7 +394,7 @@ public class AndroidPlugin @Inject constructor(val javaCompiler: JavaCompiler, v
// IRunContributor
override fun runAffinity(project: Project, context: KobaltContext): Int {
val manifest = AndroidFiles.manifest(project, context)
return if (File(manifest).exists()) IRunContributor.DEFAULT_POSITIVE_AFFINITY else 0
return if (File(manifest).exists()) IRunnerContributor.DEFAULT_POSITIVE_AFFINITY else 0
}
override fun run(project: Project, context: KobaltContext): TaskResult {

View file

@ -33,7 +33,7 @@ fun Project.application(init: ApplicationConfig.() -> Unit) {
@Singleton
class ApplicationPlugin @Inject constructor(val executors: KobaltExecutors,
val dependencyManager: DependencyManager) : ConfigPlugin<ApplicationConfig>(), IRunContributor {
val dependencyManager: DependencyManager) : ConfigPlugin<ApplicationConfig>(), IRunnerContributor {
companion object {
const val PLUGIN_NAME = "Application"
@ -71,7 +71,7 @@ class ApplicationPlugin @Inject constructor(val executors: KobaltExecutors,
// IRunContributor
override fun runAffinity(project: Project, context: KobaltContext): Int {
return if (configurationFor(project) != null) IRunContributor.DEFAULT_POSITIVE_AFFINITY else 0
return if (configurationFor(project) != null) IRunnerContributor.DEFAULT_POSITIVE_AFFINITY else 0
}
override fun run(project: Project, context: KobaltContext): TaskResult {