Artifactory gradle usage has wrong documentation for GradleDeployer.usesPlugin usage

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Blocker
    • Component/s: artifactory-plugin
    • None
    • Environment:
      Jenkins 2.33
      Script Security 1.24
      Artifactory 2.8.1
      Gradle 1.25

      In code that attempts to publish to artifactory using gradle I can't set the usesPlugin property like:
      def rtGradle = Artifactory.newGradleBuild()
      rtGradle.tool = "Gradle_2_14_1"
      rtGradle.setUsesPlugin(true)
      causes: org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: unclassified method org.jfrog.hudson.pipeline.types.GradleBuild setUsesPlugin java.lang.Boolean

      Which is @Whitelisted according to:
      https://github.com/jenkinsci/artifactory-plugin/blob/artifactory-2.8.1/src/main/java/org/jfrog/hudson/pipeline/types/deployers/GradleDeployer.java#L46

      The documented way to set this boolean is:
      rtGradle.usesPlugin = true
      but that causes: org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: unclassified field org.jfrog.hudson.pipeline.types.GradleBuild usesPlugin

      My /scriptApproval/ shows nothing to approve.

            Assignee:
            Eyal Ben Moshe
            Reporter:
            Ing. Christoph Obexer
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: