From 126fe0b78fba7267fc94763723ac6f5ae297e6dc Mon Sep 17 00:00:00 2001 From: Alejandro Serrano Date: Tue, 26 Oct 2021 18:29:19 +0200 Subject: [PATCH] Update to Gradle 7.2 and Dokka 1.5.31 (#885) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Simon Vergauwen Co-authored-by: Raúl Raja Martínez --- build.gradle | 31 +++++++++++++++++++----- gradle.properties | 2 +- gradle/wrapper/gradle-wrapper.properties | 2 +- 3 files changed, 27 insertions(+), 8 deletions(-) diff --git a/build.gradle b/build.gradle index 0c3a13fb3..2b1aadba6 100644 --- a/build.gradle +++ b/build.gradle @@ -14,11 +14,30 @@ plugins { configure(subprojects - project("docs") ) { apply plugin: "org.jetbrains.dokka" - dokka { - outputFormat = 'jekyll' - outputDirectory = PATH_APIDOCS - configuration { - includes = ['README.md'] + dokkaGfm { + outputDirectory = file(PATH_APIDOCS) + dokkaSourceSets { + if (file("src/main/kotlin").exists()) { + main { + skipDeprecated.set(true) + reportUndocumented.set(true) + sourceLink { + localDirectory.set(file("src/main/kotlin")) + remoteUrl.set(uri("https://github.com/arrow-kt/arrow-meta/blob/main/${relativeProjectPath('src/main/kotlin')}").toURL()) + remoteLineSuffix.set("#L") + } + } + } else if (file("src/commonMain/kotlin").exists()) { + main { + skipDeprecated.set(true) + reportUndocumented.set(true) + sourceLink { + localDirectory.set(file("src/commonMain/kotlin")) + remoteUrl.set(uri("https://github.com/arrow-kt/arrow-meta/blob/main/${relativeProjectPath('src/commonMain/kotlin')}").toURL()) + remoteLineSuffix.set("#L") + } + } + } } } } @@ -85,7 +104,7 @@ allprojects { task generateDoc(type: Exec) { // Reason of commandLine: to avoid specifying the list of modules - commandLine "sh", "gradlew", "dokka" + commandLine "sh", "gradlew", "dokkaGfm" } task runValidation(type: Exec) { diff --git a/gradle.properties b/gradle.properties index 714f645d0..473ffc22a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -11,7 +11,7 @@ KTLINT_VERSION=0.42.1 KTLINT_GRADLE_VERSION=10.1.0 KOTEST_VERSION=5.0.0.M2 ASSERTJ_VERSION=3.13.2 -DOKKA_VERSION=0.10.0 +DOKKA_VERSION=1.5.31 CLASS_GRAPH_VERSION=4.8.47 JUNIT_VERSION=5.8.0 KOTLIN_COMPILE_TESTING=1.4.4 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 3ab0b725e..ffed3a254 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists