-
- All Implemented Interfaces:
-
kotlin.Comparable,org.gradle.api.Task,org.gradle.api.internal.DynamicObjectAware,org.gradle.api.internal.TaskInternal,org.gradle.api.plugins.ExtensionAware,org.gradle.api.tasks.util.PatternFilterable,org.gradle.util.Configurable,org.jetbrains.kotlin.gradle.dsl.KotlinCompile,org.jetbrains.kotlin.gradle.dsl.KotlinJvmCompile,org.jetbrains.kotlin.gradle.internal.CompilerArgumentAware,org.jetbrains.kotlin.gradle.internal.tasks.TaskWithLocalState,org.jetbrains.kotlin.gradle.tasks.BaseKotlinCompile,org.jetbrains.kotlin.gradle.tasks.CompileUsingKotlinDaemon,org.jetbrains.kotlin.gradle.tasks.CompileUsingKotlinDaemonWithNormalization,org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask,org.jetbrains.kotlin.gradle.tasks.KotlinCompileTool,org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile,org.jetbrains.kotlin.gradle.tasks.UsesKotlinJavaToolchain
@CacheableTask() public abstract class KotlinCompile extends AbstractKotlinCompile<K2JVMCompilerArguments> implements KotlinJvmCompile, KotlinCompilationTask<KotlinJvmCompilerOptions>, UsesKotlinJavaToolchain
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract classKotlinCompile.ClasspathSnapshotPropertiesProperties related to the
kotlin.incremental.useClasspathSnapshotfeature.
-
Field Summary
Fields Modifier and Type Field Description private final KotlinJvmOptionskotlinOptionsprivate final Property<KotlinJvmOptions>parentKotlinOptionsprivate StringjavaPackagePrefixprivate BooleanusePreciseJavaTrackingprivate final ConfigurableFileCollectionlibrariesprivate FileCollectionclasspathprivate final Property<Boolean>useKotlinAbiSnapshotprivate final KotlinCompile.ClasspathSnapshotPropertiesclasspathSnapshotPropertiesprivate final Provider<KotlinJavaToolchain>kotlinJavaToolchainProviderprivate final BooleandisableMultiModuleICprivate final FileCollectionjavaSourcesprivate final KotlinJvmCompilerOptionscompilerOptionsprivate Booleanincrementalprivate final Property<String>ownModuleNameprivate final GradleBuildStartParametersstartParametersprivate final Provider<RegularFile>abiSnapshotFileprivate final Property<String>abiSnapshotRelativePathprivate final FileCollectionsourcesprivate final Property<BuildMetricsReporter>metricsprivate Booleanenabledprivate final Property<Duration>timeoutprivate final TaskStateInternalstateprivate BooleanimpliesSubProjectsprivate final BooleanhasCustomActionsprivate final Set<Provider<out BuildService<?>>>requiredServicesprivate final DirectoryPropertydestinationDirectoryprivate final List<String>serializedCompilerArgumentsprivate final List<String>serializedCompilerArgumentsIgnoreClasspathIssuesprivate final List<String>defaultSerializedCompilerArgumentsprivate final ConfigurableFileCollectionlocalStateDirectoriesprivate final Provider<List<String>>normalizedKotlinDaemonJvmArgumentsprivate final Property<KotlinCompilerExecutionStrategy>compilerExecutionStrategyprivate final ListProperty<String>kotlinDaemonJvmArgumentsprivate final Property<Boolean>useDaemonFallbackStrategyprivate final ConfigurableFileCollectionfriendPathsprivate final Property<String>moduleNameprivate final Property<Boolean>multiPlatformEnabledprivate final ConfigurableFileCollectionpluginClasspathprivate final ListProperty<CompilerPluginConfig>pluginOptionsprivate final Property<String>sourceSetNameprivate final Property<Boolean>useModuleDetectionprivate final KotlinJavaToolchainkotlinJavaToolchain
-
Constructor Summary
Constructors Constructor Description KotlinCompile(KotlinJvmCompilerOptions compilerOptions, WorkerExecutor workerExecutor, ObjectFactory objectFactory)
-
Method Summary
Modifier and Type Method Description final KotlinJvmOptionsgetKotlinOptions()Property<KotlinJvmOptions>getParentKotlinOptions()final StringgetJavaPackagePrefix()A package prefix that is used for locating Java sources in a directory structure with non-full-depth packages. final UnitsetJavaPackagePrefix(String javaPackagePrefix)A package prefix that is used for locating Java sources in a directory structure with non-full-depth packages. final BooleangetUsePreciseJavaTracking()final UnitsetUsePreciseJavaTracking(Boolean usePreciseJavaTracking)abstract ConfigurableFileCollectiongetLibraries()final FileCollectiongetClasspath()final UnitsetClasspath(@Deprecated(message = "Replaced with 'libraries' input", replaceWith = @ReplaceWith(imports = {}, expression = "libraries"), level = DeprecationLevel.ERROR) FileCollection classpath)abstract Property<Boolean>getUseKotlinAbiSnapshot()abstract KotlinCompile.ClasspathSnapshotPropertiesgetClasspathSnapshotProperties()final Provider<KotlinJavaToolchain>getKotlinJavaToolchainProvider()final BooleangetDisableMultiModuleIC()FileCollectiongetJavaSources()KotlinJvmCompilerOptionsgetCompilerOptions()K2JVMCompilerArgumentscreateCompilerArgs()UnitsetupCompilerArgs(K2JVMCompilerArguments args, Boolean defaultsOnly, Boolean ignoreClasspathResolutionErrors)Unitsource(Object sources)UnitsetSource(Object sources)-
Methods inherited from class org.jetbrains.kotlin.gradle.tasks.AbstractKotlinCompile
execute, getAbiSnapshotFile, getAbiSnapshotRelativePath, getIncremental, getOwnModuleName, getStartParameters, setIncremental -
Methods inherited from class org.jetbrains.kotlin.gradle.tasks.AbstractKotlinCompileTool
disallowSourceChanges, exclude, exclude, exclude, exclude, getExcludes, getIncludes, getMetrics, getSources, include, include, include, include, setExcludes, setIncludes -
Methods inherited from class org.gradle.api.internal.AbstractTask
appendParallelSafeAction, doNotTrackState, getAsDynamicObject, getConvention, getIdentityPath, getImpliesSubProjects, getLifecycleDependencies, getOnlyIf, getReasonNotToTrackState, getReasonTaskIsIncompatibleWithConfigurationCache, getRequiredServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, isCompatibleWithConfigurationCache, isEnabled, isHasCustomActions, notCompatibleWithConfigurationCache, prependParallelSafeAction, setImpliesSubProjects -
Methods inherited from class org.gradle.api.DefaultTask
compareTo, configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, finalizedBy, getActions, getAnt, getDependsOn, getDescription, getDestroyables, getDidWork, getExtensions, getFinalizedBy, getGroup, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOutputs, getPath, getProject, getShouldRunAfter, getState, getTaskDependencies, getTemporaryDir, getTimeout, hasProperty, mustRunAfter, onlyIf, onlyIf, onlyIf, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setMustRunAfter, setOnlyIf, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesService -
Methods inherited from class org.jetbrains.kotlin.gradle.tasks.KotlinCompileTool
getDestinationDirectory -
Methods inherited from class org.jetbrains.kotlin.gradle.internal.CompilerArgumentAware
getDefaultSerializedCompilerArguments, getSerializedCompilerArguments, getSerializedCompilerArgumentsIgnoreClasspathIssues -
Methods inherited from class org.jetbrains.kotlin.gradle.internal.tasks.TaskWithLocalState
getLocalStateDirectories -
Methods inherited from class org.jetbrains.kotlin.gradle.tasks.CompileUsingKotlinDaemonWithNormalization
getNormalizedKotlinDaemonJvmArguments -
Methods inherited from class org.jetbrains.kotlin.gradle.tasks.CompileUsingKotlinDaemon
getCompilerExecutionStrategy, getKotlinDaemonJvmArguments, getUseDaemonFallbackStrategy -
Methods inherited from class org.jetbrains.kotlin.gradle.tasks.BaseKotlinCompile
getFriendPaths, getModuleName, getMultiPlatformEnabled, getPluginClasspath, getPluginOptions, getSourceSetName, getUseModuleDetection -
Methods inherited from class org.jetbrains.kotlin.gradle.tasks.UsesKotlinJavaToolchain
getKotlinJavaToolchain -
Methods inherited from class org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask
compilerOptions, compilerOptions -
Methods inherited from class org.jetbrains.kotlin.gradle.dsl.KotlinCompile
kotlinOptions, kotlinOptions, kotlinOptions -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getKotlinOptions
final KotlinJvmOptions getKotlinOptions()
-
getParentKotlinOptions
Property<KotlinJvmOptions> getParentKotlinOptions()
-
getJavaPackagePrefix
@Input()@Optional() final String getJavaPackagePrefix()
A package prefix that is used for locating Java sources in a directory structure with non-full-depth packages.
Example: a Java source file with
package com.example.my.packageis located in directorysrc/main/java/my/package. Then, for the Kotlin compilation to locate the source file, use package prefix"com.example"
-
setJavaPackagePrefix
final Unit setJavaPackagePrefix(String javaPackagePrefix)
A package prefix that is used for locating Java sources in a directory structure with non-full-depth packages.
Example: a Java source file with
package com.example.my.packageis located in directorysrc/main/java/my/package. Then, for the Kotlin compilation to locate the source file, use package prefix"com.example"
-
getUsePreciseJavaTracking
@Input() final Boolean getUsePreciseJavaTracking()
-
setUsePreciseJavaTracking
final Unit setUsePreciseJavaTracking(Boolean usePreciseJavaTracking)
-
getLibraries
@Internal() abstract ConfigurableFileCollection getLibraries()
-
getClasspath
@Internal() final FileCollection getClasspath()
-
setClasspath
final Unit setClasspath(@Deprecated(message = "Replaced with 'libraries' input", replaceWith = @ReplaceWith(imports = {}, expression = "libraries"), level = DeprecationLevel.ERROR) FileCollection classpath)
-
getUseKotlinAbiSnapshot
@Input() abstract Property<Boolean> getUseKotlinAbiSnapshot()
-
getClasspathSnapshotProperties
abstract KotlinCompile.ClasspathSnapshotProperties getClasspathSnapshotProperties()
-
getKotlinJavaToolchainProvider
final Provider<KotlinJavaToolchain> getKotlinJavaToolchainProvider()
-
getDisableMultiModuleIC
@Input() final Boolean getDisableMultiModuleIC()
-
getJavaSources
@Incremental()@InputFiles()@IgnoreEmptyDirectories()@NormalizeLineEndings()@PathSensitive(value = PathSensitivity.RELATIVE) FileCollection getJavaSources()
-
getCompilerOptions
KotlinJvmCompilerOptions getCompilerOptions()
-
createCompilerArgs
K2JVMCompilerArguments createCompilerArgs()
-
setupCompilerArgs
Unit setupCompilerArgs(K2JVMCompilerArguments args, Boolean defaultsOnly, Boolean ignoreClasspathResolutionErrors)
-
-
-
-