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

Make AjcForkOptions abstract and instantiate it via ObjectFactory #1197

Merged
merged 1 commit into from
Sep 3, 2024

Conversation

asodja
Copy link
Contributor

@asodja asodja commented Sep 3, 2024

For better compatibility with Gradle 9.


In Gradle 9 we plan to replace task/extension properties with Provider API lazy types (Property/Provider/ConfigurableFileCollection). And with that BaseForkOptions will become abstract and have abstract methods, see change:
https://github.com/gradle/gradle/pull/30374/files#diff-c132a92f383d74b12cf1b727c41b2dbc07fffecb7f1ad19c6b1e343ee75cbd30

During smoke tests we found out that AcjForkOptions extends BaseForkOptions. But with Gradle 9 API it then fails with:

Execution failed for task ':compileAspectj'.
    > Receiver class io.freefair.gradle.plugins.aspectj.AjcForkOptions 
    does not define or inherit an implementation of the resolved method 
    'abstract org.gradle.api.provider.Property getMemoryInitialSize()' of 
    abstract class org.gradle.api.tasks.compile.BaseForkOptions.

A solution to make it compatible with Gradle 9 is to make AjcForkOptions abstract and instantiate it via ObjectFactory. This is also ok for previous Gradle versions.

@asodja asodja force-pushed the asodja/abstract-acjforkoptions branch 2 times, most recently from dbe88fe to 513b3a1 Compare September 3, 2024 08:21
@asodja asodja force-pushed the asodja/abstract-acjforkoptions branch from 513b3a1 to 4078b66 Compare September 3, 2024 08:22
@larsgrefer larsgrefer self-assigned this Sep 3, 2024
@larsgrefer larsgrefer merged commit 535dd07 into freefair:main Sep 3, 2024
10 checks passed
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

Successfully merging this pull request may close these issues.

2 participants