Interface IvyArtifactRepository

    • Method Detail

      • getUrl

        java.net.URI getUrl()
        The base URL of this repository.
        Specified by:
        getUrl in interface UrlArtifactRepository
        Returns:
        The URL.
      • setUrl

        void setUrl​(java.net.URI url)
        Sets the base URL of this repository.
        Specified by:
        setUrl in interface UrlArtifactRepository
        Parameters:
        url - The base URL.
        Since:
        4.0
      • setUrl

        void setUrl​(java.lang.Object url)
        Sets the base URL of this repository. The provided value is evaluated as per Project.uri(Object). This means, for example, you can pass in a File object or a relative path which is evaluated relative to the project directory. File are resolved based on the supplied URL and the configured layout(String) for this repository.
        Specified by:
        setUrl in interface UrlArtifactRepository
        Parameters:
        url - The base URL.
      • artifactPattern

        void artifactPattern​(java.lang.String pattern)
        Adds an independent pattern that will be used to locate artifact files in this repository. This pattern will be used to locate ivy files as well, unless a specific ivy pattern is supplied via ivyPattern(String). If this pattern is not a fully-qualified URL, it will be interpreted as a file relative to the project directory. It is not interpreted relative the URL specified in setUrl(Object). Patterns added in this way will be in addition to any layout-based patterns added via setUrl(Object).
        Parameters:
        pattern - The artifact pattern.
      • ivyPattern

        void ivyPattern​(java.lang.String pattern)
        Adds an independent pattern that will be used to locate ivy files in this repository. If this pattern is not a fully-qualified URL, it will be interpreted as a file relative to the project directory. It is not interpreted relative the URL specified in setUrl(Object). Patterns added in this way will be in addition to any layout-based patterns added via setUrl(Object).
        Parameters:
        pattern - The ivy pattern.
      • patternLayout

        void patternLayout​(Action<? super IvyPatternRepositoryLayout> config)
        Specifies how the items of the repository are organized.

        The layout is configured with the supplied closure.

         repositories {
             ivy {
                 patternLayout {
                     artifact '[module]/[revision]/[artifact](.[ext])'
                     ivy '[module]/[revision]/ivy.xml'
                 }
             }
         }
         

        The available pattern tokens are listed as part of Ivy's Main Concepts documentation.

        Parameters:
        config - The action used to configure the layout.
        Since:
        5.0
      • getResolve

        IvyArtifactRepositoryMetaDataProvider getResolve()
        Returns the meta-data provider used when resolving artifacts from this repository. The provider is responsible for locating and interpreting the meta-data for the modules and artifacts contained in this repository. Using this provider, you can fine tune how this resolution happens.
        Returns:
        The meta-data provider for this repository.
      • setMetadataSupplier

        void setMetadataSupplier​(java.lang.Class<? extends ComponentMetadataSupplier> rule)
        Sets a custom metadata rule, which is capable of supplying the metadata of a component (status, status scheme, changing flag) whenever a dynamic version is requested. It can be used to provide metadata directly, instead of having to parse the Ivy descriptor.
        Specified by:
        setMetadataSupplier in interface MetadataSupplierAware
        Parameters:
        rule - the class of the rule. Gradle will instantiate a new rule for each dependency which requires metadata.
        Since:
        4.0
      • setMetadataSupplier

        void setMetadataSupplier​(java.lang.Class<? extends ComponentMetadataSupplier> rule,
                                 Action<? super ActionConfiguration> configureAction)
        Sets a custom metadata rule, possibly configuring the rule.
        Specified by:
        setMetadataSupplier in interface MetadataSupplierAware
        Parameters:
        rule - the class of the rule. Gradle will instantiate a new rule for each dependency which requires metadata.
        configureAction - the action to use to configure the rule.
        Since:
        4.0
      • metadataSources

        void metadataSources​(Action<? super IvyArtifactRepository.MetadataSources> configureAction)
        Configures the metadata sources for this repository. This method will replace any previously configured sources of metadata.
        Parameters:
        configureAction - the configuration of metadata sources.
        Since:
        4.5