mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 16:28:12 -07:00
Implement localMaven().
This commit is contained in:
parent
b988e2de23
commit
ef516cd919
4 changed files with 53 additions and 5 deletions
|
@ -3,6 +3,7 @@ package com.beust.kobalt
|
|||
import com.beust.kobalt.api.IClasspathDependency
|
||||
import com.beust.kobalt.api.Kobalt
|
||||
import com.beust.kobalt.api.annotation.Directive
|
||||
import com.beust.kobalt.internal.KobaltSettings
|
||||
import com.beust.kobalt.maven.DependencyManager
|
||||
import com.beust.kobalt.maven.dependency.FileDependency
|
||||
import org.eclipse.aether.repository.Proxy
|
||||
|
@ -72,3 +73,6 @@ fun authRepo(init: HostConfig.() -> Unit) = HostConfig().apply { init() }
|
|||
|
||||
@Directive
|
||||
fun glob(g: String) : IFileSpec.GlobSpec = IFileSpec.GlobSpec(g)
|
||||
|
||||
@Directive
|
||||
fun localMaven() = file(Kobalt.INJECTOR.getInstance(KobaltSettings::class.java).localMavenRepo.path)
|
||||
|
|
|
@ -92,7 +92,7 @@ open class JvmCompilerPlugin @Inject constructor(
|
|||
return testContributor.run(project, context, configName,
|
||||
dependencyManager.testDependencies(project, context))
|
||||
} else {
|
||||
log(1, "Couldn't find a test runner for project ${project.name}, did you specify a dependenciesTest{}?")
|
||||
log(2, "Couldn't find a test runner for project ${project.name}, did you specify dependenciesTest{}?")
|
||||
return TaskResult()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,6 +20,9 @@ class KobaltSettingsXml {
|
|||
@XmlElement(name = "local-repo") @JvmField
|
||||
var localRepo: String = homeDir(KFiles.KOBALT_DOT_DIR, "repository")
|
||||
|
||||
@XmlElement(name = "local-maven-repo") @JvmField
|
||||
var localMavenRepo: String = homeDir(KFiles.KOBALT_DOT_DIR, "localMavenRepo")
|
||||
|
||||
@XmlElement(name = "default-repos") @JvmField
|
||||
var defaultRepos: DefaultReposXml? = null
|
||||
|
||||
|
@ -65,10 +68,15 @@ fun List<ProxyConfig>.getProxy(protocol:String) = find { it.type==protocol }
|
|||
@Singleton
|
||||
class KobaltSettings @Inject constructor(val xmlFile: KobaltSettingsXml) {
|
||||
/**
|
||||
* Location of the local repo.
|
||||
* Location of the cache repository.
|
||||
*/
|
||||
var localRepo = KFiles.makeDir(xmlFile.localRepo) // var for testing
|
||||
|
||||
/**
|
||||
* Location of the local Maven repo for the task deployToLocalMaven
|
||||
*/
|
||||
val localMavenRepo = KFiles.makeDir(xmlFile.localMavenRepo)
|
||||
|
||||
val defaultRepos = xmlFile.defaultRepos?.repo
|
||||
|
||||
val proxyConfigs = with(xmlFile.proxies?.proxy) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue