mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-27 08:38:13 -07:00
Remove usages of MavenDependency.
This commit is contained in:
parent
c57b8c96e9
commit
6de1b4d893
16 changed files with 211 additions and 266 deletions
|
@ -4,7 +4,6 @@ import com.beust.kobalt.Args
|
|||
import com.beust.kobalt.internal.KobaltSettings
|
||||
import com.beust.kobalt.internal.PluginInfo
|
||||
import com.beust.kobalt.maven.*
|
||||
import com.beust.kobalt.maven.dependency.MavenDependency
|
||||
import com.beust.kobalt.misc.DependencyExecutor
|
||||
import com.beust.kobalt.misc.KobaltExecutors
|
||||
import com.beust.kobalt.plugin.publish.BintrayApi
|
||||
|
@ -32,8 +31,7 @@ public open class MainModule(val args: Args, val settings: KobaltSettings) : Abs
|
|||
Pom.IFactory::class.java,
|
||||
BuildFileCompiler.IFactory::class.java,
|
||||
ArtifactFetcher.IFactory::class.java,
|
||||
RepoFinderCallable.IFactory::class.java,
|
||||
MavenDependency.IFactory::class.java)
|
||||
RepoFinderCallable.IFactory::class.java)
|
||||
.forEach {
|
||||
install(builder.build(it))
|
||||
}
|
||||
|
|
|
@ -7,9 +7,9 @@ import com.beust.kobalt.app.BuildFileCompiler
|
|||
import com.beust.kobalt.internal.JvmCompilerPlugin
|
||||
import com.beust.kobalt.internal.PluginInfo
|
||||
import com.beust.kobalt.internal.build.BuildFile
|
||||
import com.beust.kobalt.maven.DepFactory
|
||||
import com.beust.kobalt.maven.DependencyManager
|
||||
import com.beust.kobalt.maven.dependency.FileDependency
|
||||
import com.beust.kobalt.maven.dependency.MavenDependency
|
||||
import com.beust.kobalt.misc.KFiles
|
||||
import com.beust.kobalt.misc.KobaltExecutors
|
||||
import com.google.inject.Inject
|
||||
|
@ -17,13 +17,13 @@ import java.io.File
|
|||
import java.nio.file.Paths
|
||||
|
||||
class DependencyData @Inject constructor(val executors: KobaltExecutors, val dependencyManager: DependencyManager,
|
||||
val buildFileCompilerFactory: BuildFileCompiler.IFactory, val pluginInfo: PluginInfo) {
|
||||
val buildFileCompilerFactory: BuildFileCompiler.IFactory, val pluginInfo: PluginInfo,
|
||||
val depFactory: DepFactory) {
|
||||
fun dependenciesDataFor(buildFilePath: String, args: Args) : GetDependenciesData {
|
||||
val projectDatas = arrayListOf<ProjectData>()
|
||||
val executor = executors.miscExecutor
|
||||
|
||||
fun toDependencyData(d: IClasspathDependency, scope: String): DependencyData {
|
||||
val dep = MavenDependency.create(d.id, executor = executor)
|
||||
val dep = depFactory.create(d.id)
|
||||
return DependencyData(d.id, scope, dep.jarFile.get().absolutePath)
|
||||
}
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@ import com.beust.kobalt.api.*
|
|||
import com.beust.kobalt.api.annotation.Directive
|
||||
import com.beust.kobalt.internal.BaseJvmPlugin
|
||||
import com.beust.kobalt.internal.JvmCompilerPlugin
|
||||
import com.beust.kobalt.maven.DepFactory
|
||||
import com.beust.kobalt.maven.dependency.FileDependency
|
||||
import com.beust.kobalt.maven.dependency.MavenDependency
|
||||
import com.beust.kobalt.misc.KFiles
|
||||
import com.beust.kobalt.misc.KobaltExecutors
|
||||
import com.beust.kobalt.misc.log
|
||||
|
@ -17,7 +17,7 @@ import javax.inject.Inject
|
|||
import javax.inject.Singleton
|
||||
|
||||
@Singleton
|
||||
class KotlinPlugin @Inject constructor(val executors: KobaltExecutors,
|
||||
class KotlinPlugin @Inject constructor(val executors: KobaltExecutors, val depFactory: DepFactory,
|
||||
override val configActor: ConfigActor<KotlinConfig>)
|
||||
: BaseJvmPlugin<KotlinConfig>(configActor), IDocContributor, IClasspathContributor, ICompilerContributor,
|
||||
IBuildConfigContributor {
|
||||
|
@ -95,7 +95,7 @@ class KotlinPlugin @Inject constructor(val executors: KobaltExecutors,
|
|||
|
||||
private fun getKotlinCompilerJar(name: String): String {
|
||||
val id = "org.jetbrains.kotlin:$name:${KotlinCompiler.KOTLIN_VERSION}"
|
||||
val dep = MavenDependency.create(id, executor = executors.miscExecutor)
|
||||
val dep = depFactory.create(id)
|
||||
val result = dep.jarFile.get().absolutePath
|
||||
return result
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue