diff --git a/kobalt/wrapper/kobalt-wrapper.properties b/kobalt/wrapper/kobalt-wrapper.properties index fb433082..5e75246b 100644 --- a/kobalt/wrapper/kobalt-wrapper.properties +++ b/kobalt/wrapper/kobalt-wrapper.properties @@ -1 +1 @@ -kobalt.version=0.404 \ No newline at end of file +kobalt.version=0.407 \ No newline at end of file diff --git a/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/internal/JvmCompilerPlugin.kt b/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/internal/JvmCompilerPlugin.kt index 169b3e5f..bd74d8a2 100644 --- a/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/internal/JvmCompilerPlugin.kt +++ b/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/internal/JvmCompilerPlugin.kt @@ -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() // 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) { diff --git a/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/misc/GithubApi.kt b/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/misc/GithubApi.kt index 4864b3d5..a7d3fcd7 100644 --- a/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/misc/GithubApi.kt +++ b/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/misc/GithubApi.kt @@ -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 } diff --git a/src/main/resources/kobalt.properties b/src/main/resources/kobalt.properties index e8f06090..1bfab0ca 100644 --- a/src/main/resources/kobalt.properties +++ b/src/main/resources/kobalt.properties @@ -1 +1 @@ -kobalt.version=0.404 +kobalt.version=0.407