I’ve got an Android project, and docs are being ge...
# dokka
b
I’ve got an Android project, and docs are being generated, but they do not contain source links? I think I have dokka configured correctly, so I’m not sure what’s going on. Any ideas? I’m using 1.6.10. Here’s my config for Gfm:
Copy code
tasks.dokkaGfm {
    moduleName.set("app")
    outputDirectory.set(projectDir.resolve("../docs"))
    suppressObviousFunctions.set(true)

    dokkaSourceSets {
        configureEach {
           displayName.set("app")

            sourceLink {
                // Unix based directory relative path to the root of the project (where you execute gradle respectively).
                localDirectory.set(file("src/main/kotlin"))

                // URL showing where the source code can be accessed through the web browser
                remoteUrl.set(URL("<https://github.com/bradleycorn/resume-android/blob/master/app/src/main/kotlin>"))
                // Suffix which is used to append the line number to the URL. Use #L for GitHub
                remoteLineSuffix.set("#L")
            }
        }
    }
}
p
Try this:
Copy code
tasks.dokkaGfm {
    moduleName.set("app")
    outputDirectory.set(projectDir.resolve("../docs"))
    suppressObviousFunctions.set(true)

    dokkaSourceSets {
        configureEach {
           displayName.set("app")

            sourceLink {
                // Unix based directory relative path to the root of the project (where you execute gradle respectively).
                localDirectory.set(file("src/main"))

                // URL showing where the source code can be accessed through the web browser
                remoteUrl.set(URL("<https://github.com/bradleycorn/resume-android/blob/master/app/src/main>"))
                // Suffix which is used to append the line number to the URL. Use #L for GitHub
                remoteLineSuffix.set("#L")
            }
        }
    }
}
b
@PabloCasia thanks, but that didn’t work either. Anyone else know how to get source links working?
v
I suppose you have missed
new URL()
:
Copy code
remoteUrl.set(new URL("<https://github.com/bradleycorn/resume-android/blob/master/app/src/main/kotlin>"))