CLI running gradle dependencies task of multiple projects

Viewed 61
  • I'm trying to automate gradlew dependencies for multiple projects
  • I want to use the --scan option for web output.
  • The problem is that I need to type yes for the license agreement every time.
$ for ...; do cd ...; ./gradlew dependencies --scan; done

Trying to redirect a yes answer in advance doesn't work:

$ ./gradlew dependencies --scan < "yes"    // bash: yes: No such file or directory
1 Answers

You can avoid accepting the license via command line by adding the following code to your build.gradle file:

gradleEnterprise {
    buildScan {
        termsOfServiceUrl = "https://gradle.com/terms-of-service"
        termsOfServiceAgree = "yes"
    }
}
Related