Class LicenseChecker.Builder

    • Method Detail

      • allow

        @Stability(Experimental)
        public LicenseChecker.Builder allow​(List<String> allow)
        (experimental) List of SPDX license identifiers that are allowed to be used.

        For the license check to pass, all detected licenses MUST be in this list. Only one of allowedLicenses and prohibitedLicenses can be provided and must not be empty.

        Default: - no licenses are allowed

        Parameters:
        allow - List of SPDX license identifiers that are allowed to be used. This parameter is required.
        Returns:
        this
      • deny

        @Stability(Experimental)
        public LicenseChecker.Builder deny​(List<String> deny)
        (experimental) List of SPDX license identifiers that are prohibited to be used.

        For the license check to pass, no detected licenses can be in this list. Only one of allowedLicenses and prohibitedLicenses can be provided and must not be empty.

        Default: - no licenses are prohibited

        Parameters:
        deny - List of SPDX license identifiers that are prohibited to be used. This parameter is required.
        Returns:
        this
      • development

        @Stability(Experimental)
        public LicenseChecker.Builder development​(Boolean development)
        (experimental) Check development dependencies.

        Default: false

        Parameters:
        development - Check development dependencies. This parameter is required.
        Returns:
        this
      • production

        @Stability(Experimental)
        public LicenseChecker.Builder production​(Boolean production)
        (experimental) Check production dependencies.

        Default: true

        Parameters:
        production - Check production dependencies. This parameter is required.
        Returns:
        this
      • taskName

        @Stability(Experimental)
        public LicenseChecker.Builder taskName​(String taskName)
        (experimental) The name of the task that is added to check licenses.

        Default: "check-licenses"

        Parameters:
        taskName - The name of the task that is added to check licenses. This parameter is required.
        Returns:
        this