Package net.kyori.indra.internal
Interface RemoteRepository
@Immutable(builder=false)
public interface RemoteRepository
A definition for a repository that can be added to projects.
- Since:
- 2.0.0
-
Method Summary
Modifier and TypeMethodDescriptiondefault @NotNull org.gradle.api.artifacts.repositories.MavenArtifactRepositoryaddTo(org.gradle.api.artifacts.dsl.RepositoryHandler handler) Register this repository with a repository handler.static @NotNull RemoteRepositoryCreate a repository that will publish/resolve both releases and snapshots.static @NotNull RemoteRepositoryCreate a repository that will publish/resolve both releases and snapshots.@NotNull Stringname()The name of the repository.default booleanreleases()Whether releases should be included in this repository.static @NotNull RemoteRepositoryreleasesOnly(String name, String url) Create a repository that will only publish/resolve releases.static @NotNull RemoteRepositoryreleasesOnly(String name, URI url) Create a repository that will only publish/resolve releases.default booleanWhether snapshots should be included in this repository.static @NotNull RemoteRepositorysnapshotsOnly(String name, String url) Create a repository that will only publish/resolve snapshots.static @NotNull RemoteRepositorysnapshotsOnly(String name, URI url) Create a repository that will only publish/resolve snapshots.@NotNull URIurl()The URL providing the remote location of this repository.
-
Method Details
-
all
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
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
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
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
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
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
The name of the repository.This name should be provided in
camelCaseformat.- Returns:
- the internal repository name
- Since:
- 2.0.0
-
url
The URL providing the remote location of this repository.- Returns:
- the repository URL
- Since:
- 2.0.0
-
releases
@Default @Parameter default boolean releases()Whether releases should be included in this repository.- Returns:
- whether releases should be published/resolved
- Since:
- 2.0.0
-
snapshots
@Default @Parameter default boolean snapshots()Whether snapshots should be included in this repository.- Returns:
- whether snapshots should be published/resolved
- Since:
- 2.0.0
-
addTo
@NotNull default @NotNull 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
-