From 80cfbe41ee828b9568e51d34c86c7210ec475588 Mon Sep 17 00:00:00 2001 From: Gregor Dschung Date: Tue, 11 Jan 2022 21:06:37 +0100 Subject: [PATCH] Update Dokka to 1.6.10 --- build.gradle | 2 +- buildSrc/build.gradle | 3 ++- .../main/groovy/truststorebuilder-docs.gradle | 25 ++++-------------- .../groovy/truststorebuilder-publish.gradle | 26 +++++++++++++++++++ .../main/groovy/truststorebuilder-qa.gradle | 2 +- 5 files changed, 35 insertions(+), 23 deletions(-) diff --git a/build.gradle b/build.gradle index 729da1b..dd645b3 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ plugins { id "java-gradle-plugin" id "groovy" - id "org.jetbrains.kotlin.jvm" version "1.5.31" // should match Kotlin version bundled with Gradle + id "org.jetbrains.kotlin.jvm" id "truststorebuilder-versioning" id "truststorebuilder-docs" id "truststorebuilder-publish" diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle index 299faf7..73af190 100644 --- a/buildSrc/build.gradle +++ b/buildSrc/build.gradle @@ -8,10 +8,11 @@ repositories { } dependencies { + implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.31") // should match Kotlin version bundled with Gradle implementation("com.gradle.publish:plugin-publish-plugin:0.19.0") implementation("com.diffplug.spotless:spotless-plugin-gradle:6.1.2") implementation("org.ajoberstar:gradle-git-publish:3.0.0") - implementation("org.jetbrains.dokka:dokka-gradle-plugin:0.10.1") + implementation("org.jetbrains.dokka:dokka-gradle-plugin:1.6.10") implementation("com.hello2morrow:sonargraph-gradle-plugin:8.8.0") implementation("org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.3") } diff --git a/buildSrc/src/main/groovy/truststorebuilder-docs.gradle b/buildSrc/src/main/groovy/truststorebuilder-docs.gradle index 6f86b11..23e5380 100644 --- a/buildSrc/src/main/groovy/truststorebuilder-docs.gradle +++ b/buildSrc/src/main/groovy/truststorebuilder-docs.gradle @@ -1,35 +1,20 @@ plugins { - id("org.ajoberstar.git-publish") id("org.jetbrains.dokka") } -/*************************** - * Publish to Github Pages - ***************************/ - -gitPublish { - ext { - groomingDir = "$buildDir/ghpages-grooming" - } - repoUri = 'git@github.com:chkpnt/truststorebuilder-gradle-plugin.git' - branch = 'gh-pages' - preserve { include 'reports/*' } // until Sonargraph's report can be built again - contents { - from groomingDir - } - commitMessage = 'Publish of Github pages from Gradle' +ext { + ghPagesGroomingDir = "$buildDir/ghpages-grooming" } /*************************** * KDoc ***************************/ -dokka { - outputFormat = 'html' - outputDirectory = "${gitPublish.groomingDir}/kdoc" +dokkaHtml { + outputDirectory.set(file("${ghPagesGroomingDir}/kdoc")) } task docs { - dependsOn dokka + dependsOn dokkaHtml group org.gradle.api.plugins.JavaBasePlugin.DOCUMENTATION_GROUP } diff --git a/buildSrc/src/main/groovy/truststorebuilder-publish.gradle b/buildSrc/src/main/groovy/truststorebuilder-publish.gradle index 68347cc..5578a3f 100644 --- a/buildSrc/src/main/groovy/truststorebuilder-publish.gradle +++ b/buildSrc/src/main/groovy/truststorebuilder-publish.gradle @@ -1,6 +1,7 @@ plugins { id("maven-publish") id("com.gradle.plugin-publish") + id("org.ajoberstar.git-publish") } /********************************* @@ -63,3 +64,28 @@ pluginBundle { } } } + +task printSourceSetInformation2(){ + doLast{ + sourceSets.each { srcSet -> + println "["+srcSet.name+"]" + print "-->Source directories: "+srcSet.allJava.srcDirs+"\n" + print "-->Output directories: "+srcSet.output.classesDirs.files+"\n" + println "" + } + } +} + +/*************************** + * Publish to Github Pages + ***************************/ + +gitPublish { + repoUri = 'git@github.com:chkpnt/truststorebuilder-gradle-plugin.git' + branch = 'gh-pages' + preserve { include 'reports/*' } // until Sonargraph's report can be built again + contents { + from ghPagesGroomingDir + } + commitMessage = 'Publish of Github pages from Gradle' +} diff --git a/buildSrc/src/main/groovy/truststorebuilder-qa.gradle b/buildSrc/src/main/groovy/truststorebuilder-qa.gradle index a39031e..1aa8ede 100644 --- a/buildSrc/src/main/groovy/truststorebuilder-qa.gradle +++ b/buildSrc/src/main/groovy/truststorebuilder-qa.gradle @@ -73,7 +73,7 @@ sonargraphDynamicReport { // not the default value but null if not set explicitly :-/ task prepareSonargraphReportForGhPages(type: Copy) { from "$buildDir/sonargraph" - into "${gitPublish.groomingDir}/reports" + into "${ghPagesGroomingDir}/reports" exclude '*.xml' }