简体   繁体   中英

Sonarqube - how to enable license-checker for Kotlin projects?

I'm setting up a Sonarqube Developer Edition server and am trying to use the license-checker plugin I got from:

https://github.com/porscheinformatik/sonarqube-licensecheck

The plugin's jar is deployed to the correct directory and I have created a new Sonar way (license) Java profile that inherits the profile Sonar way (Built-in) . In the new profile, I added the "License is not allowed" and "Dependency has unknown license" rules the plugin requires to work. I tested with a Java project and it works flawlessly.

I tried the same approach for the Kotlin profile Sonar way (license) I created and that inherits the Sonar way (Built-in) profile. But these rules are not available to Kotlin and, thus, the License check plugin does not run when I attempt to analyze a Kotlin project.

This seems to be a Java-specific plugin, but I might be mistaken. Is there a way to get this working I am not realizing?

Long story short, the plugin does not support my scenario.

Long story, my question was not clear enough and I failed to put some information as I was learning about this build myself. The project is in Kotlin and uses gradle to handle dependencies. The plugin only supports maven and NPM builds. So, for my to achieve the desired result, I would need to extend the plugin to handle the build.gradle.kts file. This task is a very big question mark in itself, so I will be looking at another alternative for the time being.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM