mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 16:28:12 -07:00
update to kotlin beta 4
This commit is contained in:
parent
e8f271fddf
commit
7c0dd710ea
8 changed files with 10 additions and 11 deletions
|
@ -111,7 +111,7 @@ val kobaltApp = kotlinProject(kobaltPluginApi, wrapper) {
|
|||
|
||||
dependencies {
|
||||
// Used by the plugins
|
||||
compile("org.jetbrains.kotlin:kotlin-compiler-embeddable:1.0.0-beta-3595",
|
||||
compile("org.jetbrains.kotlin:kotlin-compiler-embeddable:1.0.0-beta-4584",
|
||||
"org.jetbrains.dokka:dokka-fatjar:0.9.3")
|
||||
|
||||
// Used by the main app
|
||||
|
|
|
@ -144,7 +144,7 @@ public class RepoFinder @Inject constructor(val executors: KobaltExecutors) {
|
|||
val XPATH = XPATH_FACTORY.newXPath();
|
||||
|
||||
fun findCorrectVersionRelease(metadataPath: String, repoUrl: String): String? {
|
||||
val XPATHS = arrayListOf(
|
||||
val XPATHS = listOf(
|
||||
XPATH.compile("/metadata/version"),
|
||||
XPATH.compile("/metadata/versioning/latest"),
|
||||
XPATH.compile("/metadata/versioning/release"))
|
||||
|
|
|
@ -283,9 +283,8 @@ class KFiles {
|
|||
if (excludes.isEmpty()) {
|
||||
return false
|
||||
} else {
|
||||
val ex = arrayListOf<PathMatcher>()
|
||||
excludes.forEach {
|
||||
ex.add(FileSystems.getDefault().getPathMatcher("glob:${it.spec}"))
|
||||
val ex = excludes.map {
|
||||
FileSystems.getDefault().getPathMatcher("glob:${it.spec}")
|
||||
}
|
||||
ex.forEach {
|
||||
if (it.matches(Paths.get(file))) {
|
||||
|
|
|
@ -43,7 +43,7 @@ open class RunCommand(val command: String) {
|
|||
"\n " + allArgs.joinToString(" "))
|
||||
val process = pb.start()
|
||||
pb.environment().let { pbEnv ->
|
||||
env.forEach {
|
||||
env.forEach {it ->
|
||||
pbEnv.put(it.key, it.value)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue