Missing input output annotations gradle 7.3 issue with java 17

I have upgraded to Gradle 7.3 to make it compatiple with Java17.I keep getting the below error for task buildDocker

Task :buildDocker FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Some problems were found with the configuration of task ':buildDocker' (type 'DockerTask').
  - In plugin 'docker' type 'se.transmode.gradle.plugins.docker.DockerTask' property 'apiEmail' is missing an input or output annotation.
    
    Reason: A property without annotation isn't considered during up-to-date checking.
    
    Possible solutions:
      1. Add an input or output annotation.
      2. Mark it as @Internal.
    
    Please refer to https://docs.gradle.org/7.3/userguide/validation_problems.html#missing_annotation for more details about this problem.
  - In plugin 'docker' type 'se.transmode.gradle.plugins.docker.DockerTask' property 'apiPassword' is missing an input or output annotation.
    
    Reason: A property without annotation isn't considered during up-to-date checking.
    
    Possible solutions:
      1. Add an input or output annotation.
      2. Mark it as @Internal.
    
    Please refer to https://docs.gradle.org/7.3/userguide/validation_problems.html#missing_annotation for more details about this problem.
  - In plugin 'docker' type 'se.transmode.gradle.plugins.docker.DockerTask' property 'apiUsername' is missing an input or output annotation.
    
    Reason: A property without annotation isn't considered during up-to-date checking.
    
    Possible solutions:
      1. Add an input or output annotation.
      2. Mark it as @Internal.
    
    Please refer to https://docs.gradle.org/7.3/userguide/validation_problems.html#missing_annotation for more details about this problem.
  - In plugin 'docker' type 'se.transmode.gradle.plugins.docker.DockerTask' property 'applicationName' is missing an input or output annotation.
    
    Reason: A property without annotation isn't considered during up-to-date checking.
    
    Possible solutions:
      1. Add an input or output annotation.
      2. Mark it as @Internal.
    
    Please refer to https://docs.gradle.org/7.3/userguide/validation_problems.html#missing_annotation for more details about this problem.
  - In plugin 'docker' type 'se.transmode.gradle.plugins.docker.DockerTask' property 'baseImage' is missing an input or output annotation.
    
    Reason: A property without annotation isn't considered during up-to-date checking.
    
    Possible solutions:
      1. Add an input or output annotation.
      2. Mark it as @Internal.




     The task written is build.gradle is

     task buildDocker(type: Docker, dependsOn: build) {
    applicationName = 'api'
    dockerfile = file('src/docker/Dockerfile')
    doFirst {
        copy {
            from file('src/docker')
            from war
            into stageDir
        }
    }
}

strong text

1 Like

And what is your question?
The task you have there is not compatible with Gradle 7.

yes thats correct…i updated gradle version to 7.3 which is compatiple with java 17 as we are planning to move to java 17 for all of our code base.I see this error started coming with the 7.3 version.

Is there a work around / solution for this issue? I am facing the same error

1 Like

Sure, multiple.

  • use an old Gradle version that is compatible with the unmaintained plugin you want to use
  • make the maintainer update the Plugin that had its last commit 4 years ago
  • fork the plugin and update it
  • monkey-patch the plugin with a fix
  • use a different plugin that is not unmaintained and is compatible with the Gradle version you use