Interface KaptExtensionConfig

  • All Implemented Interfaces:

    
    public interface KaptExtensionConfig
    
                        

    A plugin DSL extension for configuring kapt annotation processing.

    Use the extension in your build script in the kapt block:

    kapt {
       // Your extension configuration
    }

    See also Kapt compiler plugin documentation.

    • Constructor Detail

    • Method Detail

      • getCorrectErrorTypes

         abstract Boolean getCorrectErrorTypes()

        Replaces any generated error types with error types from the generated sources.

        Default: false

      • setCorrectErrorTypes

         abstract Unit setCorrectErrorTypes(Boolean correctErrorTypes)

        Replaces any generated error types with error types from the generated sources.

        Default: false

      • getDumpDefaultParameterValues

         abstract Boolean getDumpDefaultParameterValues()

        Adds initializers to fields whose corresponding primary constructor parameters have a default value specified.

        Default: false

      • setDumpDefaultParameterValues

         abstract Unit setDumpDefaultParameterValues(Boolean dumpDefaultParameterValues)

        Adds initializers to fields whose corresponding primary constructor parameters have a default value specified.

        Default: false

      • getMapDiagnosticLocations

         abstract Boolean getMapDiagnosticLocations()

        Maps diagnostics reported on kapt stubs to their original locations in Kotlin sources.

        Default: false

      • setMapDiagnosticLocations

         abstract Unit setMapDiagnosticLocations(Boolean mapDiagnosticLocations)

        Maps diagnostics reported on kapt stubs to their original locations in Kotlin sources.

        Default: false

      • getStrictMode

         abstract Boolean getStrictMode()

        Reports any incompatibility errors found during stub generation.

        Default: false

      • setStrictMode

         abstract Unit setStrictMode(Boolean strictMode)

        Reports any incompatibility errors found during stub generation.

        Default: false

      • getShowProcessorStats

         abstract Boolean getShowProcessorStats()

        Shows annotation processor statistics in the verbose kapt log output.

        Default: false

      • setShowProcessorStats

         abstract Unit setShowProcessorStats(Boolean showProcessorStats)

        Shows annotation processor statistics in the verbose kapt log output.

        Default: false

      • getDetectMemoryLeaks

         abstract String getDetectMemoryLeaks()

        Detects memory leaks in annotation processors.

        Possible values: "default", "paranoid", "none".

        Default: default

      • setDetectMemoryLeaks

         abstract Unit setDetectMemoryLeaks(String detectMemoryLeaks)

        Detects memory leaks in annotation processors.

        Possible values: "default", "paranoid", "none".

        Default: default

      • getUseBuildCache

         abstract Boolean getUseBuildCache()

        Uses the Gradle build cache feature for kapt tasks.

        Set to false only when annotation processors used by this project are:

        • suspected of using other sources asides from the task inputs in their processing logic

        • not guaranteed to produce the same output on subsequent runs without input changes.

        Default: true

      • setUseBuildCache

         abstract Unit setUseBuildCache(Boolean useBuildCache)

        Uses the Gradle build cache feature for kapt tasks.

        Set to false only when annotation processors used by this project are:

        • suspected of using other sources asides from the task inputs in their processing logic

        • not guaranteed to produce the same output on subsequent runs without input changes.

        Default: true

      • getKeepJavacAnnotationProcessors

         abstract Boolean getKeepJavacAnnotationProcessors()

        Keeps annotation processors that are added via the annotationProcessor(..) configuration for javac java-files compilation

        Default: false

      • setKeepJavacAnnotationProcessors

         abstract Unit setKeepJavacAnnotationProcessors(Boolean keepJavacAnnotationProcessors)

        Keeps annotation processors that are added via the annotationProcessor(..) configuration for javac java-files compilation

        Default: false