bytedeco / gradle-javacpp

Gradle plugins to automate the build process of JavaCPP and JavaCV
Other
57 stars 20 forks source link

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

Closed irnbrux closed 9 months ago

irnbrux commented 1 year ago

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

The reason is, that getOutputDir() has been replaced with getClassesDirectory https://github.com/gradle/gradle/commit/aeb4e00c151ad548380741d08bed5c0a9228d723#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 commented 1 year ago

Does pull #31 fixes this for you?

irnbrux commented 1 year ago

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

saudet commented 9 months ago

The fix was released with version 1.5.10. Enjoy!