1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-26 08:27:12 -07:00
This commit is contained in:
Cedric Beust 2016-02-26 23:06:04 +04:00
parent 2ad29ede6b
commit 44fa294546
2 changed files with 3 additions and 3 deletions

View file

@ -27,7 +27,7 @@ public class DepFactory @Inject constructor(val localRepo: LocalRepo,
* Parse the id and return the correct IClasspathDependency
*/
fun create(id: String, downloadSources: Boolean = false, downloadJavadocs: Boolean = false,
localFirst : Boolean = true, executor: ExecutorService = defExecutor)
localFirst : Boolean = true, showNetworkWarning: Boolean = true, executor: ExecutorService = defExecutor)
: IClasspathDependency {
if (id.startsWith(FileDependency.PREFIX_FILE)) {
return FileDependency(id.substring(FileDependency.PREFIX_FILE.length))
@ -46,7 +46,7 @@ public class DepFactory @Inject constructor(val localRepo: LocalRepo,
if (localFirst && localVersion != null) {
localVersion
} else {
if (! localFirst) {
if (! localFirst && showNetworkWarning) {
warn("The id \"$id\" doesn't contain a version, which will cause a network call")
}
repoResult = remoteRepo.findCorrectRepo(id)

View file

@ -23,7 +23,7 @@ public class CheckVersions @Inject constructor(val depFactory : DepFactory,
if (MavenId.isMavenId(compileDependency.id)) {
try {
val dep = depFactory.create(compileDependency.shortId, localFirst = false,
executor = executor)
showNetworkWarning = false, executor = executor)
if (dep is MavenDependency) {
val other = compileDependency as MavenDependency
if (dep.id != compileDependency.id