odemolliens / bitrise-step-gradle-dependency-checker

MIT License
3 stars 0 forks source link

Ambiguous method overloading for method java.io.File #1

Open coreform opened 2 years ago

coreform commented 2 years ago

AGP 7.2.2 Gradle 7.3.3

java --version java 15.0.2 2021-01-19 Java(TM) SE Runtime Environment (build 15.0.2+7-27) Java HotSpot(TM) 64-Bit Server VM (build 15.0.2+7-27, mixed mode, sharing)

allprojects { apply plugin: 'org.owasp.dependencycheck' dependencyCheck { autoUpdate = false format = 'HTML' //failBuildOnCVSS = 7 // commented out to not fail build if issues found, some issues cannot be fixed (yet)! failOnError = false outputDirectory = System.env.BITRISE_DEPLOY_DIR skipConfigurations += 'lintClassPath' } }

Seeing this exception and it is blocking builds since the Step is not set to skippable nor has conditional run logic.

It could be a nice feature to add conditional run logic so as to conditionally achieve skppability, e.g. run_if: '{{getenv "SOME_VAR_EXPORTED_BY_STEP_1" | ne ""}}' (see https://discuss.bitrise.io/t/run-if-previous-step-failed-doesnt-seem-to-mean-really-previous-step/4678/6 ).

`> Task :dependencyCheckAggregate FAILED

FAILURE: Build failed with an exception.

odemolliens commented 2 years ago

I don't think this should be managed by the step himself, but you can do that:

 - gradle-dependency-checker@1.0.1:
          inputs:
            - source_root_path: "./android"
          title: "Audit Android 3rd parties dependencies"
          run_if: '{{getenv "MYVAR" | eq "1"}}`
coreform commented 2 years ago

Thanks, this did the trick. Ideally we could remove that if the tool has no fatal exceptions. - gradle-dependency-checker@1: is_skippable: true

odemolliens commented 2 years ago

Yup, smthing to add on the roadmap (@imranMnts ?). MR are welcome too ;)

coreform commented 2 years ago

Workaround for me was to downgrade to 7.1.1 as the fatal exception seemed to halt execution of check analyzers (no build logs concerning them).