How do I integrate sonar scanner with Android 10 source tree compilation projects?

Here are the detailed compilation steps.
Step 1: Copy the hidps-native to the android source/external directory.
Step 2: Initialize the compilation environment
source build/envsetup.sh
lunch xxx (lunch Set this parameter based on site requirements. aosp can be aosp arm-eng or AOSP ARM-eng
aosp arm64-eng)
Step 3: Go to android source/external/hidps-native directory 6125 and run mm PROJECT=byd6125
8155 Run mm PROJECT=byd8155 Step 4: Copy the following files to the output package, the first is the compilation output path, For output package path behind the android source/out/target/product/XXXX/system/bin/idd metricsidd - idps hu/system/bin/idd - metrics
Note: hidps-native is a project name.
Are there any similar cases for reference?

Hi,

I don’t understand what the question is here.

 
Ann

Hi,Ann.
When users compile C++ projects from Android source code, how does the compiled project generate the compile_commands.json file (compilation database) and scan code with sonar-scanner

Hi,

That’s a compiler question that’s a bit out of scope here.

 
Ann

Hi,
With this Android source code compilation method, how to use sonar scanner to scan C++ code in combination with compilition database?My current problem is that I can’t integrate sonar, I need some reference cases.

Hi,

You should check your compiler’s documentation for how to produce a compilation database. Or check our list of supported compilers to see if you can use the build-wrapper directly.

 
Ann