Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid snapshotting sourceLink.localDirectory input #2807

Merged
merged 5 commits into from Jan 13, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -2,6 +2,7 @@ package org.jetbrains.dokka.gradle

import org.gradle.api.Project
import org.gradle.api.provider.Property
import org.gradle.api.provider.Provider
import org.gradle.api.tasks.*
import org.jetbrains.dokka.DokkaConfigurationBuilder
import org.jetbrains.dokka.SourceLinkDefinitionImpl
Expand Down Expand Up @@ -30,16 +31,24 @@ class GradleSourceLinkBuilder(
/**
* Path to the local source directory. The path must be relative to the root of current project.
*
* This path is used to find relative paths of the source files from which the documentation is built.
* These relative paths are then combined with the base url of a source code hosting service specified with
* the [remoteUrl] property to create source links for each declaration.
*
* Example:
*
* ```kotlin
* projectDir.resolve("src")
* ```
*/
@InputDirectory
@PathSensitive(PathSensitivity.RELATIVE)
@Internal
val localDirectory: Property<File?> = project.objects.safeProperty()

@Suppress("unused")
@get:Input
internal val localDirectoryPath: Provider<String?> =
localDirectory.map { it.relativeToOrSelf(project.projectDir).invariantSeparatorsPath }
ilya-g marked this conversation as resolved.
Show resolved Hide resolved

/**
* URL of source code hosting service that can be accessed by documentation readers,
* like GitHub, GitLab, Bitbucket, etc. This URL will be used to generate
Expand Down