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

Plugin does not build correctly with Gradle 5 #320

Open
na-Itms opened this issue Feb 24, 2019 · 1 comment
Open

Plugin does not build correctly with Gradle 5 #320

na-Itms opened this issue Feb 24, 2019 · 1 comment

Comments

@na-Itms
Copy link
Contributor

na-Itms commented Feb 24, 2019

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 !

@artms
Copy link
Contributor

artms commented Jan 26, 2021

Use ./gradlew wrapper to build plugin, it will download (if necessary) required gradle version

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

2 participants