IBM / cics-bundle-gradle

The plugin to build and deploy CICS bundles in a Gradle build.
Eclipse Public License 2.0
7 stars 20 forks source link

I cannot use this with Gradle 8.0 (deprecated configuration option) #136

Closed JAMOGRAD closed 11 months ago

JAMOGRAD commented 1 year ago

I installed Gradle and tried to build and deploy a CICS Bundle and got the following exceptions (uisng --info --warning-mode all).

The configuration detachedConfiguration1 is both resolvable and consumable. This is considered a legacy configuration and it will eventually only be possible to be one of these. The configuration detachedConfiguration1 is both consumable and declarable. This combination is incorrect, only one of these flags should be set.

The configuration :java-bundle:classpath is both resolvable and consumable. This is considered a legacy configuration and it will eventually only be possible to be one of these. The configuration :java-bundle:classpath is both consumable and declarable. This combination is incorrect, only one of these flags should be set.

If I use Gradle 7.6 it works though

stewartfrancis commented 1 year ago

I thought I'd seen the same issue myself, but this doesn't look familiar. Maybe it's related. I think I'll try and fix the issue I saw, and then we can see if that fixes your issue. As far as I can see from the log you've provided, those messages only look like warnings, and the build should still have succeeded...

stewartfrancis commented 1 year ago

Here's the error I saw:

* Exception is:
java.lang.NoSuchMethodError: org/gradle/api/internal/artifacts/dsl/LazyPublishArtifact.<init>(Lorg/gradle/api/provider/Provider;)V (loaded from file:/usr/local/Cellar/gradle/8.2.1/libexec/lib/plugins/gradle-dependency-management-8.2.1.jar by MixInLegacyTypesClassLoader(legacy-mixin-loader)) called from class com.ibm.cics.cbgp.BundlePlugin (loaded from file:/Users/stewf/.gradle/caches/modules-2/files-2.1/com.ibm.cics/cics-bundle-gradle/1.0.3/6b07bd32b96e0eb16010d55596011f09bde94bcd/cics-bundle-gradle-1.0.3.jar by InstrumentingVisitableURLClassLoader(ClassLoaderScopeIdentifier.Id{coreAndPlugins:settings[:]:buildSrc[:]:root-project[:](export)})).
        at com.ibm.cics.cbgp.BundlePlugin.apply(BundlePlugin.kt:105)
        at com.ibm.cics.cbgp.BundlePlugin.apply(BundlePlugin.kt:24)

Which is because we've been using some internal API that's been changed/removed in Gradle 8+

ind1go commented 11 months ago

Gradle 8 is supported from version 1.0.5 of the plugin.