mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 08:27:12 -07:00
Introducing IIncrementalAssemblyContributor.
This commit is contained in:
parent
b3aab95852
commit
9218a8c7a6
3 changed files with 48 additions and 1 deletions
|
@ -0,0 +1,12 @@
|
|||
package com.beust.kobalt.api
|
||||
|
||||
import com.beust.kobalt.IncrementalTaskInfo
|
||||
|
||||
/**
|
||||
* Plug-ins that will be invoked during the "assemble" task and wish to return an incremental task instead
|
||||
* of a regular one.
|
||||
*/
|
||||
interface IIncrementalAssemblyContributor {
|
||||
fun assemble(project: Project, context: KobaltContext) : IncrementalTaskInfo
|
||||
}
|
||||
|
|
@ -74,6 +74,7 @@ class PluginInfo(val xml: KobaltPluginXml, val classLoader: ClassLoader?) {
|
|||
val buildConfigFieldContributors = arrayListOf<IBuildConfigFieldContributor>()
|
||||
val taskContributors = arrayListOf<ITaskContributor>()
|
||||
val assemblyContributors = arrayListOf<IAssemblyContributor>()
|
||||
val incrementalAssemblyContributors = arrayListOf<IIncrementalAssemblyContributor>()
|
||||
|
||||
// Not documented yet
|
||||
val buildConfigContributors = arrayListOf<IBuildConfigContributor>()
|
||||
|
@ -160,6 +161,7 @@ class PluginInfo(val xml: KobaltPluginXml, val classLoader: ClassLoader?) {
|
|||
if (this is ITestSourceDirectoryContributor) testSourceDirContributors.add(this)
|
||||
if (this is IBuildConfigContributor) buildConfigContributors.add(this)
|
||||
if (this is IAssemblyContributor) assemblyContributors.add(this)
|
||||
if (this is IIncrementalAssemblyContributor) incrementalAssemblyContributors.add(this)
|
||||
|
||||
// Not documented yet
|
||||
}
|
||||
|
@ -193,6 +195,7 @@ class PluginInfo(val xml: KobaltPluginXml, val classLoader: ClassLoader?) {
|
|||
mavenIdInterceptors.addAll(pluginInfo.mavenIdInterceptors)
|
||||
buildConfigContributors.addAll(pluginInfo.buildConfigContributors)
|
||||
assemblyContributors.addAll(pluginInfo.assemblyContributors)
|
||||
incrementalAssemblyContributors.addAll(pluginInfo.incrementalAssemblyContributors)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue