sonatype-nexus-community / scan-gradle-plugin

Gradle plugin that scans the dependencies of a Gradle project using Sonatype platforms: OSS Index and Nexus IQ Server.
Apache License 2.0
77 stars 21 forks source link

[FEATURE] Upgrade nexus-platform-api #146

Closed guillermo-varela closed 1 day ago

guillermo-varela commented 10 months ago

Currently used version is 4.0.7-01

There are particularities in this versions:

cc @bhamail / @DarthHater / @shaikhu

guillermo-varela commented 5 months ago

Tests were made using Gradle Toolchain: Before upgrading nexus-platform-api: the plugin was compiled using Java 11 and worked when running it using Java 8. Before upgrading nexus-platform-api: the plugin failed to compile.

scan-gradle-plugin/src/main/java/org/sonatype/gradle/plugins/scan/nexus/iq/scan/NexusIqScanTask.java:30: error: cannot access com.sonatype.nexus.api.common.Authentication
import com.sonatype.nexus.api.common.Authentication;
                                    ^
  bad class file: /.../.gradle/caches/modules-2/files-2.1/com.sonatype.nexus/nexus-platform-api/5.0.0-01/.../nexus-platform-api-5.0.0-01.jar(com/sonatype/nexus/api/common/Authentication.class)
    class file has wrong version 55.0, should be 52.0
    Please remove or make sure it appears in the correct subdirectory of the classpath.

Additional tests were made and upgrading to use a Gradle version 7.6.2 or higher becomes a requirement not only to build the plugin but also for projects using it.

Failed to create Jar file /.../.gradle/caches/jars-8/.../jackson-core-2.16.0.jar