Skip to content
This repository has been archived by the owner on Aug 19, 2020. It is now read-only.

Kotlin 1.3.20 #1325

Merged
merged 6 commits into from
Jan 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ allprojects {
version = "1.2.0-SNAPSHOT"
}

val publishedPluginsVersion by extra { "1.1.2" }
val futurePluginsVersion = "1.1.3"
val publishedPluginsVersion by extra { "1.1.3" }
val futurePluginsVersion = "1.1.4"
project(":plugins") {
group = "org.gradle.kotlin"
version = futurePluginsVersion
Expand Down
2 changes: 1 addition & 1 deletion kotlin-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.3.11
1.3.20
8 changes: 4 additions & 4 deletions samples/testkit/src/test/kotlin/samples/GreetPluginTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package samples
import org.gradle.testkit.runner.BuildResult
import org.gradle.testkit.runner.GradleRunner

import org.hamcrest.CoreMatchers.equalTo
import org.hamcrest.CoreMatchers.hasItem

import org.junit.Assert.assertThat
import org.junit.Rule
Expand Down Expand Up @@ -31,8 +31,8 @@ class GreetPluginTest {
""")

assertThat(
build("greet", "-q").output.trimEnd(),
equalTo(message))
build("greet", "-q").output.lines(),
hasItem(message))
}

private
Expand All @@ -58,4 +58,4 @@ class GreetPluginTest {
@Rule
@JvmField
val temporaryFolder = TemporaryFolder()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ class GradleApiExtensionsIntegrationTest : AbstractPluginIntegrationTest() {
val generatedJarHash = HashUtil.createHash(generatedExtensionsJarFromTestKitUserHome(), "MD5")
assertThat(
generatedJarHash.asZeroPaddedHexString(32),
equalTo("a2dafc4a01c372597596fa7539844edd")
equalTo("87fc2d17e9d5ef75ec04326ea23dc575")
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ import org.gradle.kotlin.dsl.support.normaliseLineSeparators

import org.hamcrest.CoreMatchers.allOf
import org.hamcrest.CoreMatchers.containsString
import org.hamcrest.CoreMatchers.equalTo
import org.hamcrest.CoreMatchers.hasItem
import org.hamcrest.CoreMatchers.hasItems
import org.hamcrest.MatcherAssert.assertThat

import org.junit.Assert.assertNotEquals
Expand Down Expand Up @@ -732,13 +733,14 @@ class GradleKotlinDslIntegrationTest : AbstractPluginIntegrationTest() {
""")

assertThat(
build("-I", init.absolutePath, "help", "-q").output,
containsMultiLineString("""
init: ${init.absolutePath}
settings: ${settings.absolutePath}
other: ${other.absolutePath}
main: ${main.absolutePath}
"""))
build("-I", init.absolutePath, "help", "-q").output.lines(),
hasItems(
"init: ${init.absolutePath}",
"settings: ${settings.absolutePath}",
"other: ${other.absolutePath}",
"main: ${main.absolutePath}"
)
)
}

@Test
Expand Down Expand Up @@ -879,8 +881,8 @@ class GradleKotlinDslIntegrationTest : AbstractPluginIntegrationTest() {
""")

assertThat(
build("-q", "test").output.trim(),
equalTo("default-value")
build("-q", "test").output.lines(),
hasItem("default-value")
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import org.jetbrains.kotlin.com.intellij.openapi.project.Project
import org.jetbrains.kotlin.com.intellij.openapi.util.Disposer.dispose
import org.jetbrains.kotlin.com.intellij.openapi.util.Disposer.newDisposable

import org.jetbrains.kotlin.config.AnalysisFlag
import org.jetbrains.kotlin.config.AnalysisFlags
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eskatos Is this change at risk of making the Kotlin DSL incompatible with someone running an earlier version of the compiler?

import org.jetbrains.kotlin.config.ApiVersion
import org.jetbrains.kotlin.config.CommonConfigurationKeys
import org.jetbrains.kotlin.config.CompilerConfiguration
Expand Down Expand Up @@ -195,7 +195,7 @@ val gradleKotlinDslLanguageVersionSettings = LanguageVersionSettingsImpl(
LanguageFeature.SamConversionForKotlinFunctions to LanguageFeature.State.ENABLED
),
analysisFlags = mapOf(
AnalysisFlag.skipMetadataVersionCheck to true
AnalysisFlags.skipMetadataVersionCheck to true
)
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import org.gradle.kotlin.dsl.fixtures.AbstractIntegrationTest
import org.gradle.kotlin.dsl.fixtures.containsMultiLineString

import org.hamcrest.CoreMatchers.containsString
import org.hamcrest.CoreMatchers.equalTo
import org.hamcrest.CoreMatchers.hasItem

import org.junit.Assert.assertThat
import org.junit.Test
Expand Down Expand Up @@ -67,8 +67,8 @@ class KotlinBuildScriptIntegrationTest : AbstractIntegrationTest() {
""")

assertThat(
build("test", "-q").output,
equalTo("42!")
build("test", "-q").output.lines(),
hasItem("42!")
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import org.hamcrest.CoreMatchers.containsString
import org.junit.Assert.assertThat
import org.junit.Assume.assumeTrue
import org.junit.Before
import org.junit.Ignore
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.Parameterized
Expand Down Expand Up @@ -39,6 +40,7 @@ class SamplesSmokeTest(
build("tasks")
}

@Ignore("until wrapper update")
@Test
fun `uses the right Kotlin Gradle Plugin version on `() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ import java.io.File
import java.util.Properties


internal
val isCI by lazy { !System.getenv("CI").isNullOrEmpty() }


open class AbstractIntegrationTest {

@JvmField
Expand Down Expand Up @@ -246,8 +242,7 @@ fun gradleRunnerFor(projectDir: File, vararg arguments: String): GradleRunner =
withGradleInstallation(customInstallation())
withProjectDir(projectDir)
withDebug(false)
if (isCI) withArguments(*arguments, "--stacktrace", "-Dkotlin-daemon.verbose=true")
else withArguments(*arguments, "--stacktrace")
withArguments(*arguments, "--stacktrace")
return this
}

Expand Down