Js files are not scanned in sonarqube

Hi, I am using sonarqube(v8.9.10) for my gradle project scanning. I have Installed node(v10.19.0) for javascript/typescript analysis. I have my .js files in app/assets directory. But after scanning

./gradlew sonarqube   -Dsonar.projectKey=pvsignal   -Dsonar.host.url=http://localhost:9000   -Dsonar.login=f7337813825bf85941732547f7b4ea359d1fd207 -x test --info

Sonarqube is not scanning any files inside assets directory. I can find logs regarding this file

Applying dependency management to configuration 'integrationTestCompileOnly' in project 'grails3-pvsignal'
Applying dependency management to configuration 'integrationTestCompileClasspath' in project 'grails3-pvsignal'
Applying dependency management to configuration 'integrationTestRuntimeOnly' in project 'grails3-pvsignal'
Applying dependency management to configuration 'integrationTestRuntimeClasspath' in project 'grails3-pvsignal'
Applying dependency management to configuration 'agent' in project 'grails3-pvsignal'
Applying dependency management to configuration 'console' in project 'grails3-pvsignal'
Applying dependency management to configuration 'gspCompile' in project 'grails3-pvsignal'
Applying dependency management to configuration 'assets' in project 'grails3-pvsignal'

As you can see I think it is considering assets as one of the libraries and excluding them from scanning. Can you please tell me how can i explicitly add all files in the assets folder to be scanned?

UPDATE: I have tried using
-Dsonar.source=app/assets
and it worked. But does this mean only files inside app/assets will be scanned and not any other files? How can I additionally add some folders like app/assets when I also needed other default folders to be scanned? I know I can add multiple folders using , in same config but can I add some specific folder in default folders?

Hi,

Your version is past EOL. You should upgrade to either the latest version or the current LTS at your earliest convenience. Your upgrade path is:

8.9.10 → 9.9.2 → 10.2 (last step optional)

You may find these resources helpful:

If you have questions about upgrading, feel free to open a new thread for that here.

If your issue persists after upgrade, please come back to us.

Hi Since my project is using an older version of Java for compilation(v1.8.0_292), I need a sonar version that is compatible with running and constructing a build with it. can I specify a java version for Sonarqube while java version is different my project?

Take a look at the documentation on Scanner Environment! (TLDR; you can compile using any version of Java, you just need to run the analysis with a higher version)