Hi @Shay_Gold ,
See Task dependencies for Gradle sonar scanner. Example:
Yes, it is possible, but you’ll need to experiment with defining the
sonar.tests analysis parameters. Suppose Gradle owns the scan process, then take a look at this post:
property 'sonar.sources', 'src/main/java,src/main/webapp'
property 'sonar.tests', 'src/test/java,src/frontend/test'
You may need to ensure the scope of your folders/files are within the right directory if you intend on the the Gradle scanner “owning” the scan process.
Alternatively, assuming you only have Swift and not Objective-C code (if you do, then you’ll need to use the build-wrapper), you could go the opposite direction and scan the entire project with just the pure Sonar scanner CLI and make sure to define the
sonar.java.libraries etc. parameters (see Java analysis parameters for more details).