1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-27 16:48:12 -07:00

Enable source downloading.

This commit is contained in:
Cedric Beust 2016-02-13 08:48:49 -08:00
parent a29d837f42
commit 01df4b8d94
14 changed files with 56 additions and 27 deletions

View file

@ -7,6 +7,7 @@ import com.beust.kobalt.maven.ArtifactFetcher
import com.beust.kobalt.maven.LocalRepo
import com.beust.kobalt.maven.Pom
import com.beust.kobalt.maven.PomGenerator
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
@ -33,7 +34,8 @@ public open class MainModule(val args: Args, val settings: KobaltSettings) : Abs
BintrayApi.IFactory::class.java,
Pom.IFactory::class.java,
BuildFileCompiler.IFactory::class.java,
ArtifactFetcher.IFactory::class.java)
ArtifactFetcher.IFactory::class.java,
MavenDependency.IFactory::class.java)
.forEach {
install(builder.build(it))
}

View file

@ -45,7 +45,7 @@ class GetDependenciesCommand @Inject constructor(val executors: KobaltExecutors,
val executor = executors.miscExecutor
fun toDependencyData(d: IClasspathDependency, scope: String) : DependencyData {
val dep = MavenDependency.create(d.id, executor)
val dep = MavenDependency.create(d.id, executor = executor)
return DependencyData(d.id, scope, dep.jarFile.get().absolutePath)
}

View file

@ -115,7 +115,8 @@ class KotlinCompiler @Inject constructor(
otherClasspath: List<String>, sourceFiles: List<String>, outputDir: File, args: List<String>) : TaskResult {
val executor = executors.newExecutor("KotlinCompiler", 10)
val compilerDep = depFactory.create("org.jetbrains.kotlin:kotlin-compiler-embeddable:$KOTLIN_VERSION", executor)
val compilerDep = depFactory.create("org.jetbrains.kotlin:kotlin-compiler-embeddable:$KOTLIN_VERSION",
executor = executor)
val deps = dependencyManager.transitiveClosure(listOf(compilerDep))
// Force a download of the compiler dependencies

View file

@ -94,7 +94,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, executors.miscExecutor)
val dep = MavenDependency.create(id, executor = executors.miscExecutor)
val result = dep.jarFile.get().absolutePath
return result
}