[Gradle, K/N] Deprecate K/N compile classpath prop in favor of libraries

This commit is contained in:
Alexander.Likhachev
2020-10-16 01:26:48 +03:00
parent f4da283ffb
commit 0b6959ee3d
2 changed files with 2 additions and 6 deletions
@@ -297,7 +297,7 @@ fun BaseGradleIT.Project.checkTaskCompileClasspath(
val subproject = taskPath.substringBeforeLast(":").takeIf { it.isNotEmpty() && it != taskPath }
val taskName = taskPath.removePrefix(subproject.orEmpty())
val taskClass = if (isNative) "org.jetbrains.kotlin.gradle.tasks.AbstractKotlinNativeCompile<*, *>" else "AbstractCompile"
val expression = """(tasks.getByName("$taskName") as $taskClass).classpath.toList()"""
val expression = """(tasks.getByName("$taskName") as $taskClass).${if (isNative) "libraries" else "classpath"}.toList()"""
checkPrintedItems(subproject, expression, checkModulesInClasspath, checkModulesNotInClasspath)
}
@@ -146,6 +146,7 @@ abstract class AbstractKotlinNativeCompile<T : KotlinCommonToolOptions, K : Abst
}
@get:Internal
@get:Deprecated("Use libraries instead", ReplaceWith("libraries"))
val classpath: FileCollection
get() = libraries
@@ -543,7 +544,6 @@ open class KotlinNativeLink : AbstractKotlinNativeCompile<KotlinCommonToolOption
val processTests: Boolean
@Input get() = binary is TestExecutable
@get:InputFiles
@get:Classpath
val exportLibraries: FileCollection
get() = binary.let {
@@ -927,10 +927,6 @@ open class CInteropProcess : DefaultTask() {
val outputFileProvider: Provider<File> =
project.provider { destinationDir.get().resolve(outputFileName) }
@OutputDirectory
val outputDirectoryProvider: Provider<File> =
project.provider { destinationDir.get().resolve("$outputFileName-build") }
@get:InputFile
@get:PathSensitive(PathSensitivity.RELATIVE)
val defFile: File