Skip to content

Commit

Permalink
Use @InputFile on RepositoryConfig#getCustomKeyFile (#560)
Browse files Browse the repository at this point in the history
Gradle displays this message (without failing) with version 7.6:

    > Task :currentVersion
    Execution optimizations have been disabled for task ':currentVersion' to ensure correctness due to the following reasons:
      - In plugin 'pl.allegro.tech.build.axion.release.ReleasePlugin$Inject' type 'pl.allegro.tech.build.axion.release.OutputCurrentVersionTask' property 'versionConfig.repository.customKeyFile' has @input annotation used on property of type 'RegularFileProperty'. Reason: A property of type 'RegularFileProperty' annotated with @input cannot determine how to interpret the file. Please refer to https://docs.gradle.org/7.6/userguide/validation_problems.html#incorrect_use_of_input_annotation for more details about this problem.

Fixes #559
  • Loading branch information
jcgay authored Nov 28, 2022
1 parent c73b032 commit e628e66
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import org.gradle.api.provider.Property
import org.gradle.api.provider.Provider
import org.gradle.api.tasks.Input
import org.gradle.api.tasks.InputDirectory
import org.gradle.api.tasks.InputFile
import org.gradle.api.tasks.Optional

import javax.inject.Inject
Expand Down Expand Up @@ -56,7 +57,7 @@ abstract class RepositoryConfig extends BaseExtension {
@Optional
abstract Property<String> getCustomKey()

@Input
@InputFile
@Optional
abstract RegularFileProperty getCustomKeyFile()

Expand Down

0 comments on commit e628e66

Please sign in to comment.