# Java beta

# Configuration - .deepsource.toml

This section covers configuration details specific to the Java analyzer. Please make sure that you have read the general configuration guide first.

# name

name = "java"

# enabled

enabled = true

# meta

  • Type: Table (opens new window)
  • Presence: mandatory
  • Description: Additional data used to configure the analyzer.
  • Example:
[analyzers.meta]
  runtime_version = "8"

# runtime_version

  • Type: String (opens new window)
  • Presence: mandatory
  • Description: The Java runtime version to use when running the analyzer. OpenJDK versions 8 to 14 are currently supported.
  • Aliases: java_version
  • Example:
[analyzers.meta]
  runtime_version = "13"

# gradle_modules

  • Type: Array (opens new window)
  • Presence: optional
  • Description: A list of Gradle project paths that should be considered for analysis.
    • If you don't include this field, or set it to be an empty array ([]), the Java analyzer will include all Gradle modules for analysis.
    • This field only has effect if your repo is a valid Gradle project.
  • Example:
[analyzers.meta]
  runtime_version = "11"
  gradle_modules = [":utils", ":backend:mysql", ":backend:psql"]

TIP

Consider setting this field if your project uses separate modules to hold test code, examples or dependencies that you don't want analyzed. It's also a good idea to use this field if your project is big enough that analysis times out if all modules are analyzed at once.

# Sample config

version = 1

[[analyzers]]
name = "java"
enabled = true

  [analyzers.meta]
  runtime_version = "8"
  gradle_modules = [ ":project1" ]
Last Updated: 1/14/2021, 12:08:34 PM