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

Use Gradles "Task Configuration Avoidance" which requires Gradle >= 4.9 #30

Merged

Conversation

larsgrefer
Copy link
Contributor

@larsgrefer larsgrefer commented Mar 3, 2019

I hereby agree to the terms of the Gradle CPD plugin Contributor License Agreement.

@coveralls
Copy link

coveralls commented Mar 3, 2019

Coverage Status

Coverage increased (+0.2%) to 85.897% when pulling 3a46032 on larsgrefer:update/gradle/4.10.3 into 15fd47a on aaschmid:master.

@aaschmid
Copy link
Owner

aaschmid commented Mar 4, 2019

@larsgrefer thanks for PR. What's the purpose of this change? I tried to have the minimal working Gradle verison in the wrapper and your changes does not require any update here - as far as I could see?

@larsgrefer
Copy link
Contributor Author

Updating to 4.10.3 allows the plugin to be built on Java 11.

@aaschmid
Copy link
Owner

aaschmid commented Mar 4, 2019

Correct, but the pre-build and provided jar runs with Java 11 and Gradle > 3.5.1. Therefore this is only an issue for the travis-ci build, right?

@larsgrefer
Copy link
Contributor Author

Gradle 3.5.1 is nearly two years old. I thought it might be time to move things a bit forward.

Updating to a newer Gradle version paves the way for new Gradle API's like

The Java 11 issue also affected my local machine. I've had to install Java 8 in order to work on #31

@aaschmid
Copy link
Owner

aaschmid commented Mar 5, 2019

Understood, to work on this plugin you need to have Java 8 right now. To run it Java 11 is perfectly OK.

Do you have any use-cases for "lazy configuration" and "task configuration avoidance" which you would like to introduce in this plugin?
Edit: I just want to support old version as long as possible because there are a lot customers out there which are not upgrading that fast. This might also be possible if upgrading wrapper and just don't use the new APIs but using the old wrapper versions it is much easier for me.
However, if there are good reasons for new features, I am fine to upgrade :-)

Travis build: The Java 11 build is unfortunately still broken. Upon first view it seems to be an issue on JaCoCo:
Caused by: java.lang.NoSuchFieldException: $jacocoAccess

@aaschmid aaschmid changed the title Update to Gradle 4.10.3 Use Gradles "Task Configuration Avoidance" which requires Gradle >= 4.9 Mar 10, 2019
@aaschmid
Copy link
Owner

Thanks for your effort @larsgrefer. I like the changes and I would like to merge them :-)

Do you have an idea about the Java 11 build problems? Could it be that PMD support Java 11 from 6.6.0 on?

@aaschmid aaschmid changed the base branch from master to task_config_avoidance April 6, 2019 13:53
@aaschmid aaschmid merged commit 4701b6c into aaschmid:task_config_avoidance Apr 6, 2019
@aaschmid
Copy link
Owner

aaschmid commented Apr 6, 2019

Hi @larsgrefer, thanks for your PR. Even if creation of Cpd tasks is not very expensive it might be a valid feature to use configuration avoidance.

@aaschmid aaschmid self-assigned this Apr 17, 2019
@aaschmid aaschmid added this to the v1.3 milestone Apr 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants