n0mer / gradle-git-properties

Gradle plugin for `git.properties` file generation
https://plugins.gradle.org/plugin/com.gorylenko.gradle-git-properties
Apache License 2.0
323 stars 55 forks source link

Support Gradle 7 #173

Closed swanandvk closed 3 years ago

swanandvk commented 3 years ago

Plugin doesn't work with gradle 7

joschi commented 3 years ago

@swanandvk Could you please elaborate on your issue?

swanandvk commented 3 years ago

@joschi sure

Some problems were found with the configuration of task ':application:generateGitProperties' (type 'GenerateGitPropertiesTask').

joschi commented 3 years ago

@swanandvk Which version of this plugin are you using?

markusheiden commented 3 years ago

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 commented 3 years ago

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

joschi commented 3 years ago

There are a lot of things mixed up here. 😓

2.2.4 produces

See https://github.com/n0mer/gradle-git-properties/issues/171#issuecomment-817569604

2.3.0 produces

This is (unfortunately) a known broken release as stated in the README. https://github.com/n0mer/gradle-git-properties/issues/169

2.3.1-rc produces

https://github.com/n0mer/gradle-git-properties/issues/169 https://github.com/n0mer/gradle-git-properties/pull/174

usr42 commented 3 years ago

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

swanandvk commented 3 years ago

@swanandvk Which version of this plugin are you using?

@joschi 2.2.0

joschi commented 3 years ago

@joschi 2.2.0

Try version 2.3.1-rc.

swanandvk commented 3 years ago

@joschi 2.2.4 worked ✅

librucha commented 3 years ago

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 commented 3 years ago

@librucha Try version 2.3.1-rc.

librucha commented 3 years ago

@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 commented 3 years ago

@swanandvk please try version 2.3.1-rc3

DuncanCasteleyn commented 3 years ago

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

librucha commented 3 years ago

@swanandvk please try version 2.3.1-rc3

For me is working. thanks.

joschi commented 3 years ago

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

tha2015 commented 3 years ago

@joschi Sure, v2.3.1 has been published.

joschi commented 3 years ago

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