aboutsummaryrefslogtreecommitdiff
path: root/runners/gradle-plugin/src
diff options
context:
space:
mode:
authorIgnat Beresnev <ignat.beresnev@jetbrains.com>2022-04-29 15:03:08 +0300
committerGitHub <noreply@github.com>2022-04-29 15:03:08 +0300
commit8c218ff4dd5f970233c43845c19299fc74256389 (patch)
treeb6818183ce8faa2c58d6571ca1c86aa28d4f0431 /runners/gradle-plugin/src
parent84aacad29982240ae367b21e9d283d38dab672ae (diff)
downloaddokka-8c218ff4dd5f970233c43845c19299fc74256389.tar.gz
dokka-8c218ff4dd5f970233c43845c19299fc74256389.tar.bz2
dokka-8c218ff4dd5f970233c43845c19299fc74256389.zip
Enable warnings as errors and fix all warnings (#2451)
* Enable warnings as errors and fix all warnings * Enable skip-metadata-version-check compiler setting
Diffstat (limited to 'runners/gradle-plugin/src')
-rw-r--r--runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilder.kt10
-rw-r--r--runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleTaskTest.kt2
-rw-r--r--runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderTest.kt1
3 files changed, 9 insertions, 4 deletions
diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilder.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilder.kt
index abaa2536..21f0e268 100644
--- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilder.kt
+++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilder.kt
@@ -11,7 +11,6 @@ import org.gradle.api.provider.SetProperty
import org.gradle.api.tasks.*
import org.gradle.kotlin.dsl.listProperty
import org.gradle.kotlin.dsl.setProperty
-import org.gradle.util.ConfigureUtil
import org.jetbrains.dokka.*
import java.io.File
import java.net.URL
@@ -156,8 +155,9 @@ open class GradleDokkaSourceSetBuilder(
sourceRoot(project.file(path))
}
+ @Suppress("DEPRECATION") // TODO [beresnev] ConfigureUtil will be removed in Gradle 8
fun sourceLink(c: Closure<in GradleSourceLinkBuilder>) {
- val configured = ConfigureUtil.configure(c, GradleSourceLinkBuilder(project))
+ val configured = org.gradle.util.ConfigureUtil.configure(c, GradleSourceLinkBuilder(project))
sourceLinks.add(configured)
}
@@ -167,8 +167,9 @@ open class GradleDokkaSourceSetBuilder(
sourceLinks.add(sourceLink)
}
+ @Suppress("DEPRECATION") // TODO [beresnev] ConfigureUtil will be removed in Gradle 8
fun perPackageOption(c: Closure<in GradlePackageOptionsBuilder>) {
- val configured = ConfigureUtil.configure(c, GradlePackageOptionsBuilder(project))
+ val configured = org.gradle.util.ConfigureUtil.configure(c, GradlePackageOptionsBuilder(project))
perPackageOptions.add(configured)
}
@@ -178,8 +179,9 @@ open class GradleDokkaSourceSetBuilder(
perPackageOptions.add(option)
}
+ @Suppress("DEPRECATION") // TODO [beresnev] ConfigureUtil will be removed in Gradle 8
fun externalDocumentationLink(c: Closure<in GradleExternalDocumentationLinkBuilder>) {
- val link = ConfigureUtil.configure(c, GradleExternalDocumentationLinkBuilder(project))
+ val link = org.gradle.util.ConfigureUtil.configure(c, GradleExternalDocumentationLinkBuilder(project))
externalDocumentationLinks.add(link)
}
diff --git a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleTaskTest.kt b/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleTaskTest.kt
index 5ad33c57..6e851326 100644
--- a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleTaskTest.kt
+++ b/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleTaskTest.kt
@@ -201,6 +201,8 @@ class DokkaMultiModuleTaskTest {
val childTask = child.tasks.create<DokkaTask>("child")
parentTask.addChildTask(childTask)
+
+ @Suppress("NAME_SHADOWING") // ¯\_(ツ)_/¯
parentTask.fileLayout by DokkaMultiModuleFileLayout { parent, child ->
parent.project.buildDir.resolve(child.name)
}
diff --git a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderTest.kt b/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderTest.kt
index 59b35917..770d1af3 100644
--- a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderTest.kt
+++ b/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderTest.kt
@@ -148,6 +148,7 @@ class GradleDokkaSourceSetBuilderTest {
}
@Test
+ @Suppress("DEPRECATION")
fun includeNonPublic() {
val sourceSet = GradleDokkaSourceSetBuilder("", project)
assertEquals(