mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 00:17:11 -07:00
Export the POM generator on the KobaltContext.
This commit is contained in:
parent
e19201de33
commit
e2e8e78be6
2 changed files with 10 additions and 1 deletions
|
@ -9,6 +9,7 @@ import com.beust.kobalt.internal.KobaltSettings
|
|||
import com.beust.kobalt.internal.PluginInfo
|
||||
import com.beust.kobalt.maven.DependencyManager
|
||||
import com.beust.kobalt.maven.MavenId
|
||||
import com.beust.kobalt.maven.PomGenerator
|
||||
import com.beust.kobalt.maven.SimpleDep
|
||||
import com.beust.kobalt.maven.aether.KobaltAether
|
||||
import com.beust.kobalt.misc.KobaltExecutors
|
||||
|
@ -59,6 +60,11 @@ class KobaltContext(val args: Args) {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the content of the pom.xml for the given project.
|
||||
*/
|
||||
fun generatePom(project: Project) = pomGeneratorFactory.create(project).generate()
|
||||
|
||||
/** All the projects that are being built during this run */
|
||||
val allProjects = arrayListOf<Project>()
|
||||
|
||||
|
@ -75,6 +81,7 @@ class KobaltContext(val args: Args) {
|
|||
lateinit var settings: KobaltSettings
|
||||
lateinit var incrementalManager: IncrementalManager
|
||||
lateinit var aether: KobaltAether
|
||||
lateinit var pomGeneratorFactory: PomGenerator.IFactory
|
||||
}
|
||||
|
||||
class InternalContext {
|
||||
|
|
|
@ -14,6 +14,7 @@ import com.beust.kobalt.internal.PluginInfo
|
|||
import com.beust.kobalt.internal.build.BuildFile
|
||||
import com.beust.kobalt.internal.build.VersionFile
|
||||
import com.beust.kobalt.maven.DependencyManager
|
||||
import com.beust.kobalt.maven.PomGenerator
|
||||
import com.beust.kobalt.maven.aether.KobaltAether
|
||||
import com.beust.kobalt.misc.KFiles
|
||||
import com.beust.kobalt.misc.KobaltExecutors
|
||||
|
@ -35,7 +36,7 @@ public class BuildFileCompiler @Inject constructor(@Assisted("buildFiles") val b
|
|||
val dependencyManager: DependencyManager, val pluginProperties: PluginProperties,
|
||||
val executors: KobaltExecutors, val buildScriptUtil: BuildScriptUtil, val settings: KobaltSettings,
|
||||
val incrementalManagerFactory: IncrementalManager.IFactory, val args: Args,
|
||||
val aether: KobaltAether) {
|
||||
val aether: KobaltAether, val pomGeneratorFactory: PomGenerator.IFactory) {
|
||||
|
||||
interface IFactory {
|
||||
fun create(@Assisted("buildFiles") buildFiles: List<BuildFile>, pluginInfo: PluginInfo) : BuildFileCompiler
|
||||
|
@ -56,6 +57,7 @@ public class BuildFileCompiler @Inject constructor(@Assisted("buildFiles") val b
|
|||
context.settings = settings
|
||||
context.incrementalManager = incrementalManagerFactory.create()
|
||||
context.aether = aether
|
||||
context.pomGeneratorFactory = pomGeneratorFactory
|
||||
Kobalt.context = context
|
||||
|
||||
//
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue