Class ResourceDetectionOptions


  • public abstract class ResourceDetectionOptions
    extends java.lang.Object
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      ResourceDetectionOptions addDefaultDetectionExclusions()
      Adds the default resource excludes for detection, which can be useful if you want to add more excludes but still want the conventional ones to be added.
      abstract org.gradle.api.provider.SetProperty<java.lang.String> getDetectionExclusionPatterns()
      Returns the list of regular expressions which will be used to exclude resources from detection.
      abstract org.gradle.api.provider.Property<java.lang.Boolean> getEnabled()
      Determines if the resources should be detected from classpath.
      abstract org.gradle.api.provider.Property<java.lang.Boolean> getIgnoreExistingResourcesConfigFile()
      If set to true, then if a classpath entry contains a META-INF/native-image resources file, then we would still try to detect resources contained in that classpath entry (e.g jar).
      abstract org.gradle.api.provider.Property<java.lang.Boolean> getRestrictToProjectDependencies()
      Determines if detection should be limited to project dependencies, in which case external dependencies will not be scanned.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ResourceDetectionOptions

        public ResourceDetectionOptions()
    • Method Detail

      • getEnabled

        @Input
        public abstract org.gradle.api.provider.Property<java.lang.Boolean> getEnabled()
        Determines if the resources should be detected from classpath. If this property is set to true, then Gradle will automatically detect resources to include from conventional places like src/main/resources.
      • getRestrictToProjectDependencies

        @Input
        public abstract org.gradle.api.provider.Property<java.lang.Boolean> getRestrictToProjectDependencies()
        Determines if detection should be limited to project dependencies, in which case external dependencies will not be scanned. Default value is true.
      • getIgnoreExistingResourcesConfigFile

        @Input
        public abstract org.gradle.api.provider.Property<java.lang.Boolean> getIgnoreExistingResourcesConfigFile()
        If set to true, then if a classpath entry contains a META-INF/native-image resources file, then we would still try to detect resources contained in that classpath entry (e.g jar). By default, this behavior is set to false, meaning that if such a file is present, detection is disabled for this particular classpath entry.
        Returns:
        the ignore property
      • getDetectionExclusionPatterns

        @Input
        public abstract org.gradle.api.provider.SetProperty<java.lang.String> getDetectionExclusionPatterns()
        Returns the list of regular expressions which will be used to exclude resources from detection.
      • addDefaultDetectionExclusions

        public ResourceDetectionOptions addDefaultDetectionExclusions()
        Adds the default resource excludes for detection, which can be useful if you want to add more excludes but still want the conventional ones to be added.