diff --git a/README.md b/README.md
index 45dd1c27e..4351fc0cb 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,6 @@
 [![DOI](https://zenodo.org/badge/129486382.svg)](https://zenodo.org/badge/latestdoi/129486382)
 ![Gradle build](https://github.com/SciProgCentre/kmath/workflows/Gradle%20build/badge.svg)
 [![Maven Central](https://img.shields.io/maven-central/v/space.kscience/kmath-core.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22space.kscience%22)
-[![Space](https://img.shields.io/badge/dynamic/xml?color=orange&label=Space&query=//metadata/versioning/latest&url=https%3A%2F%2Fmaven.pkg.jetbrains.space%2Fmipt-npm%2Fp%2Fsci%2Fmaven%2Fspace%2Fkscience%2Fkmath-core%2Fmaven-metadata.xml)](https://maven.pkg.jetbrains.space/mipt-npm/p/sci/maven/space/kscience/)
 
 # KMath
 
diff --git a/build.gradle.kts b/build.gradle.kts
index f6d037386..ccc9088f6 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -17,7 +17,7 @@ allprojects {
     version = "0.4.3-dev-1"
 }
 
-dependencies{
+dependencies {
     subprojects.forEach {
         dokka(it)
     }
@@ -27,23 +27,29 @@ subprojects {
     if (name.startsWith("kmath")) apply<MavenPublishPlugin>()
 
     plugins.withId("org.jetbrains.dokka") {
-        tasks.withType<org.jetbrains.dokka.gradle.DokkaTaskPartial> {
-            dependsOn(tasks["assemble"])
-
-            dokkaSourceSets.all {
-                val readmeFile = this@subprojects.projectDir.resolve("README.md")
+        dokka {
+            dokkaSourceSets.configureEach {
+                val readmeFile = projectDir.resolve("README.md")
                 if (readmeFile.exists()) includes.from(readmeFile)
                 val kotlinDirPath = "src/$name/kotlin"
                 val kotlinDir = file(kotlinDirPath)
 
                 if (kotlinDir.exists()) sourceLink {
                     localDirectory.set(kotlinDir)
-
-                    remoteUrl.set(
-                        uri("https://github.com/SciProgCentre/kmath/tree/master/${this@subprojects.name}/$kotlinDirPath").toURL()
+                    remoteUrl(
+                        "https://github.com/SciProgCentre/kmath/tree/master/${name}/$kotlinDirPath"
                     )
                 }
 
+                fun externalDocumentationLink(url: String, packageListUrl: String? = null){
+                    externalDocumentationLinks.register(url) {
+                        url(url)
+                        packageListUrl?.let {
+                            packageListUrl(it)
+                        }
+                    }
+                }
+
                 externalDocumentationLink("https://commons.apache.org/proper/commons-math/javadocs/api-3.6.1/")
                 externalDocumentationLink("https://deeplearning4j.org/api/latest/")
                 externalDocumentationLink("https://axelclk.bitbucket.io/symja/javadoc/")
@@ -54,11 +60,12 @@ subprojects {
                 )
 
                 externalDocumentationLink(
-                    "https://breandan.net/kotlingrad/kotlingrad/",
-                    "https://breandan.net/kotlingrad/kotlingrad/kotlingrad/package-list",
+                    "https://breandan.net/kotlingrad/kotlingrad",
+                    "https://breandan.net/kotlingrad/package-list",
                 )
             }
         }
+
     }
 }