Minor: use more recent version of gradle in test
This commit is contained in:
+25
-18
@@ -9,9 +9,16 @@ import kotlin.test.assertTrue
|
|||||||
|
|
||||||
class KotlinGradleIT: BaseGradleIT() {
|
class KotlinGradleIT: BaseGradleIT() {
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
private const val GRADLE_VERSION = "2.10"
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun defaultBuildOptions(): BuildOptions =
|
||||||
|
super.defaultBuildOptions().copy(withDaemon = true)
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun testCrossCompile() {
|
fun testCrossCompile() {
|
||||||
val project = Project("kotlinJavaProject", "1.6")
|
val project = Project("kotlinJavaProject", GRADLE_VERSION)
|
||||||
|
|
||||||
project.build("compileDeployKotlin", "build") {
|
project.build("compileDeployKotlin", "build") {
|
||||||
assertSuccessful()
|
assertSuccessful()
|
||||||
@@ -27,7 +34,7 @@ class KotlinGradleIT: BaseGradleIT() {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun testKotlinOnlyCompile() {
|
fun testKotlinOnlyCompile() {
|
||||||
val project = Project("kotlinProject", "1.6")
|
val project = Project("kotlinProject", GRADLE_VERSION)
|
||||||
|
|
||||||
project.build("build") {
|
project.build("build") {
|
||||||
assertSuccessful()
|
assertSuccessful()
|
||||||
@@ -46,7 +53,7 @@ class KotlinGradleIT: BaseGradleIT() {
|
|||||||
// In order to stop daemon process, special exit task is used ( System.exit(0) ).
|
// In order to stop daemon process, special exit task is used ( System.exit(0) ).
|
||||||
@Test
|
@Test
|
||||||
fun testKotlinOnlyDaemonMemory() {
|
fun testKotlinOnlyDaemonMemory() {
|
||||||
val project = Project("kotlinProject", "2.4")
|
val project = Project("kotlinProject", GRADLE_VERSION)
|
||||||
val VARIANT_CONSTANT = "ForTest"
|
val VARIANT_CONSTANT = "ForTest"
|
||||||
val userVariantArg = "-Duser.variant=$VARIANT_CONSTANT"
|
val userVariantArg = "-Duser.variant=$VARIANT_CONSTANT"
|
||||||
val MEMORY_GROWTH_LIMIT_KB = 800
|
val MEMORY_GROWTH_LIMIT_KB = 800
|
||||||
@@ -91,12 +98,12 @@ class KotlinGradleIT: BaseGradleIT() {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun testLogLevelForceGC() {
|
fun testLogLevelForceGC() {
|
||||||
val debugProject = Project("simpleProject", "1.12", minLogLevel = LogLevel.DEBUG)
|
val debugProject = Project("simpleProject", GRADLE_VERSION, minLogLevel = LogLevel.DEBUG)
|
||||||
debugProject.build("build") {
|
debugProject.build("build") {
|
||||||
assertContains(CleanUpBuildListener.FORCE_SYSTEM_GC_MESSAGE)
|
assertContains(CleanUpBuildListener.FORCE_SYSTEM_GC_MESSAGE)
|
||||||
}
|
}
|
||||||
|
|
||||||
val infoProject = Project("simpleProject", "1.12", minLogLevel = LogLevel.INFO)
|
val infoProject = Project("simpleProject", GRADLE_VERSION, minLogLevel = LogLevel.INFO)
|
||||||
infoProject.build("clean", "build") {
|
infoProject.build("clean", "build") {
|
||||||
assertNotContains(CleanUpBuildListener.FORCE_SYSTEM_GC_MESSAGE)
|
assertNotContains(CleanUpBuildListener.FORCE_SYSTEM_GC_MESSAGE)
|
||||||
}
|
}
|
||||||
@@ -104,7 +111,7 @@ class KotlinGradleIT: BaseGradleIT() {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun testKotlinClasspath() {
|
fun testKotlinClasspath() {
|
||||||
Project("classpathTest", "1.6").build("build") {
|
Project("classpathTest", GRADLE_VERSION).build("build") {
|
||||||
assertSuccessful()
|
assertSuccessful()
|
||||||
assertReportExists()
|
assertReportExists()
|
||||||
assertContains(":compileKotlin", ":compileTestKotlin")
|
assertContains(":compileKotlin", ":compileTestKotlin")
|
||||||
@@ -113,7 +120,7 @@ class KotlinGradleIT: BaseGradleIT() {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun testInternalTest() {
|
fun testInternalTest() {
|
||||||
Project("internalTest", "1.6").build("build") {
|
Project("internalTest", GRADLE_VERSION).build("build") {
|
||||||
assertSuccessful()
|
assertSuccessful()
|
||||||
assertReportExists()
|
assertReportExists()
|
||||||
assertContains(":compileKotlin", ":compileTestKotlin")
|
assertContains(":compileKotlin", ":compileTestKotlin")
|
||||||
@@ -122,7 +129,7 @@ class KotlinGradleIT: BaseGradleIT() {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun testMultiprojectPluginClasspath() {
|
fun testMultiprojectPluginClasspath() {
|
||||||
Project("multiprojectClassPathTest", "1.6").build("build") {
|
Project("multiprojectClassPathTest", GRADLE_VERSION).build("build") {
|
||||||
assertSuccessful()
|
assertSuccessful()
|
||||||
assertReportExists("subproject")
|
assertReportExists("subproject")
|
||||||
assertContains(":subproject:compileKotlin", ":subproject:compileTestKotlin")
|
assertContains(":subproject:compileKotlin", ":subproject:compileTestKotlin")
|
||||||
@@ -138,7 +145,7 @@ class KotlinGradleIT: BaseGradleIT() {
|
|||||||
|
|
||||||
val incremental = defaultBuildOptions().copy(incremental = true)
|
val incremental = defaultBuildOptions().copy(incremental = true)
|
||||||
|
|
||||||
Project("multiprojectWithDependency", "1.6").build("assemble", options = incremental) {
|
Project("multiprojectWithDependency", GRADLE_VERSION).build("assemble", options = incremental) {
|
||||||
assertSuccessful()
|
assertSuccessful()
|
||||||
assertReportExists("projA")
|
assertReportExists("projA")
|
||||||
assertContains(":projA:compileKotlin")
|
assertContains(":projA:compileKotlin")
|
||||||
@@ -147,7 +154,7 @@ class KotlinGradleIT: BaseGradleIT() {
|
|||||||
assertContains(":projB:compileKotlin")
|
assertContains(":projB:compileKotlin")
|
||||||
assertNotContains("projB:compileKotlin UP-TO-DATE")
|
assertNotContains("projB:compileKotlin UP-TO-DATE")
|
||||||
}
|
}
|
||||||
Project("multiprojectWithDependency", "1.6").modify {
|
Project("multiprojectWithDependency", GRADLE_VERSION).modify {
|
||||||
val oldSrc = File(this.projectDir, "projA/src/main/kotlin/a.kt")
|
val oldSrc = File(this.projectDir, "projA/src/main/kotlin/a.kt")
|
||||||
val newSrc = File(this.projectDir, "projA/src/main/kotlin/a.kt.new")
|
val newSrc = File(this.projectDir, "projA/src/main/kotlin/a.kt.new")
|
||||||
assertTrue { oldSrc.exists() }
|
assertTrue { oldSrc.exists() }
|
||||||
@@ -167,7 +174,7 @@ class KotlinGradleIT: BaseGradleIT() {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun testKotlinInJavaRoot() {
|
fun testKotlinInJavaRoot() {
|
||||||
Project("kotlinInJavaRoot", "1.6").build("build") {
|
Project("kotlinInJavaRoot", GRADLE_VERSION).build("build") {
|
||||||
assertSuccessful()
|
assertSuccessful()
|
||||||
assertReportExists()
|
assertReportExists()
|
||||||
assertContains(":compileKotlin", ":compileTestKotlin")
|
assertContains(":compileKotlin", ":compileTestKotlin")
|
||||||
@@ -176,7 +183,7 @@ class KotlinGradleIT: BaseGradleIT() {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun testKaptSimple() {
|
fun testKaptSimple() {
|
||||||
val project = Project("kaptSimple", "1.12")
|
val project = Project("kaptSimple", GRADLE_VERSION)
|
||||||
|
|
||||||
project.build("build") {
|
project.build("build") {
|
||||||
assertSuccessful()
|
assertSuccessful()
|
||||||
@@ -196,7 +203,7 @@ class KotlinGradleIT: BaseGradleIT() {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun testKaptStubs() {
|
fun testKaptStubs() {
|
||||||
val project = Project("kaptStubs", "1.12")
|
val project = Project("kaptStubs", GRADLE_VERSION)
|
||||||
|
|
||||||
project.build("build") {
|
project.build("build") {
|
||||||
assertSuccessful()
|
assertSuccessful()
|
||||||
@@ -216,7 +223,7 @@ class KotlinGradleIT: BaseGradleIT() {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun testKaptStubsIncrementalBuild() {
|
fun testKaptStubsIncrementalBuild() {
|
||||||
val project = Project("kaptStubs", "1.12")
|
val project = Project("kaptStubs", GRADLE_VERSION)
|
||||||
|
|
||||||
project.build("build") {
|
project.build("build") {
|
||||||
assertSuccessful()
|
assertSuccessful()
|
||||||
@@ -236,7 +243,7 @@ class KotlinGradleIT: BaseGradleIT() {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun testKaptArguments() {
|
fun testKaptArguments() {
|
||||||
Project("kaptArguments", "1.12").build("build") {
|
Project("kaptArguments", GRADLE_VERSION).build("build") {
|
||||||
assertSuccessful()
|
assertSuccessful()
|
||||||
assertContains("kapt: Using class file stubs")
|
assertContains("kapt: Using class file stubs")
|
||||||
assertContains(":compileKotlin")
|
assertContains(":compileKotlin")
|
||||||
@@ -250,7 +257,7 @@ class KotlinGradleIT: BaseGradleIT() {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun testKaptInheritedAnnotations() {
|
fun testKaptInheritedAnnotations() {
|
||||||
Project("kaptInheritedAnnotations", "1.12").build("build") {
|
Project("kaptInheritedAnnotations", GRADLE_VERSION).build("build") {
|
||||||
assertSuccessful()
|
assertSuccessful()
|
||||||
assertFileExists("build/generated/source/kapt/main/TestClassGenerated.java")
|
assertFileExists("build/generated/source/kapt/main/TestClassGenerated.java")
|
||||||
assertFileExists("build/generated/source/kapt/main/AncestorClassGenerated.java")
|
assertFileExists("build/generated/source/kapt/main/AncestorClassGenerated.java")
|
||||||
@@ -261,7 +268,7 @@ class KotlinGradleIT: BaseGradleIT() {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun testKaptOutputKotlinCode() {
|
fun testKaptOutputKotlinCode() {
|
||||||
Project("kaptOutputKotlinCode", "1.12").build("build") {
|
Project("kaptOutputKotlinCode", GRADLE_VERSION).build("build") {
|
||||||
assertSuccessful()
|
assertSuccessful()
|
||||||
assertContains("kapt: Using class file stubs")
|
assertContains("kapt: Using class file stubs")
|
||||||
assertContains(":compileKotlin")
|
assertContains(":compileKotlin")
|
||||||
@@ -276,7 +283,7 @@ class KotlinGradleIT: BaseGradleIT() {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun testIncrementalPropertyFromLocalPropertiesFile() {
|
fun testIncrementalPropertyFromLocalPropertiesFile() {
|
||||||
val project = Project("kotlinProject", "2.10")
|
val project = Project("kotlinProject", GRADLE_VERSION)
|
||||||
project.setupWorkingDir()
|
project.setupWorkingDir()
|
||||||
|
|
||||||
val localPropertyFile = File(project.projectDir, "local.properties")
|
val localPropertyFile = File(project.projectDir, "local.properties")
|
||||||
|
|||||||
Reference in New Issue
Block a user