phabricator-jenkins-plugin icon indicating copy to clipboard operation
phabricator-jenkins-plugin copied to clipboard

Plugin does not build correctly with Gradle 5

Open na-Itms opened this issue 5 years ago • 1 comments

Building with Gradle 5.2.1 seems to work, but the resulting hpi plugin is broken. Running gradle test fails with a lot of NullPointerExceptions and AssertionErrors.

Building with Gradle 4.10.3 and running gradle test works, but outputs the following:

> Task :compileJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: phabricator-jenkins-plugin/src/main/java/com/uber/jenkins/phabricator/PhabricatorBuildWrapper.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :compileTestJava
warning: Supported source version 'RELEASE_6' from annotation processor 'org.gradle.api.internal.tasks.compile.processing.NonIncrementalProcessor' less than -source '1.8'
Note: phabricator-jenkins-plugin/src/test/java/com/uber/jenkins/phabricator/PhabricatorBuildWrapperTest.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 warning

Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/4.10.3/userguide/command_line_interface.html#sec:command_line_warnings

Extra output of gradle test --warning-mode all:

> Configure project :
As part of making the publishing plugins stable, the 'deferred configurable' behavior of the 'publishing {}' block has been deprecated. In Gradle 5.0 the 'enableFeaturePreview('STABLE_PUBLISHING')' flag will be removed and the new behavior will become the default. Please add 'enableFeaturePreview('STABLE_PUBLISHING')' to your settings file and do a test run by publishing to a local repository. If all artifacts are published as expected, there is nothing else to do. If the published artifacts change unexpectedly, please see the migration guide for more details: https://docs.gradle.org/4.10.3/userguide/publishing_maven.html#publishing_maven:deferred_configuration.

> Task :compileJava
Detecting annotation processors on the compile classpath has been deprecated. Gradle 5.0 will ignore annotation processors on the compile classpath. The following annotation processors were detected on the compile classpath: 'jenkins.PluginSubtypeMarker' and 'org.kohsuke.stapler.jsr269.ConstructorProcessor' and 'org.kohsuke.stapler.jsr269.ExportedBeanAnnotationProcessor' and 'org.kohsuke.stapler.jsr269.QueryParameterAnnotationProcessor' and 'org.kohsuke.wpc.ProcessorImpl' and 'org.jvnet.hudson.annotation_indexer.AnnotationProcessorImpl' and 'net.java.sezpoz.impl.Indexer6'.  Please add them to the annotation processor path instead. If you did not intend to use annotation processors, you can use the '-proc:none' compiler argument to ignore them.

I am not familiar with the Gradle build system but I would be happy to provide the output if you want me to perform some tests. Thanks in advance !

na-Itms avatar Feb 24 '19 15:02 na-Itms