Revert usage of NormalizeLineEndings
This annotation causes wrong UP-TO-DATE checks leading to unexpected build failures. ^KT-52313 Fixed
This commit is contained in:
-8
@@ -14,7 +14,6 @@ import org.gradle.api.provider.Property
|
||||
import org.gradle.api.tasks.*
|
||||
import org.gradle.api.tasks.util.PatternFilterable
|
||||
import org.gradle.work.Incremental
|
||||
import org.gradle.work.NormalizeLineEndings
|
||||
import org.jetbrains.kotlin.gradle.dsl.KotlinCompile
|
||||
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmOptions
|
||||
import org.jetbrains.kotlin.gradle.plugin.CompilerPluginConfig
|
||||
@@ -22,7 +21,6 @@ import org.jetbrains.kotlin.gradle.plugin.CompilerPluginConfig
|
||||
interface KotlinCompileTool : PatternFilterable, Task {
|
||||
@get:InputFiles
|
||||
@get:SkipWhenEmpty
|
||||
@get:NormalizeLineEndings
|
||||
@get:IgnoreEmptyDirectories
|
||||
@get:PathSensitive(PathSensitivity.RELATIVE)
|
||||
val sources: FileCollection
|
||||
@@ -40,7 +38,6 @@ interface KotlinCompileTool : PatternFilterable, Task {
|
||||
fun setSource(vararg sources: Any)
|
||||
|
||||
@get:Classpath
|
||||
@get:NormalizeLineEndings
|
||||
@get:Incremental
|
||||
val libraries: ConfigurableFileCollection
|
||||
|
||||
@@ -53,7 +50,6 @@ interface BaseKotlinCompile : KotlinCompileTool {
|
||||
@get:Internal
|
||||
val friendPaths: ConfigurableFileCollection
|
||||
|
||||
@get:NormalizeLineEndings
|
||||
@get:Classpath
|
||||
val pluginClasspath: ConfigurableFileCollection
|
||||
|
||||
@@ -92,7 +88,6 @@ interface BaseKapt : Task {
|
||||
|
||||
//part of kaptClasspath consisting from external artifacts only
|
||||
//basically kaptClasspath = kaptExternalClasspath + artifacts built locally
|
||||
@get:NormalizeLineEndings
|
||||
@get:Classpath
|
||||
val kaptExternalClasspath: ConfigurableFileCollection
|
||||
|
||||
@@ -121,7 +116,6 @@ interface BaseKapt : Task {
|
||||
@get:Internal
|
||||
val stubsDir: DirectoryProperty
|
||||
|
||||
@get:NormalizeLineEndings
|
||||
@get:Classpath
|
||||
val kaptClasspath: ConfigurableFileCollection
|
||||
|
||||
@@ -136,7 +130,6 @@ interface BaseKapt : Task {
|
||||
val sourceSetName: Property<String>
|
||||
|
||||
@get:InputFiles
|
||||
@get:NormalizeLineEndings
|
||||
@get:IgnoreEmptyDirectories
|
||||
@get:Incremental
|
||||
@get:PathSensitive(PathSensitivity.RELATIVE)
|
||||
@@ -154,7 +147,6 @@ interface Kapt : BaseKapt {
|
||||
@get:Input
|
||||
val addJdkClassesToClasspath: Property<Boolean>
|
||||
|
||||
@get:NormalizeLineEndings
|
||||
@get:Classpath
|
||||
val kaptJars: ConfigurableFileCollection
|
||||
}
|
||||
-3
@@ -22,7 +22,6 @@ import org.gradle.api.file.ConfigurableFileCollection
|
||||
import org.gradle.api.provider.Property
|
||||
import org.gradle.api.tasks.*
|
||||
import org.gradle.work.Incremental
|
||||
import org.gradle.work.NormalizeLineEndings
|
||||
import org.gradle.workers.WorkerExecutor
|
||||
import org.jetbrains.kotlin.cli.common.arguments.K2JVMCompilerArguments
|
||||
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmOptionsImpl
|
||||
@@ -62,7 +61,6 @@ abstract class KaptGenerateStubsTask @Inject constructor(
|
||||
* Changes in this additional sources will trigger stubs regeneration,
|
||||
* but the sources themselves will not be used to find kapt annotations and generate stubs.
|
||||
*/
|
||||
@get:NormalizeLineEndings
|
||||
@get:InputFiles
|
||||
@get:IgnoreEmptyDirectories
|
||||
@get:PathSensitive(PathSensitivity.RELATIVE)
|
||||
@@ -78,7 +76,6 @@ abstract class KaptGenerateStubsTask @Inject constructor(
|
||||
// Task need to run even if there is no Kotlin sources, but only Java
|
||||
@get:Incremental
|
||||
@get:InputFiles
|
||||
@get:NormalizeLineEndings
|
||||
@get:IgnoreEmptyDirectories
|
||||
@get:PathSensitive(PathSensitivity.RELATIVE)
|
||||
override val sources: FileCollection = super.sources
|
||||
|
||||
-4
@@ -11,7 +11,6 @@ import org.gradle.api.provider.Provider
|
||||
import org.gradle.api.tasks.*
|
||||
import org.gradle.work.Incremental
|
||||
import org.gradle.work.InputChanges
|
||||
import org.gradle.work.NormalizeLineEndings
|
||||
import org.jetbrains.kotlin.build.report.metrics.BuildMetricsReporter
|
||||
import org.jetbrains.kotlin.build.report.metrics.BuildMetricsReporterImpl
|
||||
import org.jetbrains.kotlin.gradle.internal.kapt.incremental.ClasspathSnapshot
|
||||
@@ -42,13 +41,11 @@ abstract class KaptTask @Inject constructor(
|
||||
outputs.cacheIf(reason) { useBuildCache }
|
||||
}
|
||||
|
||||
@get:NormalizeLineEndings
|
||||
@get:Classpath
|
||||
abstract val compilerClasspath: ConfigurableFileCollection
|
||||
|
||||
@get:PathSensitive(PathSensitivity.NONE)
|
||||
@get:Incremental
|
||||
@get:NormalizeLineEndings
|
||||
@get:IgnoreEmptyDirectories
|
||||
@get:Optional
|
||||
@get:InputFiles
|
||||
@@ -92,7 +89,6 @@ abstract class KaptTask @Inject constructor(
|
||||
level = DeprecationLevel.ERROR
|
||||
)
|
||||
@get:Incremental
|
||||
@get:NormalizeLineEndings
|
||||
@get:Classpath
|
||||
internal val internalNonAbiClasspath: FileCollection = project.objects.fileCollection().from(
|
||||
{ if (includeCompileClasspath.get()) classpath else null }
|
||||
|
||||
-2
@@ -12,7 +12,6 @@ import org.gradle.api.provider.Property
|
||||
import org.gradle.api.provider.Provider
|
||||
import org.gradle.api.tasks.*
|
||||
import org.gradle.work.InputChanges
|
||||
import org.gradle.work.NormalizeLineEndings
|
||||
import org.jetbrains.kotlin.cli.common.arguments.K2JVMCompilerArguments
|
||||
import org.jetbrains.kotlin.compilerRunner.GradleCompilerEnvironment
|
||||
import org.jetbrains.kotlin.compilerRunner.GradleCompilerRunner
|
||||
@@ -36,7 +35,6 @@ abstract class KaptWithKotlincTask @Inject constructor(
|
||||
CompilerArgumentAwareWithInput<K2JVMCompilerArguments>,
|
||||
CompileUsingKotlinDaemonWithNormalization {
|
||||
|
||||
@get:NormalizeLineEndings
|
||||
@get:Classpath
|
||||
abstract val pluginClasspath: ConfigurableFileCollection
|
||||
|
||||
|
||||
-3
@@ -9,7 +9,6 @@ import org.gradle.api.artifacts.transform.*
|
||||
import org.gradle.api.file.FileSystemLocation
|
||||
import org.gradle.api.provider.Provider
|
||||
import org.gradle.api.tasks.Classpath
|
||||
import org.gradle.work.NormalizeLineEndings
|
||||
import org.jetbrains.org.objectweb.asm.ClassReader
|
||||
import org.jetbrains.org.objectweb.asm.ClassWriter
|
||||
import java.io.*
|
||||
@@ -22,7 +21,6 @@ private const val MODULE_INFO = "module-info.class"
|
||||
@CacheableTransform
|
||||
abstract class StructureTransformAction : TransformAction<TransformParameters.None> {
|
||||
|
||||
@get:NormalizeLineEndings
|
||||
@get:InputArtifact
|
||||
@get:Classpath
|
||||
abstract val inputArtifact: Provider<FileSystemLocation>
|
||||
@@ -45,7 +43,6 @@ abstract class StructureTransformAction : TransformAction<TransformParameters.No
|
||||
@CacheableTransform
|
||||
abstract class StructureTransformLegacyAction : TransformAction<TransformParameters.None> {
|
||||
|
||||
@get:NormalizeLineEndings
|
||||
@get:InputArtifact
|
||||
@get:Classpath
|
||||
abstract val inputArtifact: File
|
||||
|
||||
-2
@@ -12,7 +12,6 @@ import org.gradle.api.provider.Property
|
||||
import org.gradle.api.provider.Provider
|
||||
import org.gradle.api.tasks.Classpath
|
||||
import org.gradle.api.tasks.Internal
|
||||
import org.gradle.work.NormalizeLineEndings
|
||||
import org.jetbrains.kotlin.build.report.metrics.*
|
||||
import org.jetbrains.kotlin.gradle.report.BuildMetricsReporterService
|
||||
import org.jetbrains.kotlin.incremental.classpathDiff.ClassSnapshotGranularity
|
||||
@@ -35,7 +34,6 @@ abstract class ClasspathEntrySnapshotTransform : TransformAction<ClasspathEntryS
|
||||
abstract val buildMetricsReporterService: Property<BuildMetricsReporterService>
|
||||
}
|
||||
|
||||
@get:NormalizeLineEndings
|
||||
@get:Classpath
|
||||
@get:InputArtifact
|
||||
abstract val inputArtifact: Provider<FileSystemLocation>
|
||||
|
||||
-2
@@ -11,7 +11,6 @@ import org.gradle.api.file.ProjectLayout
|
||||
import org.gradle.api.model.ObjectFactory
|
||||
import org.gradle.api.provider.Property
|
||||
import org.gradle.api.tasks.*
|
||||
import org.gradle.work.NormalizeLineEndings
|
||||
import org.gradle.workers.WorkerExecutor
|
||||
import org.jetbrains.kotlin.cli.common.arguments.K2JSCompilerArguments
|
||||
import org.jetbrains.kotlin.cli.common.arguments.parseCommandLineArguments
|
||||
@@ -91,7 +90,6 @@ abstract class KotlinJsIrLink @Inject constructor(
|
||||
|
||||
@get:SkipWhenEmpty
|
||||
@get:IgnoreEmptyDirectories
|
||||
@get:NormalizeLineEndings
|
||||
@get:InputDirectory
|
||||
@get:PathSensitive(PathSensitivity.RELATIVE)
|
||||
internal abstract val entryModule: DirectoryProperty
|
||||
|
||||
-3
@@ -7,7 +7,6 @@ package org.jetbrains.kotlin.gradle.targets.native.internal
|
||||
|
||||
import org.gradle.api.provider.Provider
|
||||
import org.gradle.api.tasks.*
|
||||
import org.gradle.work.NormalizeLineEndings
|
||||
import org.jetbrains.kotlin.commonizer.CommonizerDependency
|
||||
import org.jetbrains.kotlin.commonizer.TargetedCommonizerDependency
|
||||
import org.jetbrains.kotlin.commonizer.allLeaves
|
||||
@@ -32,7 +31,6 @@ internal open class CInteropCommonizerTask : AbstractCInteropCommonizerTask() {
|
||||
@get:Input val konanTarget: KonanTarget,
|
||||
@get:Internal val sourceSets: Provider<Set<KotlinSourceSet>>,
|
||||
|
||||
@get:NormalizeLineEndings
|
||||
@get:Classpath
|
||||
val libraryFile: Provider<File>
|
||||
) {
|
||||
@@ -53,7 +51,6 @@ internal open class CInteropCommonizerTask : AbstractCInteropCommonizerTask() {
|
||||
get() = getAllInteropsGroups().map { outputDirectory(it) }.toSet()
|
||||
|
||||
@Suppress("unused") // Used for UP-TO-DATE check
|
||||
@get:NormalizeLineEndings
|
||||
@get:Classpath
|
||||
val commonizedNativeDistributionDependencies: Set<File>
|
||||
get() = getAllInteropsGroups().flatMap { group -> group.targets }
|
||||
|
||||
-8
@@ -21,7 +21,6 @@ import org.gradle.api.file.FileTree
|
||||
import org.gradle.api.model.ObjectFactory
|
||||
import org.gradle.api.provider.Provider
|
||||
import org.gradle.api.tasks.*
|
||||
import org.gradle.work.NormalizeLineEndings
|
||||
import org.jetbrains.kotlin.cli.common.arguments.CommonCompilerArguments
|
||||
import org.jetbrains.kotlin.cli.common.arguments.CommonToolArguments
|
||||
import org.jetbrains.kotlin.compilerRunner.*
|
||||
@@ -159,7 +158,6 @@ abstract class AbstractKotlinNativeCompile<
|
||||
compilation.konanTarget
|
||||
}
|
||||
|
||||
@get:NormalizeLineEndings
|
||||
@get:Classpath
|
||||
override val libraries: ConfigurableFileCollection by project.provider {
|
||||
// Avoid resolving these dependencies during task graph construction when we can't build the target:
|
||||
@@ -170,7 +168,6 @@ abstract class AbstractKotlinNativeCompile<
|
||||
else objectFactory.fileCollection()
|
||||
}
|
||||
|
||||
@get:NormalizeLineEndings
|
||||
@get:Classpath
|
||||
protected val friendModule: FileCollection by project.provider {
|
||||
project.files(compilation.friendPaths)
|
||||
@@ -236,7 +233,6 @@ abstract class AbstractKotlinNativeCompile<
|
||||
get() = compilerPluginOptions.arguments
|
||||
|
||||
@Optional
|
||||
@NormalizeLineEndings
|
||||
@Classpath
|
||||
open var compilerPluginClasspath: FileCollection? = null
|
||||
|
||||
@@ -548,7 +544,6 @@ constructor(
|
||||
val processTests: Boolean
|
||||
@Input get() = binary is TestExecutable
|
||||
|
||||
@get:NormalizeLineEndings
|
||||
@get:Classpath
|
||||
val exportLibraries: FileCollection by project.provider {
|
||||
binary.let {
|
||||
@@ -1099,7 +1094,6 @@ open class CInteropProcess @Inject constructor(@get:Internal val settings: Defau
|
||||
@OutputFile
|
||||
val outputFileProvider: Provider<File> = project.provider { destinationDir.get().resolve(outputFileName) }
|
||||
|
||||
@get:NormalizeLineEndings
|
||||
@get:InputFile
|
||||
@get:PathSensitive(PathSensitivity.RELATIVE)
|
||||
val defFile: File
|
||||
@@ -1115,7 +1109,6 @@ open class CInteropProcess @Inject constructor(@get:Internal val settings: Defau
|
||||
@Input get() = settings.linkerOpts
|
||||
|
||||
@get:IgnoreEmptyDirectories
|
||||
@get:NormalizeLineEndings
|
||||
@get:InputFiles
|
||||
@get:PathSensitive(PathSensitivity.RELATIVE)
|
||||
val headers: FileCollection
|
||||
@@ -1128,7 +1121,6 @@ open class CInteropProcess @Inject constructor(@get:Internal val settings: Defau
|
||||
@Input get() = settings.includeDirs.headerFilterDirs.files
|
||||
|
||||
@get:IgnoreEmptyDirectories
|
||||
@get:NormalizeLineEndings
|
||||
@get:InputFiles
|
||||
@get:PathSensitive(PathSensitivity.RELATIVE)
|
||||
val libraries: FileCollection
|
||||
|
||||
-2
@@ -21,7 +21,6 @@ import org.gradle.api.model.ObjectFactory
|
||||
import org.gradle.api.provider.Provider
|
||||
import org.gradle.api.tasks.*
|
||||
import org.gradle.work.InputChanges
|
||||
import org.gradle.work.NormalizeLineEndings
|
||||
import org.gradle.workers.WorkerExecutor
|
||||
import org.jetbrains.kotlin.cli.common.arguments.K2MetadataCompilerArguments
|
||||
import org.jetbrains.kotlin.compilerRunner.GradleCompilerEnvironment
|
||||
@@ -86,7 +85,6 @@ abstract class KotlinCompileCommon @Inject constructor(
|
||||
}
|
||||
|
||||
@get:PathSensitive(PathSensitivity.RELATIVE)
|
||||
@get:NormalizeLineEndings
|
||||
@get:IgnoreEmptyDirectories
|
||||
@get:InputFiles
|
||||
internal val refinesMetadataPaths: ConfigurableFileCollection = objectFactory.fileCollection()
|
||||
|
||||
-3
@@ -23,7 +23,6 @@ import org.gradle.api.tasks.*
|
||||
import org.gradle.work.ChangeType
|
||||
import org.gradle.work.Incremental
|
||||
import org.gradle.work.InputChanges
|
||||
import org.gradle.work.NormalizeLineEndings
|
||||
import org.jetbrains.kotlin.cli.common.arguments.DevModeOverwritingStrategies
|
||||
import org.jetbrains.kotlin.cli.common.arguments.K2JSDceArguments
|
||||
import org.jetbrains.kotlin.cli.js.dce.K2JSDce
|
||||
@@ -79,13 +78,11 @@ abstract class KotlinJsDce @Inject constructor(
|
||||
// Source could be empty, while classpath not
|
||||
@get:Incremental
|
||||
@get:InputFiles
|
||||
@get:NormalizeLineEndings
|
||||
@get:IgnoreEmptyDirectories
|
||||
@get:PathSensitive(PathSensitivity.RELATIVE)
|
||||
override val sources: FileCollection = super.sources
|
||||
|
||||
@get:Incremental
|
||||
@get:NormalizeLineEndings
|
||||
@get:InputFiles
|
||||
abstract override val libraries: ConfigurableFileCollection
|
||||
|
||||
|
||||
-12
@@ -28,7 +28,6 @@ import org.gradle.api.tasks.util.PatternSet
|
||||
import org.gradle.work.ChangeType
|
||||
import org.gradle.work.Incremental
|
||||
import org.gradle.work.InputChanges
|
||||
import org.gradle.work.NormalizeLineEndings
|
||||
import org.gradle.workers.WorkerExecutor
|
||||
import org.jetbrains.kotlin.build.DEFAULT_KOTLIN_SOURCE_FILES_EXTENSIONS
|
||||
import org.jetbrains.kotlin.build.report.metrics.*
|
||||
@@ -162,7 +161,6 @@ abstract class AbstractKotlinCompileTool<T : CommonToolArguments> @Inject constr
|
||||
*
|
||||
* Empty classpath will fail the build.
|
||||
*/
|
||||
@get:NormalizeLineEndings
|
||||
@get:Classpath
|
||||
internal val defaultCompilerClasspath: ConfigurableFileCollection =
|
||||
project.objects.fileCollection()
|
||||
@@ -299,7 +297,6 @@ abstract class AbstractKotlinCompile<T : CommonCompilerArguments> @Inject constr
|
||||
|
||||
@get:InputFiles
|
||||
@get:IgnoreEmptyDirectories
|
||||
@get:NormalizeLineEndings
|
||||
@get:Incremental
|
||||
@get:PathSensitive(PathSensitivity.RELATIVE)
|
||||
internal val commonSourceSet: ConfigurableFileCollection = objectFactory.fileCollection()
|
||||
@@ -548,13 +545,11 @@ abstract class KotlinCompile @Inject constructor(
|
||||
abstract val useClasspathSnapshot: Property<Boolean>
|
||||
|
||||
@get:Classpath
|
||||
@get:NormalizeLineEndings
|
||||
@get:Incremental
|
||||
@get:Optional // Set if useClasspathSnapshot == true
|
||||
abstract val classpathSnapshot: ConfigurableFileCollection
|
||||
|
||||
@get:Classpath
|
||||
@get:NormalizeLineEndings
|
||||
@get:Incremental
|
||||
@get:Optional // Set if useClasspathSnapshot == false (to restore the existing classpath annotations when the feature is disabled)
|
||||
abstract val classpath: ConfigurableFileCollection
|
||||
@@ -641,7 +636,6 @@ abstract class KotlinCompile @Inject constructor(
|
||||
|
||||
@get:InputFiles
|
||||
@get:SkipWhenEmpty
|
||||
@get:NormalizeLineEndings
|
||||
@get:IgnoreEmptyDirectories
|
||||
@get:PathSensitive(PathSensitivity.RELATIVE)
|
||||
internal open val scriptSources: FileCollection = scriptSourceFiles
|
||||
@@ -803,7 +797,6 @@ abstract class KotlinCompile @Inject constructor(
|
||||
|
||||
@get:Incremental
|
||||
@get:InputFiles
|
||||
@get:NormalizeLineEndings
|
||||
@get:IgnoreEmptyDirectories
|
||||
@get:PathSensitive(PathSensitivity.RELATIVE)
|
||||
open val javaSources: FileCollection = objectFactory.fileCollection()
|
||||
@@ -821,7 +814,6 @@ abstract class KotlinCompile @Inject constructor(
|
||||
*/
|
||||
@get:Incremental
|
||||
@get:InputFiles
|
||||
@get:NormalizeLineEndings
|
||||
@get:IgnoreEmptyDirectories
|
||||
@get:PathSensitive(PathSensitivity.RELATIVE)
|
||||
internal open val androidLayoutResources: FileCollection = androidLayoutResourceFiles
|
||||
@@ -968,7 +960,6 @@ abstract class Kotlin2JsCompile @Inject constructor(
|
||||
|
||||
@get:InputFiles
|
||||
@get:IgnoreEmptyDirectories
|
||||
@get:NormalizeLineEndings
|
||||
@get:Incremental
|
||||
@get:Optional
|
||||
@get:PathSensitive(PathSensitivity.RELATIVE)
|
||||
@@ -985,7 +976,6 @@ abstract class Kotlin2JsCompile @Inject constructor(
|
||||
@Suppress("unused")
|
||||
@get:InputFiles
|
||||
@get:IgnoreEmptyDirectories
|
||||
@get:NormalizeLineEndings
|
||||
@get:Optional
|
||||
@get:PathSensitive(PathSensitivity.RELATIVE)
|
||||
internal val sourceMapBaseDirs: FileCollection?
|
||||
@@ -1116,7 +1106,6 @@ abstract class Kotlin2JsCompile @Inject constructor(
|
||||
}
|
||||
|
||||
data class KotlinCompilerPluginData(
|
||||
@get:NormalizeLineEndings
|
||||
@get:Classpath
|
||||
val classpath: FileCollection,
|
||||
|
||||
@@ -1135,7 +1124,6 @@ data class KotlinCompilerPluginData(
|
||||
|
||||
@get:InputFiles
|
||||
@get:IgnoreEmptyDirectories
|
||||
@get:NormalizeLineEndings
|
||||
@get:PathSensitive(PathSensitivity.RELATIVE)
|
||||
val inputFiles: Set<File>,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user