Skip to content

Commit

Permalink
Remove DokkaPluginParametersBuilder (#3872)
Browse files Browse the repository at this point in the history
DokkaPluginParametersBuilder is bugged, undocumented, and untested.

It's difficult to use, and there's an alternative (see #3871).

#3869
  • Loading branch information
adam-enko authored Nov 4, 2024
1 parent 9696cc2 commit 8dba7bb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 319 deletions.
76 changes: 0 additions & 76 deletions dokka-runners/dokka-gradle-plugin/api/dokka-gradle-plugin.api
Original file line number Diff line number Diff line change
Expand Up @@ -386,39 +386,6 @@ public abstract class org/jetbrains/dokka/gradle/engine/plugins/DokkaPluginParam
public abstract fun jsonEncode ()Ljava/lang/String;
}

public abstract class org/jetbrains/dokka/gradle/engine/plugins/DokkaPluginParametersBuilder : org/jetbrains/dokka/gradle/engine/plugins/DokkaPluginParametersBaseSpec {
public static final field Companion Lorg/jetbrains/dokka/gradle/engine/plugins/DokkaPluginParametersBuilder$Companion;
public fun getPluginFqn ()Ljava/lang/String;
public fun jsonEncode ()Ljava/lang/String;
}

public final class org/jetbrains/dokka/gradle/engine/plugins/DokkaPluginParametersBuilder$Companion {
}

public final class org/jetbrains/dokka/gradle/engine/plugins/DokkaPluginParametersBuilderKt {
public static final fun PluginConfigBooleanValue (Lorg/gradle/api/provider/Provider;)Lorg/gradle/api/provider/Provider;
public static final fun PluginConfigNumberValue (Lorg/gradle/api/provider/Provider;)Lorg/gradle/api/provider/Provider;
public static final fun PluginConfigStringValue (Lorg/gradle/api/provider/Provider;)Lorg/gradle/api/provider/Provider;
public static final fun PluginConfigValue (Ljava/lang/Number;)Lorg/jetbrains/dokka/gradle/engine/plugins/PluginConfigValue$NumberValue;
public static final fun PluginConfigValue (Ljava/lang/String;)Lorg/jetbrains/dokka/gradle/engine/plugins/PluginConfigValue$StringValue;
public static final fun PluginConfigValue (Z)Lorg/jetbrains/dokka/gradle/engine/plugins/PluginConfigValue$BooleanValue;
public static final fun add (Lorg/jetbrains/dokka/gradle/engine/plugins/PluginConfigValue$Values;Ljava/lang/Number;)V
public static final fun add (Lorg/jetbrains/dokka/gradle/engine/plugins/PluginConfigValue$Values;Ljava/lang/String;)V
public static final fun add (Lorg/jetbrains/dokka/gradle/engine/plugins/PluginConfigValue$Values;Z)V
public static final fun addBoolean (Lorg/jetbrains/dokka/gradle/engine/plugins/PluginConfigValue$Values;Lorg/gradle/api/provider/Provider;)V
public static final fun addNumber (Lorg/jetbrains/dokka/gradle/engine/plugins/PluginConfigValue$Values;Lorg/gradle/api/provider/Provider;)V
public static final fun addString (Lorg/jetbrains/dokka/gradle/engine/plugins/PluginConfigValue$Values;Lorg/gradle/api/provider/Provider;)V
public static final fun booleanProperty (Lorg/jetbrains/dokka/gradle/engine/plugins/DokkaPluginParametersBuilder;Ljava/lang/String;Lorg/gradle/api/provider/Provider;)V
public static final fun files (Lorg/jetbrains/dokka/gradle/engine/plugins/DokkaPluginParametersBuilder;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V
public static final fun numberProperty (Lorg/jetbrains/dokka/gradle/engine/plugins/DokkaPluginParametersBuilder;Ljava/lang/String;Lorg/gradle/api/provider/Provider;)V
public static final fun pluginParameters (Lorg/gradle/api/ExtensiblePolymorphicDomainObjectContainer;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V
public static final fun properties (Lorg/jetbrains/dokka/gradle/engine/plugins/DokkaPluginParametersBuilder;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V
public static final fun property (Lorg/jetbrains/dokka/gradle/engine/plugins/DokkaPluginParametersBuilder;Ljava/lang/String;Ljava/lang/Number;)V
public static final fun property (Lorg/jetbrains/dokka/gradle/engine/plugins/DokkaPluginParametersBuilder;Ljava/lang/String;Ljava/lang/String;)V
public static final fun property (Lorg/jetbrains/dokka/gradle/engine/plugins/DokkaPluginParametersBuilder;Ljava/lang/String;Z)V
public static final fun stringProperty (Lorg/jetbrains/dokka/gradle/engine/plugins/DokkaPluginParametersBuilder;Ljava/lang/String;Lorg/gradle/api/provider/Provider;)V
}

public abstract class org/jetbrains/dokka/gradle/engine/plugins/DokkaVersioningPluginParameters : org/jetbrains/dokka/gradle/engine/plugins/DokkaPluginParametersBaseSpec {
public static final field Companion Lorg/jetbrains/dokka/gradle/engine/plugins/DokkaVersioningPluginParameters$Companion;
public static final field DOKKA_VERSIONING_PLUGIN_FQN Ljava/lang/String;
Expand All @@ -434,49 +401,6 @@ public abstract class org/jetbrains/dokka/gradle/engine/plugins/DokkaVersioningP
public final class org/jetbrains/dokka/gradle/engine/plugins/DokkaVersioningPluginParameters$Companion {
}

public abstract class org/jetbrains/dokka/gradle/engine/plugins/PluginConfigValue {
}

public final class org/jetbrains/dokka/gradle/engine/plugins/PluginConfigValue$BooleanValue : org/jetbrains/dokka/gradle/engine/plugins/PluginConfigValue {
public fun <init> (Z)V
public final fun getBoolean ()Z
}

public final class org/jetbrains/dokka/gradle/engine/plugins/PluginConfigValue$DirectoryValue : org/jetbrains/dokka/gradle/engine/plugins/PluginConfigValue {
public fun <init> (Lorg/gradle/api/file/DirectoryProperty;)V
public final fun getDirectory ()Lorg/gradle/api/file/DirectoryProperty;
}

public final class org/jetbrains/dokka/gradle/engine/plugins/PluginConfigValue$FileValue : org/jetbrains/dokka/gradle/engine/plugins/PluginConfigValue {
public fun <init> (Lorg/gradle/api/file/RegularFileProperty;)V
public final fun getFile ()Lorg/gradle/api/file/RegularFileProperty;
}

public final class org/jetbrains/dokka/gradle/engine/plugins/PluginConfigValue$FilesValue : org/jetbrains/dokka/gradle/engine/plugins/PluginConfigValue {
public fun <init> (Lorg/gradle/api/file/ConfigurableFileCollection;)V
public final fun getFiles ()Lorg/gradle/api/file/ConfigurableFileCollection;
}

public final class org/jetbrains/dokka/gradle/engine/plugins/PluginConfigValue$NumberValue : org/jetbrains/dokka/gradle/engine/plugins/PluginConfigValue {
public fun <init> (Ljava/lang/Number;)V
public final fun getNumber ()Ljava/lang/Number;
}

public final class org/jetbrains/dokka/gradle/engine/plugins/PluginConfigValue$Properties : org/jetbrains/dokka/gradle/engine/plugins/PluginConfigValue {
public fun <init> (Lorg/gradle/api/provider/MapProperty;)V
public final fun getValues ()Lorg/gradle/api/provider/MapProperty;
}

public final class org/jetbrains/dokka/gradle/engine/plugins/PluginConfigValue$StringValue : org/jetbrains/dokka/gradle/engine/plugins/PluginConfigValue {
public fun <init> (Ljava/lang/String;)V
public final fun getString ()Ljava/lang/String;
}

public final class org/jetbrains/dokka/gradle/engine/plugins/PluginConfigValue$Values : org/jetbrains/dokka/gradle/engine/plugins/PluginConfigValue {
public fun <init> (Lorg/gradle/api/provider/ListProperty;)V
public final fun getValues ()Lorg/gradle/api/provider/ListProperty;
}

public abstract class org/jetbrains/dokka/gradle/formats/DokkaFormatPlugin : org/gradle/api/Plugin {
public static final field Companion Lorg/jetbrains/dokka/gradle/formats/DokkaFormatPlugin$Companion;
public fun <init> (Ljava/lang/String;)V
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ import javax.inject.Inject
/**
* Base class for defining Dokka Plugin configuration.
*
* This class should not be instantiated directly. Instead, use a subclass, or create plugin
* parameters dynamically using [DokkaPluginParametersBuilder].
*
* [More information about Dokka Plugins is available in the Dokka docs.](https://kotlinlang.org/docs/dokka-plugins.html)
* This class should not be instantiated directly.
* Instead, define a subclass that implements the [jsonEncode] function.
*
* @param[name] A descriptive name of the item in the [org.jetbrains.dokka.gradle.internal.DokkaPluginParametersContainer].
* The name is only used for identification in the Gradle buildscripts.
* @param[pluginFqn] Fully qualified classname of the Dokka Plugin
*/
abstract class DokkaPluginParametersBaseSpec
Expand All @@ -28,6 +28,11 @@ constructor(
open val pluginFqn: String,
) : Serializable, Named {

/**
* Must be implemented by subclasses.
*
* Returns JSON encoded configuration, to be parsed by the Dokka plugin identified by [pluginFqn].
*/
abstract fun jsonEncode(): String // to be implemented by subclasses

@Input
Expand Down

This file was deleted.

0 comments on commit 8dba7bb

Please sign in to comment.