@Incubating @NonNullApi public interface JvmEcosystemUtilities
Modifier and Type | Method | Description |
---|---|---|
<T> void |
configureAsCompileClasspath(HasConfigurableAttributes<T> configuration) |
Configures a configuration with reasonable defaults to be resolved as a compile classpath.
|
<T> void |
configureAsRuntimeClasspath(HasConfigurableAttributes<T> configuration) |
Configures a configuration with reasonable defaults to be resolved as a runtime classpath.
|
<T> void |
configureAttributes(HasConfigurableAttributes<T> configurableAttributes,
Action<? super JvmEcosystemAttributesDetails> details) |
|
void |
configureClassesDirectoryVariant(String configurationName,
SourceSet sourceSet) |
Registers a source set as contributing classes and exposes them as a variant.
|
Provider<Configuration> |
registerDependencyBucket(String name,
String description) |
Registers a configuration which will be used to declare dependencies, that is to say which is
neither resolvable, nor consumable.
|
void |
registerJvmLanguageGeneratedSourceDirectory(SourceSet sourceSet,
Action<? super JvmLanguageGeneratedSourceDirectoryBuilder> configuration) |
|
void |
registerJvmLanguageSourceDirectory(SourceSet sourceSet,
String name,
Action<? super JvmLanguageSourceDirectoryBuilder> configuration) |
Registers a new source directory for a source set, assuming that it will be compiled by
a language or compiler for the JVM (aka, it produces .class files).
|
void |
replaceArtifacts(Configuration outgoingConfiguration,
Object... providers) |
Replaces the artifacts of an outgoing configuration with a new set of artifacts.
|
void |
useDefaultTargetPlatformInference(Configuration configuration,
SourceSet sourceSet) |
Configures a configuration so that its exposed target jvm version is inferred from
the specified source set.
|
void configureClassesDirectoryVariant(String configurationName, SourceSet sourceSet)
configurationName
- the name of the configuration for which a classes variant should be exposedsourceSet
- the source set which will contribute classes to this variant<T> void configureAsCompileClasspath(HasConfigurableAttributes<T> configuration)
configuration
- the configuration to be configured<T> void configureAsRuntimeClasspath(HasConfigurableAttributes<T> configuration)
configuration
- the configuration to be configured<T> void configureAttributes(HasConfigurableAttributes<T> configurableAttributes, Action<? super JvmEcosystemAttributesDetails> details)
void replaceArtifacts(Configuration outgoingConfiguration, Object... providers)
outgoingConfiguration
- the configuration for which to replace artifactsproviders
- the artifacts or providers of artifacts (e.g tasks providers) which should be associated with this configurationvoid useDefaultTargetPlatformInference(Configuration configuration, SourceSet sourceSet)
configuration
- the configuration to configuresourceSet
- the source set which serves as reference for inferencevoid registerJvmLanguageSourceDirectory(SourceSet sourceSet, String name, Action<? super JvmLanguageSourceDirectoryBuilder> configuration)
sourceSet
- the source set for which to add a directoryname
- the name of the directoryconfiguration
- the configuration of the source directoryvoid registerJvmLanguageGeneratedSourceDirectory(SourceSet sourceSet, Action<? super JvmLanguageGeneratedSourceDirectoryBuilder> configuration)
Provider<Configuration> registerDependencyBucket(String name, String description)
name
- the name of the configurationdescription
- the description of the bucket