Fix a few tests failing due to Gradle version change.
This commit is contained in:
+3
-3
@@ -299,7 +299,7 @@ class KotlinGradleIT: BaseGradleIT() {
|
||||
|
||||
@Test
|
||||
fun testWipeClassesDirectoryBetweenBuilds() {
|
||||
val project = Project("kotlinJavaProject", NoSpecificGradleVersion)
|
||||
val project = Project("kotlinJavaProject", SpecificGradleVersion("3.5"))
|
||||
|
||||
project.build("build") {
|
||||
assertSuccessful()
|
||||
@@ -589,7 +589,7 @@ class KotlinGradleIT: BaseGradleIT() {
|
||||
val deployKotlinSrcKt = File(project.projectDir, "src/deploy/kotlin/kotlinSrc.kt")
|
||||
deployKotlinSrcKt.appendText("\nfun topLevelFun() = 1")
|
||||
|
||||
project.build("build", "compileDeployKotlin") {
|
||||
project.build("build", "deployClasses") {
|
||||
assertSuccessful()
|
||||
// Main source set should have a *.kotlin_module file without '_main'
|
||||
assertFileExists(kotlinClassesDir() + "META-INF/$archivesBaseName.kotlin_module")
|
||||
@@ -605,7 +605,7 @@ class KotlinGradleIT: BaseGradleIT() {
|
||||
|
||||
// Check that the Java source in a non-full-depth package structure was located correctly:
|
||||
checkBytecodeContains(
|
||||
File(project.projectDir, "build/classes/kotlin/main/my/pack/name/app/MyApp.class"),
|
||||
File(project.projectDir, kotlinClassesDir() + "my/pack/name/app/MyApp.class"),
|
||||
"my/pack/name/util/JUtil.util")
|
||||
}
|
||||
}
|
||||
|
||||
+5
-2
@@ -19,7 +19,10 @@ class SimpleKotlinGradleIT : BaseGradleIT() {
|
||||
project.build("compileDeployKotlin", "build") {
|
||||
assertSuccessful()
|
||||
assertContains("Finished executing kotlin compiler using daemon strategy")
|
||||
assertReportExists("build/reports/tests/classes/demo.TestSource.html")
|
||||
assertTrue {
|
||||
fileInWorkingDir("build/reports/tests/classes/demo.TestSource.html").exists() ||
|
||||
fileInWorkingDir("build/reports/tests/test/classes/demo.TestSource.html").exists()
|
||||
}
|
||||
assertContains(":compileKotlin", ":compileTestKotlin", ":compileDeployKotlin")
|
||||
}
|
||||
|
||||
@@ -131,7 +134,7 @@ class SimpleKotlinGradleIT : BaseGradleIT() {
|
||||
Project("allOpenSpring", GRADLE_VERSION).build("build") {
|
||||
assertSuccessful()
|
||||
|
||||
val classesDir = File(project.projectDir, "build/classes/main")
|
||||
val classesDir = File(project.projectDir, kotlinClassesDir())
|
||||
val openClass = File(classesDir, "test/OpenClass.class")
|
||||
val closedClass = File(classesDir, "test/ClosedClass.class")
|
||||
assertTrue(openClass.exists())
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ class UpToDateIT : BaseGradleIT() {
|
||||
}
|
||||
|
||||
private fun testMutations(vararg mutations: ProjectMutation) {
|
||||
val project = Project("simpleProject", NoSpecificGradleVersion)
|
||||
val project = Project("simpleProject", GradleVersionAtLeast("4.0"))
|
||||
project.setupWorkingDir()
|
||||
mutations.forEach {
|
||||
it.initProject(project)
|
||||
|
||||
Reference in New Issue
Block a user