Interface KotlinJvmCompile
-
- All Implemented Interfaces:
-
kotlin.Comparable
,org.gradle.api.Task
,org.gradle.api.plugins.ExtensionAware
,org.gradle.api.tasks.util.PatternFilterable
,org.jetbrains.kotlin.gradle.dsl.KotlinCompile
,org.jetbrains.kotlin.gradle.tasks.BaseKotlinCompile
,org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask
,org.jetbrains.kotlin.gradle.tasks.KotlinCompileTool
public interface KotlinJvmCompile implements BaseKotlinCompile, KotlinCompile<KotlinJvmOptions>, KotlinCompilationTask<KotlinJvmCompilerOptions>
-
-
Method Summary
Modifier and Type Method Description abstract Property<String>
getModuleName()
abstract Property<KotlinJvmOptions>
getParentKotlinOptions()
abstract Property<JvmTargetValidationMode>
getJvmTargetValidationMode()
Controls JVM target validation mode between this task and the Java compilation task from Gradle for the same source set. -
Methods inherited from class org.jetbrains.kotlin.gradle.tasks.KotlinCompileTool
getDestinationDirectory, getExcludes, getIncludes, getLibraries, getSources, setSource, source
-
Methods inherited from class org.gradle.api.tasks.util.PatternFilterable
exclude, exclude, exclude, exclude, include, include, include, include, setExcludes, setIncludes
-
Methods inherited from class kotlin.Comparable
compareTo
-
Methods inherited from class org.gradle.api.plugins.ExtensionAware
getExtensions
-
Methods inherited from class org.gradle.api.Task
configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, doNotTrackState, finalizedBy, getActions, getAnt, getConvention, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getFinalizedBy, getGroup, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOutputs, getPath, getProject, getShouldRunAfter, getState, getTaskDependencies, getTemporaryDir, getTimeout, hasProperty, mustRunAfter, notCompatibleWithConfigurationCache, 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.dsl.KotlinCompile
getKotlinOptions, kotlinOptions, kotlinOptions, kotlinOptions
-
Methods inherited from class org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask
compilerOptions, compilerOptions, getCompilerOptions
-
Methods inherited from class org.jetbrains.kotlin.gradle.tasks.BaseKotlinCompile
getFriendPaths, getMultiPlatformEnabled, getPluginClasspath, getPluginOptions, getSourceSetName, getUseModuleDetection
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getModuleName
@Deprecated(message = "Please migrate to compilerOptions.moduleName", replaceWith = @ReplaceWith(imports = {}, expression = "compilerOptions.moduleName"))@Optional()@Input() abstract Property<String> getModuleName()
-
getParentKotlinOptions
@Internal(value = "Takes part in compiler args.") abstract Property<KotlinJvmOptions> getParentKotlinOptions()
-
getJvmTargetValidationMode
@Input() abstract Property<JvmTargetValidationMode> getJvmTargetValidationMode()
Controls JVM target validation mode between this task and the Java compilation task from Gradle for the same source set.
The same JVM targets ensure that the produced jar file contains class files of the same JVM bytecode version, which is important to avoid compatibility issues for the code consumers.
Also, Gradle Java compilation task org.gradle.api.tasks.compile.JavaCompile.targetCompatibility controls value of "org.gradle.jvm.version" attribute which itself controls the produced artifact minimal supported JVM version via Gradle Module Metadata. This allows Gradle to check compatibility of dependencies at dependency resolution time.
To avoid problems with different targets we advise to use JDK Toolchain feature.
Default value for builds with Gradle <8.0 is JvmTargetValidationMode.WARNING, while for builds with Gradle 8.0+ it is JvmTargetValidationMode.ERROR.
-
-
-
-