Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Gradle 7 #173

Closed
swanandvk opened this issue Apr 13, 2021 · 19 comments
Closed

Support Gradle 7 #173

swanandvk opened this issue Apr 13, 2021 · 19 comments

Comments

@swanandvk
Copy link

Plugin doesn't work with gradle 7

@joschi
Copy link
Contributor

joschi commented Apr 13, 2021

@swanandvk Could you please elaborate on your issue?

  • What exactly doesn't work?
  • What's the exact error message?
  • Could you provide a minimal example demonstrating your issues?

@swanandvk
Copy link
Author

@joschi sure

  • What went wrong:
    After upgrading to gradle version 7 , the build is failing with the error message

Some problems were found with the configuration of task ':application:generateGitProperties' (type 'GenerateGitPropertiesTask').
  - Type 'GenerateGitPropertiesTask' property 'gitProperties' 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.

@joschi
Copy link
Contributor

joschi commented Apr 13, 2021

@swanandvk Which version of this plugin are you using?

@markusheiden
Copy link

markusheiden commented Apr 14, 2021

Using kotlin dsl, adoptopenjdk 16, sourceCompatibility = JavaVersion.VERSION_16

2.2.4 produces
Task :generateGitProperties FAILED
Caught exception during close(): groovy.lang.MissingPropertyException: No such property: out for class: com.gorylenko.writer.NormalizeEOLOutputStream

2.3.0 produces
Could not determine the dependencies of task ':bootJar'.
Could not create task ':classes'.
Gradle#projectsEvaluated(Closure) on build 'xxx' cannot be executed in the current context.

2.3.1-rc produces
An exception occurred applying plugin request [id: 'org.gradle.java']
Failed to apply plugin class 'org.gradle.api.plugins.JavaBasePlugin'.
Task with name 'classes' not found in root project 'xxx'.

When removing the plugin the build (gradlew clean assemble) succeeds.

@markusheiden
Copy link

The issue with 2.2.4 seems to be jdk 16 related. When using jdk 15 it works.

@joschi
Copy link
Contributor

joschi commented Apr 14, 2021

There are a lot of things mixed up here. 😓

2.2.4 produces

See #171 (comment)

2.3.0 produces

This is (unfortunately) a known broken release as stated in the README.
#169

2.3.1-rc produces

#169
#174

@usr42
Copy link

usr42 commented Apr 15, 2021

Version 2.2.4 and 2.3.1-rc are working for me. (Kotlin project with JDK11)

@swanandvk
Copy link
Author

@swanandvk Which version of this plugin are you using?

@joschi 2.2.0

@joschi
Copy link
Contributor

joschi commented Apr 15, 2021

@joschi 2.2.0

Try version 2.3.1-rc.

@swanandvk
Copy link
Author

@joschi 2.2.4 worked ✅

@librucha
Copy link

Version 2.3.x on gradle 7.0 and OpenJDK 14,16 fires error:

Could not determine the dependencies of task ':jar'.
> Could not create task ':classes'.
   > Gradle#projectsEvaluated(Closure) on build 'superman-cave' cannot be executed in the current context.

@joschi
Copy link
Contributor

joschi commented Apr 17, 2021

@librucha Try version 2.3.1-rc.

@librucha
Copy link

@joschi If you ment version "2.3.1-rc1" this is the same problem.

An exception occurred applying plugin request [id: 'org.gradle.java']
> Failed to apply plugin class 'org.gradle.api.plugins.JavaBasePlugin'.
   > Task with name 'classes' not found in root project 'superman-cave'.

It was the reason why i used "version 2.3.x" in previous post. ;)

@shalugin
Copy link
Contributor

@swanandvk please try version 2.3.1-rc3

@DuncanCasteleyn
Copy link

Tried running on Java 16 and Gradle 7.0 with 2.3.1-rc3 and this works fine for me.

@librucha
Copy link

@swanandvk please try version 2.3.1-rc3

For me is working. thanks.

@joschi
Copy link
Contributor

joschi commented Apr 28, 2021

@tha2015 Since the latest changes all seem to be working, should we close this PR and release gradle-git-properties 2.3.1?

@tha2015
Copy link
Collaborator

tha2015 commented Apr 29, 2021

@joschi Sure, v2.3.1 has been published.

@joschi
Copy link
Contributor

joschi commented Apr 29, 2021

@swanandvk Should we close this issue since the latest release is working with Gradle 7?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants