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

update to kotlin beta 4

This commit is contained in:
Kirill Rakhman 2015-12-27 20:02:18 +01:00
parent e8f271fddf
commit 7c0dd710ea
8 changed files with 10 additions and 11 deletions

View file

@ -15,7 +15,6 @@ import java.net.URL
import java.nio.charset.Charset
import java.nio.file.Paths
import java.util.*
import kotlin.text.Regex
class ParsedBuildFile(val buildFile: BuildFile, val context: KobaltContext, val buildScriptUtil: BuildScriptUtil,
val dependencyManager: DependencyManager, val files: KFiles) {
@ -74,7 +73,7 @@ class ParsedBuildFile(val buildFile: BuildFile, val context: KobaltContext, val
* val profile = true, otherwise return the same line
*/
fun correctProfileLine(line: String) : String {
context.profiles.forEach {
(context.profiles as List<String>).forEach {
if (line.matches(Regex("[ \\t]*val[ \\t]+$it[ \\t]+=.*"))) {
with("val $it = true") {
profileLines.add(this)

View file

@ -10,6 +10,7 @@ import com.beust.kobalt.maven.DependencyManager
import com.beust.kobalt.misc.KobaltExecutors
import com.beust.kobalt.misc.RunCommand
import com.beust.kobalt.misc.warn
import com.beust.kobalt.plugin.packaging.Jar
import com.beust.kobalt.plugin.packaging.PackageConfig
import com.beust.kobalt.plugin.packaging.PackagingPlugin
import com.google.inject.Inject
@ -65,7 +66,7 @@ class ApplicationPlugin @Inject constructor(val executors: KobaltExecutors,
private fun isFatJar(packages: List<PackageConfig>, jarName: String): Boolean {
packages.forEach { pc ->
pc.jars.forEach { jar ->
(pc.jars as List<Jar>).forEach { jar ->
if ((jar.name == null || jar.name == jarName) && jar.fatJar) {
return true
}

View file

@ -33,7 +33,7 @@ class KotlinCompiler @Inject constructor(
val executors: KobaltExecutors,
val jvmCompiler: JvmCompiler) {
companion object {
val KOTLIN_VERSION = "1.0.0-beta-3595"
val KOTLIN_VERSION = "1.0.0-beta-4584"
}
val compilerAction = object: ICompilerAction {

View file

@ -64,7 +64,7 @@ public class DynamicGraphTest {
val factory = createFactory(runNodes, { n -> n != 3 })
val ex = DynamicGraphExecutor(g, factory)
ex.run()
Thread.yield()
Thread.`yield`()
Assert.assertTrue(! runNodes.contains(4))
Assert.assertTrue(! runNodes.contains(10))
}