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
Since gradle-ospackage-plugin version 11.6.0, code has been added to reference the
notCompatibleWithConfigurationCache
method, per this commit:https://github.com/nebula-plugins/gradle-ospackage-plugin/commit/41641474eac30e8b010e65f044bf37f5e01278e0
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: