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

SourceDirectorySet.getOutputDir() has been removed in gradle >= 8 #30

Closed
irnbrux opened this issue Jul 27, 2023 · 3 comments
Closed

SourceDirectorySet.getOutputDir() has been removed in gradle >= 8 #30

irnbrux opened this issue Jul 27, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@irnbrux
Copy link

irnbrux commented Jul 27, 2023

Hi,
with gradle 8.x, loading the plugin version 1.5.9 fails with

  • What went wrong:
    An exception occurred applying plugin request [id: 'org.bytedeco.gradle-javacpp-build', version: '1.5.9']

Failed to apply plugin 'org.bytedeco.gradle-javacpp-build'.
Could not create task ':cavis-native:cavis-native-lib:javacppCompileJava'.
> 'java.io.File org.gradle.api.file.SourceDirectorySet.getOutputDir()'

The reason is, that getOutputDir() has been replaced with getClassesDirectory
gradle/gradle@aeb4e00#diff-e6ac06306676ba80c5ed481c54208dfb7cf3ade725900705537fa38a3ee426f9

Stacktrace:

Caused by: org.gradle.api.internal.tasks.DefaultTaskContainer$TaskCreationException: Could not create task ':cavis-native:cavis-native-lib:javacppCompileJava'.
at org.gradle.api.internal.tasks.DefaultTaskContainer.taskCreationException(DefaultTaskContainer.java:721)
at org.gradle.api.internal.tasks.DefaultTaskContainer.access$600(DefaultTaskContainer.java:77)
at org.gradle.api.internal.tasks.DefaultTaskContainer$TaskCreatingProvider.domainObjectCreationException(DefaultTaskContainer.java:713)
at org.gradle.api.internal.DefaultNamedDomainObjectCollection$AbstractDomainObjectCreatingProvider.tryCreate(DefaultNamedDomainObjectCollection.java:948)
at org.gradle.api.internal.tasks.DefaultTaskContainer$TaskCreatingProvider.access$1401(DefaultTaskContainer.java:660)
at org.gradle.api.internal.tasks.DefaultTaskContainer$TaskCreatingProvider$1.run(DefaultTaskContainer.java:686)
at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)
at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:47)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:68)
at org.gradle.api.internal.tasks.DefaultTaskContainer$TaskCreatingProvider.tryCreate(DefaultTaskContainer.java:682)
at ...snipp...

Caused by: java.lang.NoSuchMethodError: 'java.io.File org.gradle.api.file.SourceDirectorySet.getOutputDir()'
at org.bytedeco.gradle.javacpp.BuildPlugin$1$2.execute(BuildPlugin.java:134) <----- HERE
at org.bytedeco.gradle.javacpp.BuildPlugin$1$2.execute(BuildPlugin.java:131)
at org.gradle.api.internal.DefaultMutationGuard$1.execute(DefaultMutationGuard.java:45)
at org.gradle.api.internal.DefaultMutationGuard$1.execute(DefaultMutationGuard.java:45)
at ...snipp...

@saudet saudet added enhancement New feature or request help wanted Extra attention is needed labels Jul 27, 2023
@saudet
Copy link
Member

saudet commented Aug 17, 2023

Does pull #31 fixes this for you?

@irnbrux
Copy link
Author

irnbrux commented Aug 17, 2023

Hi,
yes, #31 works for me in Gradle 8.3

@saudet saudet removed the help wanted Extra attention is needed label Oct 22, 2023
@saudet
Copy link
Member

saudet commented Jan 29, 2024

The fix was released with version 1.5.10. Enjoy!

@saudet saudet closed this as completed Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants