[Gradle] Remove deprecated ways to specify compiler classpath
This change removes options to specify compiler classpath using deprecated properties that were deprecated for more than 2 years.
This commit is contained in:
committed by
teamcityserver
parent
61e21ef6a2
commit
b3d8187df4
-19
@@ -103,25 +103,6 @@ class KotlinDaemonIT : BaseGradleIT() {
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testGradleBuildClasspathShouldNotBeLeakedIntoDaemonClasspathOnUsingCustomCompilerJar() {
|
||||
val testProject = Project(
|
||||
projectName = "customCompilerFile",
|
||||
)
|
||||
testProject.setupWorkingDir()
|
||||
|
||||
// copy compiler embeddable into project dir using custom name
|
||||
val classpath = System.getProperty("java.class.path").split(File.pathSeparator)
|
||||
val kotlinEmbeddableJar = File(classpath.find { it.contains("kotlin-compiler-embeddable") }!!)
|
||||
|
||||
val compilerJar = File(testProject.projectDir, "compiler.jar")
|
||||
kotlinEmbeddableJar.copyTo(compilerJar)
|
||||
|
||||
testProject.build("build") {
|
||||
assertGradleClasspathNotLeaked()
|
||||
}
|
||||
}
|
||||
|
||||
private fun CompiledProject.assertGradleClasspathNotLeaked() {
|
||||
assertContains("Kotlin compiler classpath:")
|
||||
val daemonClasspath = output.lineSequence().find {
|
||||
|
||||
-17
@@ -367,23 +367,6 @@ class KotlinGradleIT : BaseGradleIT() {
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testCustomCompilerFile() {
|
||||
val project = Project("customCompilerFile")
|
||||
project.setupWorkingDir()
|
||||
|
||||
// copy compiler embeddable to project dir using custom name
|
||||
val classpath = System.getProperty("java.class.path").split(File.pathSeparator)
|
||||
val kotlinEmbeddableJar = File(classpath.find { it.contains("kotlin-compiler-embeddable") })
|
||||
val compilerJar = File(project.projectDir, "compiler.jar")
|
||||
kotlinEmbeddableJar.copyTo(compilerJar)
|
||||
|
||||
project.build("build") {
|
||||
assertSuccessful()
|
||||
assertContains("Kotlin compiler classpath: $compilerJar")
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testFreeCompilerArgs() {
|
||||
val project = Project("kotlinProject")
|
||||
|
||||
+2
-2
@@ -85,9 +85,9 @@ class UpToDateIT : BaseGradleIT() {
|
||||
buildGradle.appendText("""${'\n'}
|
||||
// Add Kapt to the project to test its input checks as well:
|
||||
apply plugin: 'kotlin-kapt'
|
||||
compileKotlin.compilerClasspath = files($originalPaths).toList()
|
||||
compileKotlin.getDefaultCompilerClasspath${'$'}kotlin_gradle_plugin().setFrom(files($originalPaths).toList())
|
||||
afterEvaluate {
|
||||
kaptGenerateStubsKotlin.compilerClasspath = files($originalPaths).toList()
|
||||
kaptGenerateStubsKotlin.getDefaultCompilerClasspath${'$'}kotlin_gradle_plugin().setFrom(files($originalPaths).toList())
|
||||
}
|
||||
""".trimIndent())
|
||||
}
|
||||
|
||||
-23
@@ -1,23 +0,0 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: "kotlin"
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testImplementation 'junit:junit:4.12'
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
}
|
||||
|
||||
compileKotlin.compilerJarFile = project.file("compiler.jar")
|
||||
Reference in New Issue
Block a user