From 03bc60f8346582900c312963790b1607694b7178 Mon Sep 17 00:00:00 2001 From: Sebastian Aigner Date: Thu, 18 Apr 2024 13:13:37 +0200 Subject: [PATCH] Create sourceLink URL with non-deprecated URI constructor Fixes failing Gradle import of the project since -Werror is set and the URL constructor is deprecated. --- buildSrc/src/main/kotlin/Documentation.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/buildSrc/src/main/kotlin/Documentation.kt b/buildSrc/src/main/kotlin/Documentation.kt index 090ed8310b63..92eb73e751c4 100644 --- a/buildSrc/src/main/kotlin/Documentation.kt +++ b/buildSrc/src/main/kotlin/Documentation.kt @@ -1,6 +1,6 @@ import org.gradle.kotlin.dsl.assign import org.jetbrains.dokka.gradle.AbstractDokkaLeafTask -import java.net.URL +import java.net.URI fun AbstractDokkaLeafTask.applyKordDokkaOptions() { @@ -16,7 +16,7 @@ fun AbstractDokkaLeafTask.applyKordDokkaOptions() { sourceLink { localDirectory = project.projectDir - remoteUrl = URL("https://github.com/kordlib/kord/blob/${project.commitHash}/${project.name}") + remoteUrl = URI("https://github.com/kordlib/kord/blob/${project.commitHash}/${project.name}").toURL() remoteLineSuffix = "#L" }