Rename implement to expectedBy in Gradle, deprecate the old name
Issue #KT-20618 Fixed (cherry picked from commit 6e0d378)
This commit is contained in:
+21
@@ -20,6 +20,7 @@ import org.gradle.api.logging.LogLevel
|
||||
import com.intellij.openapi.util.io.FileUtil
|
||||
import org.jetbrains.kotlin.gradle.plugin.CopyClassesToJavaOutputStatus
|
||||
import org.jetbrains.kotlin.gradle.tasks.USING_INCREMENTAL_COMPILATION_MESSAGE
|
||||
import org.jetbrains.kotlin.gradle.plugin.IMPLEMENT_CONFIG_WARNING
|
||||
import org.jetbrains.kotlin.gradle.util.*
|
||||
import org.junit.Test
|
||||
import java.io.File
|
||||
@@ -406,6 +407,26 @@ class KotlinGradleIT: BaseGradleIT() {
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testDeprecatedImplementWarning() {
|
||||
val project = Project("multiplatformProject", GRADLE_VERSION)
|
||||
val warningText = IMPLEMENT_CONFIG_WARNING
|
||||
|
||||
project.build("build") {
|
||||
assertSuccessful()
|
||||
assertNotContains(warningText)
|
||||
}
|
||||
|
||||
project.projectDir.walk().filter { it.name == "build.gradle" }.forEach { buildGradle ->
|
||||
buildGradle.modify { it.replace("expectedBy", "implement") }
|
||||
}
|
||||
|
||||
project.build("build") {
|
||||
assertSuccessful()
|
||||
assertContains(warningText)
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testFreeCompilerArgs() {
|
||||
val project = Project("kotlinProject", GRADLE_VERSION)
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
apply plugin: 'kotlin-platform-js'
|
||||
|
||||
dependencies {
|
||||
implement project(":lib")
|
||||
expectedBy project(":lib")
|
||||
}
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
apply plugin: 'kotlin-platform-jvm'
|
||||
|
||||
dependencies {
|
||||
implement project(":lib")
|
||||
expectedBy project(":lib")
|
||||
compile 'com.google.guava:guava:20.0'
|
||||
}
|
||||
Reference in New Issue
Block a user