Class ProjectProperties

java.lang.Object
org.sonarqube.gradle.ProjectProperties

public class ProjectProperties extends Object
An immutable data transfer object that holds resolved dependency information for a Gradle project.

This class is used during the Gradle execution phase to transfer resolved classpath information between tasks, specifically from SonarResolverTask to SonarTask. It is an internal implementation detail and is not exposed to users.

Purpose:

  • Carries resolved compile and test classpaths after dependency resolution
  • Supports Gradle configuration cache by being serializable/deserializable
  • Ensures immutability for safe sharing between tasks

Note: This class is for internal task-to-task communication, not for user configuration. For user-facing property configuration, see SonarProperties.

  • Field Details

    • projectName

      public final String projectName
      The Gradle project name (e.g., ":subproject" for subprojects, "" for root)
    • isRootProject

      public final Boolean isRootProject
      Whether this project is the root project of the analysis
    • compileClasspath

      public final List<String> compileClasspath
      Resolved absolute paths of compile classpath dependencies
    • testCompileClasspath

      public final List<String> testCompileClasspath
      Resolved absolute paths of test compile classpath dependencies
    • mainLibraries

      public final List<String> mainLibraries
      Filtered main libraries (subset of compileClasspath) for SonarQube analysis
    • testLibraries

      public final List<String> testLibraries
      Filtered test libraries (subset of testCompileClasspath) for SonarQube analysis
    • androidSources

      public final List<String> androidSources
      The resolved source directories for an Android project.
    • androidTests

      public final List<String> androidTests
      The resolved test directories for an Android project.