Wrong link to javadoc
I'm integrate dokka to android kotlin project (kotlin extension library).
I added external doc link:
def myDoc = new URL("https://***/android/docs/1.1/javadoc/")
dokkaHtml {
dokkaSourceSets {
configureEach {
noAndroidSdkLink.set(false)
externalDocumentationLink {
url.set(myDoc)
}
}
}
}
I added @see MyClass.myMethod from myDoc Create html.. ok.
Error in links(if open result html):
https://***/android/docs/2.1/javadoc/***/MyClass.html#myMethod-***.MyClass2-***.utils.MyCallback?-
https://***/android/docs/2.1/javadoc/***/MyClass3.html#myMethod2-***.MyClass4-***.MyClass5?-***.utils.MyCallback2?-
In java doc in externalDocumentationLink link is true:
https://***/android/docs/2.1/javadoc/***/MyClass.html#myMethod-***.MyClass2-***.utils.MyCallback-
https://***/android/docs/2.1/javadoc/***/MyClass3.html#myMethod2-***.MyClass4-***.MyClass5-***.utils.MyCallback2-
I think, wrong added char '?'. Please help.
The bug is still there in version dokka-gradle-plugin:1.6.21.
How to repeat (for android).
In an external java project, there are two overloaded static methods in the UsersManager class:
public static void a(User user, UserCallback callback)
public static void a(Activity parentActivity, User user, UserCallback callback)
In a kotlin project, the extension function is:
inline fun UsersManager.a(
parentActivity: Activity? = null,
user: User,
crossinline onError : (error: Error) -> Unit = {},
crossinline onNetworkError : (error: NetworkError) -> Unit = {},
crossinline onSuccess : (User: User) -> Unit = {},
) = UsersManager.a(
parentActivity,
user,
object : UserCallback {
override fun success(user: User) {
onSuccess.invoke(user)
}
override fun error(error: Error) {
onError.invoke(error)
}
override fun error(error: NetworkError) {
onNetworkError(error)
}
})
After running dokka on a Kotlin project in kdoc, in the 'See also' section, links like this are generated:
https://repo.example.org/myproject/android/docs/1/javadoc/com/example/myproject/sdk/v1/UsersManager.html#a-com.example.myproject.sdk.v1.User-com.example.myproject.sdk.v1.utils.UserCallback?-
By clicking on which the user gets to the javadoc page of the UsersManager class and does not rewind to the public static void a method.
The correct link should be like this (for public static void a(Activity parentActivity, User user, UserCallback callback)):
https://repo.example.org/myproject/android/docs/1/javadoc/com/example/myproject/sdk/v1/UsersManager.html#a-Activity-com.example.myproject.sdk.v1.User-com.example.myproject.sdk.v1.utils.UserCallback-
Or at least this (for the second reload public static void a(User user, UserCallback callback)):
https://repo.example.org/myproject/android/docs/1/javadoc/com/example/myproject/sdk/v1/UsersManager.html#a-com.example.myproject.sdk.v1.User-com.example.myproject.sdk.v1.utils.UserCallback-
Please help me
Is it still actual?
Can you provide more code? What are com.example.myproject.sdk.v1.User and com.example.myproject.sdk.v1.utils.UserCallback? It would be nice if we have a small reproducer.