diff --git a/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/internal/KotlinJarFiles.kt b/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/internal/KotlinJarFiles.kt index 3f29427a..123e8b76 100644 --- a/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/internal/KotlinJarFiles.kt +++ b/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/internal/KotlinJarFiles.kt @@ -16,6 +16,5 @@ class KotlinJarFiles @Inject constructor(val dependencyManager: DependencyManage } val stdlib: File get() = getKotlinCompilerJar("stdlib") - val runtime: File get() = getKotlinCompilerJar("runtime") val compiler: File get() = getKotlinCompilerJar("compiler-embeddable") } diff --git a/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/misc/NewRunCommand.kt b/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/misc/NewRunCommand.kt index a41f27d0..e105133b 100644 --- a/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/misc/NewRunCommand.kt +++ b/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/misc/NewRunCommand.kt @@ -79,7 +79,11 @@ open class NewRunCommand(val info: RunCommandInfo) { val process = pb.start() // Run the command and collect the return code and streams - val returnCode = process.waitFor(60, TimeUnit.SECONDS) + val processFinished = process.waitFor(120, TimeUnit.SECONDS) + + if (!processFinished) + kobaltError("process timed out!") + val input = if (process.inputStream.available() > 0) fromStream(process.inputStream) else listOf() @@ -92,10 +96,9 @@ open class NewRunCommand(val info: RunCommandInfo) { // Check to see if the command succeeded val isSuccess = if (info.containsErrors != null) ! info.containsErrors!!(error) - else isSuccess(if (info.ignoreExitValue) true else returnCode, input, error) + else isSuccess(if (info.ignoreExitValue) true else processFinished, input, error) if (isSuccess) { - kobaltLog(3, "success so far") if (!info.useErrorStreamAsErrorIndicator) { info.successCallback(error + input) } else { diff --git a/src/main/kotlin/com/beust/kobalt/app/kotlin/KotlinTemplateGenerator.kt b/src/main/kotlin/com/beust/kobalt/app/kotlin/KotlinTemplateGenerator.kt index 4c408d48..f10698c4 100644 --- a/src/main/kotlin/com/beust/kobalt/app/kotlin/KotlinTemplateGenerator.kt +++ b/src/main/kotlin/com/beust/kobalt/app/kotlin/KotlinTemplateGenerator.kt @@ -8,8 +8,8 @@ class KotlinTemplateGenerator : LanguageTemplateGenerator() { override val defaultSourceDirectories = hashSetOf("src/main/kotlin") override val defaultTestDirectories = hashSetOf("src/test/kotlin") override val mainDependencies = arrayListOf( - Pom.Dependency("org.jetbrains.kotlin", "kotlin-runtime", null, Constants.KOTLIN_COMPILER_VERSION), - Pom.Dependency("org.jetbrains.kotlin", "kotlin-stdlib", null, Constants.KOTLIN_COMPILER_VERSION)) + Pom.Dependency("org.jetbrains.kotlin", "kotlin-stdlib", null, Constants.KOTLIN_COMPILER_VERSION) + ) override val testDependencies = arrayListOf() override val directive = "project" override val templateName = "kotlin" diff --git a/src/main/kotlin/com/beust/kobalt/plugin/kotlin/KotlinPlugin.kt b/src/main/kotlin/com/beust/kobalt/plugin/kotlin/KotlinPlugin.kt index 3c437628..886f3537 100644 --- a/src/main/kotlin/com/beust/kobalt/plugin/kotlin/KotlinPlugin.kt +++ b/src/main/kotlin/com/beust/kobalt/plugin/kotlin/KotlinPlugin.kt @@ -99,9 +99,10 @@ class KotlinPlugin @Inject constructor(val executors: KobaltExecutors, val depen // IClasspathContributor override fun classpathEntriesFor(project: Project?, context: KobaltContext): List = - if (project == null || accept(project)) { + if (project == null || + context.pluginInfo.plugins.any { it is KotlinPlugin && it.settings.kobaltCompilerVersion == null }) { // All Kotlin projects automatically get the Kotlin runtime added to their class path - listOf(kotlinJarFiles.stdlib, kotlinJarFiles.runtime) + listOf(kotlinJarFiles.stdlib) .map { FileDependency(it.absolutePath) } } else { emptyList() diff --git a/src/main/resources/kobalt.properties b/src/main/resources/kobalt.properties index a7b70c39..a3f0abbf 100644 --- a/src/main/resources/kobalt.properties +++ b/src/main/resources/kobalt.properties @@ -1 +1 @@ -kobalt.version=1.0.120 +kobalt.version=1.0.121 diff --git a/src/main/resources/templates/idea/KotlinJavaRuntime.xml b/src/main/resources/templates/idea/KotlinJavaRuntime.xml index c630c0b8..3792609b 100644 --- a/src/main/resources/templates/idea/KotlinJavaRuntime.xml +++ b/src/main/resources/templates/idea/KotlinJavaRuntime.xml @@ -1,12 +1,12 @@ - + - + \ No newline at end of file