mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-27 00:38:11 -07:00
Refactor to enable multiple test{} configs.
This commit is contained in:
parent
596c6859d9
commit
32b0d12770
10 changed files with 57 additions and 39 deletions
|
@ -34,9 +34,10 @@ fun Project.application(init: ApplicationConfig.() -> Unit) {
|
|||
}
|
||||
|
||||
@Singleton
|
||||
class ApplicationPlugin @Inject constructor(val executors: KobaltExecutors,
|
||||
class ApplicationPlugin @Inject constructor(val configActor: ConfigActor<ApplicationConfig>,
|
||||
val executors: KobaltExecutors,
|
||||
val dependencyManager: DependencyManager, val taskContributor : TaskContributor)
|
||||
: ConfigPlugin<ApplicationConfig>(), IRunnerContributor, ITaskContributor {
|
||||
: BasePlugin(), IRunnerContributor, ITaskContributor, IConfigActor<ApplicationConfig> by configActor {
|
||||
|
||||
companion object {
|
||||
const val PLUGIN_NAME = "Application"
|
||||
|
|
|
@ -18,8 +18,8 @@ import javax.inject.Singleton
|
|||
* (outputDir, etc...).
|
||||
*/
|
||||
@Singleton
|
||||
public class AptPlugin @Inject constructor(val depFactory: DepFactory)
|
||||
: ConfigPlugin<AptConfig>(), ICompilerFlagContributor, ISourceDirectoryContributor {
|
||||
class AptPlugin @Inject constructor(val depFactory: DepFactory, val configActor: ConfigActor<AptConfig>)
|
||||
: BasePlugin(), ICompilerFlagContributor, ISourceDirectoryContributor, IConfigActor<AptConfig> by configActor {
|
||||
|
||||
// ISourceDirectoryContributor
|
||||
|
||||
|
|
|
@ -13,9 +13,9 @@ import javax.inject.Inject
|
|||
import javax.inject.Singleton
|
||||
|
||||
@Singleton
|
||||
class JavaPlugin @Inject constructor(val javaCompiler: JavaCompiler)
|
||||
: BaseJvmPlugin<JavaConfig>(), IDocContributor, ICompilerContributor, ITestSourceDirectoryContributor,
|
||||
IBuildConfigContributor {
|
||||
class JavaPlugin @Inject constructor(val javaCompiler: JavaCompiler, override val configActor: ConfigActor<JavaConfig>)
|
||||
: BaseJvmPlugin<JavaConfig>(configActor), IDocContributor, ICompilerContributor,
|
||||
ITestSourceDirectoryContributor, IBuildConfigContributor {
|
||||
companion object {
|
||||
const val PLUGIN_NAME = "Java"
|
||||
}
|
||||
|
|
|
@ -17,8 +17,9 @@ import javax.inject.Inject
|
|||
import javax.inject.Singleton
|
||||
|
||||
@Singleton
|
||||
class KotlinPlugin @Inject constructor(val executors: KobaltExecutors)
|
||||
: BaseJvmPlugin<KotlinConfig>(), IDocContributor, IClasspathContributor, ICompilerContributor,
|
||||
class KotlinPlugin @Inject constructor(val executors: KobaltExecutors,
|
||||
override val configActor: ConfigActor<KotlinConfig>)
|
||||
: BaseJvmPlugin<KotlinConfig>(configActor), IDocContributor, IClasspathContributor, ICompilerContributor,
|
||||
IBuildConfigContributor {
|
||||
|
||||
companion object {
|
||||
|
|
|
@ -24,8 +24,8 @@ import javax.inject.Singleton
|
|||
class PackagingPlugin @Inject constructor(val dependencyManager : DependencyManager,
|
||||
val executors: KobaltExecutors, val jarGenerator: JarGenerator, val warGenerator: WarGenerator,
|
||||
val zipGenerator: ZipGenerator, val taskContributor: TaskContributor,
|
||||
val pomFactory: PomGenerator.IFactory)
|
||||
: ConfigPlugin<InstallConfig>(), ITaskContributor {
|
||||
val pomFactory: PomGenerator.IFactory, val configActor: ConfigActor<InstallConfig>)
|
||||
: BasePlugin(), IConfigActor<InstallConfig> by configActor, ITaskContributor {
|
||||
|
||||
companion object {
|
||||
const val PLUGIN_NAME = "Packaging"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue