Package net.kyori.indra.repository
Interface RemoteRepository
-
@Immutable(builder=false) public interface RemoteRepositoryA definition for a repository that can be added to projects.- Since:
- 2.0.0
- See Also:
to registere remote repository extensions
-
-
Field Summary
Fields Modifier and Type Field Description static RemoteRepositorySONATYPE_SNAPSHOTS
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default @NonNull org.gradle.api.artifacts.repositories.MavenArtifactRepositoryaddTo(org.gradle.api.artifacts.dsl.RepositoryHandler handler)Register this repository with a repository handler.static @NonNull RemoteRepositoryall(String name, String url)Create a repository that will publish/resolve both releases and snapshots.static @NonNull RemoteRepositoryall(String name, URI url)Create a repository that will publish/resolve both releases and snapshots.@NonNull Stringname()The name of the repository.default booleanreleases()Whether releases should be included in this repository.static @NonNull RemoteRepositoryreleasesOnly(String name, String url)Create a repository that will only publish/resolve releases.static @NonNull RemoteRepositoryreleasesOnly(String name, URI url)Create a repository that will only publish/resolve releases.default booleansnapshots()Whether snapshots should be included in this repository.static @NonNull RemoteRepositorysnapshotsOnly(String name, String url)Create a repository that will only publish/resolve snapshots.static @NonNull RemoteRepositorysnapshotsOnly(String name, URI url)Create a repository that will only publish/resolve snapshots.@NonNull URIurl()The URL providing the remote location of this repository.
-
-
-
Field Detail
-
SONATYPE_SNAPSHOTS
static final RemoteRepository SONATYPE_SNAPSHOTS
-
-
Method Detail
-
all
static @NonNull RemoteRepository all(String name, URI url)
Create a repository that will publish/resolve both releases and snapshots.- Parameters:
name- the repository nameurl- the repository URL- Returns:
- a new repository description
- Since:
- 2.0.0
-
all
static @NonNull RemoteRepository all(String name, String url)
Create a repository that will publish/resolve both releases and snapshots.- Parameters:
name- the repository nameurl- the repository URL- Returns:
- a new repository description
- Since:
- 2.0.0
-
releasesOnly
static @NonNull RemoteRepository releasesOnly(String name, URI url)
Create a repository that will only publish/resolve releases.- Parameters:
name- the repository nameurl- the repository URL- Returns:
- a new repository description
- Since:
- 2.0.0
-
releasesOnly
static @NonNull RemoteRepository releasesOnly(String name, String url)
Create a repository that will only publish/resolve releases.- Parameters:
name- the repository nameurl- the repository URL- Returns:
- a new repository description
- Since:
- 2.0.0
-
snapshotsOnly
static @NonNull RemoteRepository snapshotsOnly(String name, URI url)
Create a repository that will only publish/resolve snapshots.- Parameters:
name- the repository nameurl- the repository URL- Returns:
- a new repository description
- Since:
- 2.0.0
-
snapshotsOnly
static @NonNull RemoteRepository snapshotsOnly(String name, String url)
Create a repository that will only publish/resolve snapshots.- Parameters:
name- the repository nameurl- the repository URL- Returns:
- a new repository description
- Since:
- 2.0.0
-
name
@Parameter @NonNull String name()
The name of the repository.This name should be provided in
camelCaseformat.- Returns:
- the internal repository name
- Since:
- 2.0.0
-
url
@Parameter @NonNull URI url()
The URL providing the remote location of this repository.- Returns:
- the repository URL
- Since:
- 2.0.0
-
releases
@Parameter @Default default boolean releases()
Whether releases should be included in this repository.- Returns:
- whether releases should be published/resolved
- Since:
- 2.0.0
-
snapshots
@Parameter @Default default boolean snapshots()
Whether snapshots should be included in this repository.- Returns:
- whether snapshots should be published/resolved
- Since:
- 2.0.0
-
addTo
default @NonNull org.gradle.api.artifacts.repositories.MavenArtifactRepository addTo(org.gradle.api.artifacts.dsl.RepositoryHandler handler)
Register this repository with a repository handler.- Parameters:
handler- the handler to register with- Returns:
- the registered repository
- Since:
- 2.0.0
-
-