JetBrains / gradle-qodana-plugin

⚠️ This repository is deprecated (but the plugin is moved to JetBrains/qodana-action). Go to the official docs 👇

Home Page:https://www.jetbrains.com/help/qodana/qodana-gradle-plugin.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support composite projects.

A-Imal opened this issue · comments

I'm trying to run Qodana with my projects and find it nice that there is a Gradle plugin to easily include it to them.
I found though that the Gradle plugin has not the same functionality that I have when running the Docker Image manually. This restricts me from using the Gradle plugin with my composite projects.

Running this Docker command will have the wanted effect of running the inspections for one project:

docker run --rm \
    -v /CompositeProjects/:/data/project/ \
    -v /CompositeProjects/sub-project/results:/data/results/ \
    jetbrains/qodana-jvm-community \
    --project-dir=/data/project/sub-project

The equivalent of this Docker command would be the following configuration in the Gradle plugin. The "projectDir" value is though not supported as a String for the path in the Docker container but requires a File/Folder on the local machine and would replace the "projectPath" variable.

qodana {
    // The folder which contains all required composite repositories.
    projectPath.set(project.projectDir.parentFile.toString())
    // The folder to write the results.
    resultsPath.set(project.projectDir.resolve("results").toString())
}

tasks {
    runInspections {
        // The project in the Docker container to inspect.
        projectDir.set("/data/project/${project.name}")
    }
}

Is there a way to do this with the Gradle plugin that I'm not aware of? When not, can the "projectDir" be changed to reflect a folder in the Docker container?

Thanks in advance.

Hey, @A-Imal – I'm closing Issues section in this GitHub repository. I moved your ticket to YouTrack:

QD-1877 Support composite projects
https://youtrack.jetbrains.com/issue/QD-1877