From 9af0b307a14253a21d11d340a78dd9061abee359 Mon Sep 17 00:00:00 2001 From: Vsevolod Tolstopyatov Date: Mon, 27 Mar 2023 03:01:34 -0700 Subject: Mark utilities.* API as Dokka-internal (#2937) * Deprecate unused declaration, remove inline declaration (as it's binary compatible), opt-in into internal API at project level * Opt-in into DokkaInternalApi where applicable * Get rid of intermediate test-utils module --- .../main/kotlin/org/jetbrains/conventions/base-java.gradle.kts | 2 ++ .../main/kotlin/org/jetbrains/conventions/kotlin-jvm.gradle.kts | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'build-logic/src/main/kotlin/org/jetbrains/conventions') diff --git a/build-logic/src/main/kotlin/org/jetbrains/conventions/base-java.gradle.kts b/build-logic/src/main/kotlin/org/jetbrains/conventions/base-java.gradle.kts index befec76f..0dbac364 100644 --- a/build-logic/src/main/kotlin/org/jetbrains/conventions/base-java.gradle.kts +++ b/build-logic/src/main/kotlin/org/jetbrains/conventions/base-java.gradle.kts @@ -43,4 +43,6 @@ dependencies { // repetitive, but more declarative and clear), or some other solution. testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine") testRuntimeOnly("org.junit.vintage:junit-vintage-engine") + // kotlin-test asserts for all projects + testImplementation(kotlin("test-junit")) } diff --git a/build-logic/src/main/kotlin/org/jetbrains/conventions/kotlin-jvm.gradle.kts b/build-logic/src/main/kotlin/org/jetbrains/conventions/kotlin-jvm.gradle.kts index c07fc092..28a8d76d 100644 --- a/build-logic/src/main/kotlin/org/jetbrains/conventions/kotlin-jvm.gradle.kts +++ b/build-logic/src/main/kotlin/org/jetbrains/conventions/kotlin-jvm.gradle.kts @@ -11,15 +11,21 @@ plugins { configureDokkaVersion() +val projectsWithoutOptInDependency = setOf( + ":integration-tests", ":integration-tests:gradle", ":integration-tests:maven", ":integration-tests:cli") + tasks.withType().configureEach { + // By path because Dokka has multiple projects with the same name (i.e. 'cli') + if (project.path in projectsWithoutOptInDependency) return@configureEach compilerOptions { freeCompilerArgs.addAll( listOf( "-opt-in=kotlin.RequiresOptIn", + "-opt-in=org.jetbrains.dokka.InternalDokkaApi", "-Xjsr305=strict", "-Xskip-metadata-version-check", // need 1.4 support, otherwise there might be problems with Gradle 6.x (it's bundling Kotlin 1.4) - "-Xsuppress-version-warnings" + "-Xsuppress-version-warnings", ) ) allWarningsAsErrors.set(true) -- cgit