public class KotlinByteBuddyTaskConfiguration extends Object implements Action<Project>
extensionName by
ByteBuddyPlugin.JavaPluginConfigurationAction so a single byteBuddy DSL block
applies to both Java and Kotlin outputs.
If the Kotlin Gradle plugin is not on the classpath, or the source set has no Kotlin sources
or no compile{SourceSet}Kotlin task, this action is a no-op. Depends on the Kotlin
Gradle plugin API only via reflection so the Byte Buddy Gradle plugin remains usable in
Java-only projects.
| Modifier and Type | Class and Description |
|---|---|
protected static class |
KotlinByteBuddyTaskConfiguration.TargetDirectoryFunction
An invocation handler that implements
java.util.function.Function to resolve a Byte
Buddy task's target directory, without requiring a compile-time dependency on Java 8. |
| Modifier | Constructor and Description |
|---|---|
protected |
KotlinByteBuddyTaskConfiguration(String extensionName,
SourceSet sourceSet)
Creates a new Kotlin Byte Buddy task configuration.
|
| Modifier and Type | Method and Description |
|---|---|
void |
execute(Project project) |
static boolean |
isAvailable()
Returns
true if the Kotlin Gradle plugin API is available on the classpath and the
running Gradle version exposes SourceSet#getExtensions, SourceDirectorySet#getDestinationDirectory
and AbstractCompile#getDestinationDirectory. |
protected KotlinByteBuddyTaskConfiguration(String extensionName, SourceSet sourceSet)
extensionName - The name of the shared Byte Buddy extension.sourceSet - The source set for which the task chain is being configured.public static boolean isAvailable()
true if the Kotlin Gradle plugin API is available on the classpath and the
running Gradle version exposes SourceSet#getExtensions, SourceDirectorySet#getDestinationDirectory
and AbstractCompile#getDestinationDirectory.true if Kotlin support can be wired.