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

Version 11.6.0 requires Gradle 7.4 or later #434

Open
dave-hassett-rft opened this issue Jan 2, 2024 · 0 comments
Open

Version 11.6.0 requires Gradle 7.4 or later #434

dave-hassett-rft opened this issue Jan 2, 2024 · 0 comments

Comments

@dave-hassett-rft
Copy link

Since gradle-ospackage-plugin version 11.6.0, code has been added to reference the notCompatibleWithConfigurationCache method, per this commit:

4164147

Per the gradle javadocs, this method was introduced in Gradle version 7.4:

https://github.com/gradle/gradle/blob/243526492e347036ceda430b88f1a96b00c2fb6b/subprojects/core-api/src/main/java/org/gradle/api/Task.java#L303

This minimum Gradle version compatibility requirement is not documented, and causes silent breakage on older builds which do not fix the plugin version.

Please update the documentation to capture this requirement, or somehow update the code to throw a meaningful error message or fail gracefully. On older Gradle, we get this sort of error:

Caused by: org.gradle.api.tasks.TaskInstantiationException: Could not create task of type 'Rpm'.
	at org.gradle.api.internal.project.taskfactory.TaskFactory$1.call(TaskFactory.java:83)
	at org.gradle.api.internal.project.taskfactory.TaskFactory$1.call(TaskFactory.java:70)
	at org.gradle.util.GUtil.uncheckedCall(GUtil.java:425)
	at org.gradle.api.internal.AbstractTask.injectIntoNewInstance(AbstractTask.java:196)
	at org.gradle.api.internal.project.taskfactory.TaskFactory.create(TaskFactory.java:70)
	at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory.create(AnnotationProcessingTaskFactory.java:48)
	at org.gradle.api.internal.tasks.DefaultTaskContainer.createTask(DefaultTaskContainer.java:326)
	at org.gradle.api.internal.tasks.DefaultTaskContainer.access$200(DefaultTaskContainer.java:77)
	at org.gradle.api.internal.tasks.DefaultTaskContainer$1.call(DefaultTaskContainer.java:152)
	... 146 more
Caused by: java.lang.NoSuchMethodError: com.netflix.gradle.plugins.packaging.OsPackageAbstractArchiveTask.notCompatibleWithConfigurationCache(Ljava/lang/String;)V
	at com.netflix.gradle.plugins.packaging.OsPackageAbstractArchiveTask.<init>(OsPackageAbstractArchiveTask.groovy:14)
	at com.netflix.gradle.plugins.packaging.SystemPackagingTask.<init>(SystemPackagingTask.groovy:55)
	at com.netflix.gradle.plugins.rpm.Rpm.<init>(Rpm.groovy:41)
	at com.netflix.gradle.plugins.rpm.Rpm_Decorated.<init>(Unknown Source)
	at org.gradle.internal.instantiation.generator.AsmBackedClassGenerator$InvokeConstructorStrategy.newInstance(AsmBackedClassGenerator.java:1986)
	at org.gradle.internal.instantiation.generator.AbstractClassGenerator$GeneratedClassImpl$GeneratedConstructorImpl.newInstance(AbstractClassGenerator.java:468)
	at org.gradle.internal.instantiation.generator.DependencyInjectingInstantiator.doCreate(DependencyInjectingInstantiator.java:64)
	at org.gradle.internal.instantiation.generator.DependencyInjectingInstantiator.newInstanceWithDisplayName(DependencyInjectingInstantiator.java:50)
	at org.gradle.api.internal.project.taskfactory.TaskFactory$1.call(TaskFactory.java:76)
	... 154 more
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

No branches or pull requests

1 participant