mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-27 00:38:11 -07:00
Rename to IRunnerContributor.
This commit is contained in:
parent
dfa429336b
commit
6630f55197
4 changed files with 7 additions and 7 deletions
|
@ -5,7 +5,7 @@ import com.beust.kobalt.TaskResult
|
||||||
/**
|
/**
|
||||||
* Plugins that can run a project (task "run") should implement this interface.
|
* Plugins that can run a project (task "run") should implement this interface.
|
||||||
*/
|
*/
|
||||||
interface IRunContributor : IContributor {
|
interface IRunnerContributor : IContributor {
|
||||||
companion object {
|
companion object {
|
||||||
/**
|
/**
|
||||||
* The recommended default affinity if your plug-in can run this project. Use a higher
|
* The recommended default affinity if your plug-in can run this project. Use a higher
|
|
@ -91,7 +91,7 @@ class PluginInfo(val xml: KobaltPluginXml, val classLoader: ClassLoader?) {
|
||||||
val compilerInterceptors = arrayListOf<ICompilerInterceptor>()
|
val compilerInterceptors = arrayListOf<ICompilerInterceptor>()
|
||||||
val sourceDirectoriesInterceptors = arrayListOf<ISourceDirectoriesIncerceptor>()
|
val sourceDirectoriesInterceptors = arrayListOf<ISourceDirectoriesIncerceptor>()
|
||||||
val buildDirectoryInterceptors = arrayListOf<IBuildDirectoryIncerceptor>()
|
val buildDirectoryInterceptors = arrayListOf<IBuildDirectoryIncerceptor>()
|
||||||
val runContributors = arrayListOf<IRunContributor>()
|
val runContributors = arrayListOf<IRunnerContributor>()
|
||||||
|
|
||||||
// Future contributors:
|
// Future contributors:
|
||||||
// source files
|
// source files
|
||||||
|
@ -166,7 +166,7 @@ class PluginInfo(val xml: KobaltPluginXml, val classLoader: ClassLoader?) {
|
||||||
buildDirectoryInterceptors.add(factory.instanceOf(forName(it)) as IBuildDirectoryIncerceptor)
|
buildDirectoryInterceptors.add(factory.instanceOf(forName(it)) as IBuildDirectoryIncerceptor)
|
||||||
}
|
}
|
||||||
xml.runContributors?.className?.forEach {
|
xml.runContributors?.className?.forEach {
|
||||||
runContributors.add(factory.instanceOf(forName(it)) as IRunContributor)
|
runContributors.add(factory.instanceOf(forName(it)) as IRunnerContributor)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ import java.nio.file.Paths
|
||||||
@Singleton
|
@Singleton
|
||||||
public class AndroidPlugin @Inject constructor(val javaCompiler: JavaCompiler, val merger: Merger)
|
public class AndroidPlugin @Inject constructor(val javaCompiler: JavaCompiler, val merger: Merger)
|
||||||
: ConfigPlugin<AndroidConfig>(), IClasspathContributor, IRepoContributor, ICompilerFlagContributor,
|
: ConfigPlugin<AndroidConfig>(), IClasspathContributor, IRepoContributor, ICompilerFlagContributor,
|
||||||
ICompilerInterceptor, IBuildDirectoryIncerceptor, IRunContributor {
|
ICompilerInterceptor, IBuildDirectoryIncerceptor, IRunnerContributor {
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
const val PLUGIN_NAME = "Android"
|
const val PLUGIN_NAME = "Android"
|
||||||
|
@ -394,7 +394,7 @@ public class AndroidPlugin @Inject constructor(val javaCompiler: JavaCompiler, v
|
||||||
// IRunContributor
|
// IRunContributor
|
||||||
override fun runAffinity(project: Project, context: KobaltContext): Int {
|
override fun runAffinity(project: Project, context: KobaltContext): Int {
|
||||||
val manifest = AndroidFiles.manifest(project, context)
|
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 {
|
override fun run(project: Project, context: KobaltContext): TaskResult {
|
||||||
|
|
|
@ -33,7 +33,7 @@ fun Project.application(init: ApplicationConfig.() -> Unit) {
|
||||||
|
|
||||||
@Singleton
|
@Singleton
|
||||||
class ApplicationPlugin @Inject constructor(val executors: KobaltExecutors,
|
class ApplicationPlugin @Inject constructor(val executors: KobaltExecutors,
|
||||||
val dependencyManager: DependencyManager) : ConfigPlugin<ApplicationConfig>(), IRunContributor {
|
val dependencyManager: DependencyManager) : ConfigPlugin<ApplicationConfig>(), IRunnerContributor {
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
const val PLUGIN_NAME = "Application"
|
const val PLUGIN_NAME = "Application"
|
||||||
|
@ -71,7 +71,7 @@ class ApplicationPlugin @Inject constructor(val executors: KobaltExecutors,
|
||||||
// IRunContributor
|
// IRunContributor
|
||||||
|
|
||||||
override fun runAffinity(project: Project, context: KobaltContext): Int {
|
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 {
|
override fun run(project: Project, context: KobaltContext): TaskResult {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue