-
- All Implemented Interfaces:
-
org.gradle.api.Named,org.gradle.api.attributes.HasAttributes,org.jetbrains.kotlin.gradle.plugin.KotlinTarget
public abstract class KotlinAndroidTarget extends AbstractKotlinTarget
-
-
Field Summary
Fields Modifier and Type Field Description private StringdisambiguationClassifierprivate final KotlinPlatformTypeplatformTypeprivate final NamedDomainObjectContainer<out KotlinJvmAndroidCompilation>compilationsprivate List<String>publishLibraryVariantsprivate BooleanpublishLibraryVariantsGroupedByFlavorprivate final StringtargetNameprivate final StringdefaultConfigurationNameprivate BooleanuseDisambiguationClassifierAsSourceSetNamePrefixprivate StringoverrideDisambiguationClassifierOnIdeImportprivate final StringapiElementsConfigurationNameprivate final StringruntimeElementsConfigurationNameprivate final StringartifactsTaskNameprivate final Booleanpublishableprivate final Set<SoftwareComponent>componentsprivate KotlinTargetPreset<out KotlinTarget>presetprivate final Projectproject
-
Constructor Summary
Constructors Constructor Description KotlinAndroidTarget(String targetName, Project project)
-
Method Summary
Modifier and Type Method Description StringgetDisambiguationClassifier()UnitsetDisambiguationClassifier(String disambiguationClassifier)KotlinPlatformTypegetPlatformType()NamedDomainObjectContainer<out KotlinJvmAndroidCompilation>getCompilations()final List<String>getPublishLibraryVariants()Names of the Android library variants that should be published from the target's project within the default publications which are set up if the maven-publishGradle plugin is applied.final UnitsetPublishLibraryVariants(List<String> publishLibraryVariants)final BooleangetPublishLibraryVariantsGroupedByFlavor()If true, a publication will be created per merged product flavor, with the build types used as classifiers for the artifacts published within each publication. final UnitsetPublishLibraryVariantsGroupedByFlavor(Boolean publishLibraryVariantsGroupedByFlavor)If true, a publication will be created per merged product flavor, with the build types used as classifiers for the artifacts published within each publication. StringgetTargetName()StringgetDefaultConfigurationName()BooleangetUseDisambiguationClassifierAsSourceSetNamePrefix()UnitsetUseDisambiguationClassifierAsSourceSetNamePrefix(Boolean useDisambiguationClassifierAsSourceSetNamePrefix)StringgetOverrideDisambiguationClassifierOnIdeImport()UnitsetOverrideDisambiguationClassifierOnIdeImport(String overrideDisambiguationClassifierOnIdeImport)StringgetApiElementsConfigurationName()StringgetRuntimeElementsConfigurationName()StringgetArtifactsTaskName()BooleangetPublishable()Set<SoftwareComponent>getComponents()KotlinTargetPreset<out KotlinTarget>getPreset()UnitsetPreset(KotlinTargetPreset<out KotlinTarget> preset)final ProjectgetProject()final UnitpublishLibraryVariants(String names)Add Android library variant names to publishLibraryVariants. final UnitpublishAllLibraryVariants()Set up all of the Android library variants to be published from this target's project within the default publications, which are set up if the maven-publishGradle plugin is applied.-
Methods inherited from class org.jetbrains.kotlin.gradle.plugin.mpp.KotlinAndroidTarget
getAttributes, mavenPublication, toString -
Methods inherited from class org.jetbrains.kotlin.gradle.plugin.mpp.AbstractKotlinTarget
attributes, attributes, getName, mavenPublication -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
KotlinAndroidTarget
KotlinAndroidTarget(String targetName, Project project)
-
-
Method Detail
-
getDisambiguationClassifier
String getDisambiguationClassifier()
-
setDisambiguationClassifier
Unit setDisambiguationClassifier(String disambiguationClassifier)
-
getPlatformType
KotlinPlatformType getPlatformType()
-
getCompilations
NamedDomainObjectContainer<out KotlinJvmAndroidCompilation> getCompilations()
-
getPublishLibraryVariants
final List<String> getPublishLibraryVariants()
Names of the Android library variants that should be published from the target's project within the default publications which are set up if the
maven-publishGradle plugin is applied.Item examples:
'release' (in case no product flavors were defined)
'fooRelease' (for the release build type of a flavor 'foo')
'fooBarRelease' (for the release build type multi-dimensional flavors 'foo' and 'bar').
If set to null, which can also be done with publishAllLibraryVariants, all library variants will be published, but not test or application variants.
-
setPublishLibraryVariants
final Unit setPublishLibraryVariants(List<String> publishLibraryVariants)
-
getPublishLibraryVariantsGroupedByFlavor
final Boolean getPublishLibraryVariantsGroupedByFlavor()
If true, a publication will be created per merged product flavor, with the build types used as classifiers for the artifacts published within each publication. If set to false, each Android variant will have a separate publication.
-
setPublishLibraryVariantsGroupedByFlavor
final Unit setPublishLibraryVariantsGroupedByFlavor(Boolean publishLibraryVariantsGroupedByFlavor)
If true, a publication will be created per merged product flavor, with the build types used as classifiers for the artifacts published within each publication. If set to false, each Android variant will have a separate publication.
-
getTargetName
String getTargetName()
-
getDefaultConfigurationName
String getDefaultConfigurationName()
-
getUseDisambiguationClassifierAsSourceSetNamePrefix
Boolean getUseDisambiguationClassifierAsSourceSetNamePrefix()
-
setUseDisambiguationClassifierAsSourceSetNamePrefix
Unit setUseDisambiguationClassifierAsSourceSetNamePrefix(Boolean useDisambiguationClassifierAsSourceSetNamePrefix)
-
getOverrideDisambiguationClassifierOnIdeImport
String getOverrideDisambiguationClassifierOnIdeImport()
-
setOverrideDisambiguationClassifierOnIdeImport
Unit setOverrideDisambiguationClassifierOnIdeImport(String overrideDisambiguationClassifierOnIdeImport)
-
getApiElementsConfigurationName
String getApiElementsConfigurationName()
-
getRuntimeElementsConfigurationName
String getRuntimeElementsConfigurationName()
-
getArtifactsTaskName
String getArtifactsTaskName()
-
getPublishable
Boolean getPublishable()
-
getComponents
Set<SoftwareComponent> getComponents()
-
getPreset
KotlinTargetPreset<out KotlinTarget> getPreset()
-
getProject
final Project getProject()
-
publishLibraryVariants
final Unit publishLibraryVariants(String names)
Add Android library variant names to publishLibraryVariants.
-
publishAllLibraryVariants
final Unit publishAllLibraryVariants()
Set up all of the Android library variants to be published from this target's project within the default publications, which are set up if the
maven-publishGradle plugin is applied. This overrides the variants chosen with publishLibraryVariants
-
-
-
-