mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-28 09:08:13 -07:00
Enable source downloading.
This commit is contained in:
parent
a29d837f42
commit
01df4b8d94
14 changed files with 56 additions and 27 deletions
|
@ -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))
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue