All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.gradle.apirepositories.FlatDirectoryArtifactRepository Maven / Gradle / Ivy

There is a newer version: 8.6
Show newest version
/*
 * Copyright 2011 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.gradle.api.artifacts.repositories;

import java.io.File;
import java.util.Set;

/**
 * A repository that looks into a number of directories for artifacts. The artifacts are expected to be located in the root of the specified directories.
 * The repository ignores any group/organization information specified in the dependency section of your build script. If you only use this kind of
 * resolver you can specify your dependencies like :junit:4.8.1 instead of junit:junit:4.8.1.
 *
 * 

To resolve a dependency, this resolver looks for one of the following files. It will return the first match it finds: * *

    * *
  • [artifact]-[version].[ext] *
  • [artifact]-[version]-[classifier].[ext] *
  • [artifact].[ext] *
  • [artifact]-[classifier].[ext] * *
* * So, for example, to resolve :junit:junit:4.8.1, this repository will look for junit-4.8.1.jar and then junit.jar. */ public interface FlatDirectoryArtifactRepository extends ArtifactRepository { /** * Returns the directories where this repository will look for artifacts. * * @return The directories. Never null. */ Set getDirs(); /** * Adds a directory where this repository will look for artifacts. * *

The provided value are evaluated as per {@link org.gradle.api.Project#file(Object)}. * * @param dir the directory */ void dir(Object dir); /** * Adds some directories where this repository will look for artifacts. * *

The provided values are evaluated as per {@link org.gradle.api.Project#files(Object...)}. * * @param dirs the directories. */ void dirs(Object... dirs); /** * Sets the directories where this repository will look for artifacts. * * @param dirs the directories. * @since 4.0 */ void setDirs(Set dirs); /** * Sets the directories where this repository will look for artifacts. * *

The provided values are evaluated as per {@link org.gradle.api.Project#files(Object...)}. * * @param dirs the directories. */ void setDirs(Iterable dirs); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy