kotlinkotlin-dokkakdoc

Copy KDoc docs from one method to another


For the two given methods:

/**
* Adds a [DataItem] to the Android Wear network. The updated item is synchronized across all devices.
*/
fun putItem(){ .... }

/**
* "same KDOC here with above"
*/
fun putItem(putRequest: PutDataRequest){ .... }

Is there any possibility to copy/link the docs of the second method to be the same with the first one?

Manually copy pasting the KDOC is not so great because if you update one of them there is high chance the second to accidentally be outdated.


Solution

  • There is no such feature currently available in KDOC.

    Please submit a feature request to YouTrack.

    The reference guide for KDOC shows the feature set available.