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

Merge branch 'master' of github.com:cbeust/kobalt

This commit is contained in:
Cedric Beust 2016-02-01 20:54:27 -08:00
commit d649eb3dd7
4 changed files with 20 additions and 15 deletions

View file

@ -1 +1 @@
kobalt.version=0.404
kobalt.version=0.407

View file

@ -238,10 +238,8 @@ abstract class JvmCompilerPlugin @Inject constructor(
CompilerActionInfo {
copyResources(project, JvmCompilerPlugin.SOURCE_SET_MAIN)
val fullClasspath = if (isTest)
dependencyManager.testDependencies(project, context)
else
dependencyManager.dependencies(project, context)
val fullClasspath = if (isTest) dependencyManager.testDependencies(project, context)
else dependencyManager.dependencies(project, context)
// Remove all the excluded dependencies from the classpath
val classpath = fullClasspath.filter {
@ -249,19 +247,19 @@ abstract class JvmCompilerPlugin @Inject constructor(
}
val projectDirectory = File(project.directory)
val buildDirectory = if (isTest) KFiles.makeOutputTestDir(project)
else File(project.classesDir(context))
val buildDirectory = if (isTest) File(project.buildDirectory, KFiles.TEST_CLASSES_DIR)
else File(project.classesDir(context))
buildDirectory.mkdirs()
val initialSourceDirectories = arrayListOf<File>()
// Source directories from the contributors
initialSourceDirectories.addAll(
if (isTest) {
context.pluginInfo.testSourceDirContributors.flatMap { it.testSourceDirectoriesFor(project, context) }
} else {
context.pluginInfo.sourceDirContributors.flatMap { it.sourceDirectoriesFor(project, context) }
})
if (isTest) {
context.pluginInfo.testSourceDirContributors.flatMap { it.testSourceDirectoriesFor(project, context) }
} else {
context.pluginInfo.sourceDirContributors.flatMap { it.sourceDirectoriesFor(project, context) }
})
// Transform them with the interceptors, if any
val sourceDirectories = if (isTest) {

View file

@ -137,8 +137,15 @@ public class GithubApi @Inject constructor(val executors: KobaltExecutors,
}
} catch(e: RetrofitError) {
val error = parseRetrofitError(e)
throw KobaltException("Couldn't retrieve releases, ${error.message ?: e}: "
+ error.errors[0].code + " field: " + error.errors[0].field)
val details = if (error.errors != null) {
error.errors[0]
} else {
null
}
// TODO: If the credentials didn't work ("bad credentials"), should start again
// using cbeust/kobalt, like above. Right now, just bailing.
log(2, "Couldn't retrieve releases from github, ${error.message ?: e}: "
+ details?.code + " field: " + details?.field)
}
result
}

View file

@ -1 +1 @@
kobalt.version=0.404
kobalt.version=0.407