From 62c980707d23d2d451c75330f7ed1ba613777cf3 Mon Sep 17 00:00:00 2001 From: aSemy <897017+aSemy@users.noreply.github.com> Date: Tue, 7 Mar 2023 23:26:06 +0100 Subject: Use buildSrc convention plugins to configure the Dokka subprojects (#2704) --- plugins/all-modules-page/build.gradle.kts | 16 +++++++++++- plugins/android-documentation/build.gradle.kts | 13 ++++++++++ plugins/base/base-test-utils/build.gradle.kts | 14 ++++++++++ plugins/base/build.gradle.kts | 12 +++++++++ plugins/base/frontend/build.gradle.kts | 1 + plugins/build.gradle.kts | 30 ---------------------- plugins/gfm/build.gradle.kts | 13 ++++++++++ .../gfm/gfm-template-processing/build.gradle.kts | 15 ++++++++++- plugins/javadoc/build.gradle.kts | 13 ++++++++++ plugins/jekyll/build.gradle.kts | 13 ++++++++++ .../jekyll-template-processing/build.gradle.kts | 16 +++++++++++- plugins/kotlin-as-java/build.gradle.kts | 13 ++++++++++ plugins/mathjax/build.gradle.kts | 13 ++++++++++ plugins/templating/build.gradle.kts | 15 ++++++++++- plugins/versioning/build.gradle.kts | 15 ++++++++++- 15 files changed, 177 insertions(+), 35 deletions(-) delete mode 100644 plugins/build.gradle.kts (limited to 'plugins') diff --git a/plugins/all-modules-page/build.gradle.kts b/plugins/all-modules-page/build.gradle.kts index a690e077..cd07d9b3 100644 --- a/plugins/all-modules-page/build.gradle.kts +++ b/plugins/all-modules-page/build.gradle.kts @@ -1,10 +1,20 @@ import org.jetbrains.registerDokkaArtifactPublication +plugins { + org.jetbrains.conventions.`kotlin-jvm` + org.jetbrains.conventions.`maven-publish` +} + registerDokkaArtifactPublication("dokkaAllModulesPage") { artifactId = "all-modules-page-plugin" } dependencies { + compileOnly(project(":core")) + implementation(kotlin("stdlib-jdk8")) + implementation(kotlin("stdlib")) + implementation(kotlin("reflect")) + compileOnly(project(":kotlin-analysis")) implementation(project(":plugins:base")) implementation(project(":plugins:templating")) @@ -29,4 +39,8 @@ dependencies { val jsoup_version: String by project implementation("org.jsoup:jsoup:$jsoup_version") -} \ No newline at end of file + + testImplementation(project(":test-utils")) + testImplementation(project(":core:test-api")) + testImplementation("org.junit.jupiter:junit-jupiter:5.6.0") +} diff --git a/plugins/android-documentation/build.gradle.kts b/plugins/android-documentation/build.gradle.kts index 79a89165..e1293520 100644 --- a/plugins/android-documentation/build.gradle.kts +++ b/plugins/android-documentation/build.gradle.kts @@ -1,9 +1,22 @@ import org.jetbrains.registerDokkaArtifactPublication +plugins { + org.jetbrains.conventions.`kotlin-jvm` + org.jetbrains.conventions.`maven-publish` +} + dependencies { + compileOnly(project(":core")) + implementation(kotlin("stdlib-jdk8")) + implementation(kotlin("stdlib")) + implementation(kotlin("reflect")) + implementation(project(":plugins:base")) testImplementation(project(":plugins:base")) testImplementation(project(":plugins:base:base-test-utils")) + testImplementation(project(":test-utils")) + testImplementation(project(":core:test-api")) + testImplementation("org.junit.jupiter:junit-jupiter:5.6.0") } registerDokkaArtifactPublication("androidDocumentationPlugin") { diff --git a/plugins/base/base-test-utils/build.gradle.kts b/plugins/base/base-test-utils/build.gradle.kts index 122b9b92..b7d02115 100644 --- a/plugins/base/base-test-utils/build.gradle.kts +++ b/plugins/base/base-test-utils/build.gradle.kts @@ -1,11 +1,25 @@ import org.jetbrains.registerDokkaArtifactPublication +plugins { + org.jetbrains.conventions.`kotlin-jvm` + org.jetbrains.conventions.`maven-publish` +} + dependencies { + compileOnly(project(":core")) + implementation(kotlin("stdlib-jdk8")) + implementation(kotlin("stdlib")) + implementation(kotlin("reflect")) + compileOnly(project(":plugins:base")) implementation(project(":core:test-api")) val jsoup_version: String by project implementation("org.jsoup:jsoup:$jsoup_version") implementation(kotlin("test-junit")) + + testImplementation(project(":test-utils")) + testImplementation(project(":core:test-api")) + testImplementation("org.junit.jupiter:junit-jupiter:5.6.0") } registerDokkaArtifactPublication("dokkaBaseTestUtils") { diff --git a/plugins/base/build.gradle.kts b/plugins/base/build.gradle.kts index 93348ed7..089e26d1 100644 --- a/plugins/base/build.gradle.kts +++ b/plugins/base/build.gradle.kts @@ -1,7 +1,16 @@ import org.jetbrains.registerDokkaArtifactPublication +plugins { + org.jetbrains.conventions.`kotlin-jvm` + org.jetbrains.conventions.`maven-publish` +} dependencies { + compileOnly(project(":core")) + implementation(kotlin("stdlib-jdk8")) + implementation(kotlin("stdlib")) + implementation(kotlin("reflect")) + val coroutines_version: String by project implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version") @@ -28,6 +37,9 @@ dependencies { implementation("org.jetbrains.kotlinx:kotlinx-html-jvm:$kotlinx_html_version") testImplementation(project(":kotlin-analysis")) + testImplementation(project(":test-utils")) + testImplementation(project(":core:test-api")) + testImplementation("org.junit.jupiter:junit-jupiter:5.6.0") } val projectDistDir = project(":plugins:base:frontend").file("dist") diff --git a/plugins/base/frontend/build.gradle.kts b/plugins/base/frontend/build.gradle.kts index aa39d20e..9ed576cd 100644 --- a/plugins/base/frontend/build.gradle.kts +++ b/plugins/base/frontend/build.gradle.kts @@ -1,4 +1,5 @@ plugins { + base id("com.github.node-gradle.node") version "3.2.1" } diff --git a/plugins/build.gradle.kts b/plugins/build.gradle.kts deleted file mode 100644 index 1b15a209..00000000 --- a/plugins/build.gradle.kts +++ /dev/null @@ -1,30 +0,0 @@ -import org.gradle.api.tasks.testing.logging.TestExceptionFormat -import org.gradle.api.tasks.testing.logging.TestLogEvent - -subprojects { - apply { - plugin("maven-publish") - } - - dependencies { - compileOnly(project(":core")) - implementation(kotlin("stdlib-jdk8")) - implementation(kotlin("stdlib")) - implementation(kotlin("reflect")) - - testImplementation(project(":test-utils")) - testImplementation(project(":core:test-api")) - testImplementation("org.junit.jupiter:junit-jupiter:5.6.0") - } - - tasks.test { - useJUnitPlatform() - testLogging { - exceptionFormat = TestExceptionFormat.FULL - events(TestLogEvent.SKIPPED, TestLogEvent.FAILED) - showExceptions = true - showCauses = true - showStackTraces = true - } - } -} diff --git a/plugins/gfm/build.gradle.kts b/plugins/gfm/build.gradle.kts index ee486dfd..bb97cdd3 100644 --- a/plugins/gfm/build.gradle.kts +++ b/plugins/gfm/build.gradle.kts @@ -1,11 +1,24 @@ import org.jetbrains.registerDokkaArtifactPublication +plugins { + org.jetbrains.conventions.`kotlin-jvm` + org.jetbrains.conventions.`maven-publish` +} + dependencies { + compileOnly(project(":core")) + implementation(kotlin("stdlib-jdk8")) + implementation(kotlin("stdlib")) + implementation(kotlin("reflect")) implementation(project(":plugins:base")) testImplementation(project(":plugins:base")) testImplementation(project(":plugins:base:base-test-utils")) val jackson_version: String by project implementation("com.fasterxml.jackson.module:jackson-module-kotlin:$jackson_version") + testImplementation(project(":test-utils")) + testImplementation(project(":core:test-api")) + testImplementation("org.junit.jupiter:junit-jupiter:5.6.0") + val jackson_databind_version: String by project constraints { implementation("com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version") { diff --git a/plugins/gfm/gfm-template-processing/build.gradle.kts b/plugins/gfm/gfm-template-processing/build.gradle.kts index b401c0c7..450b33a2 100644 --- a/plugins/gfm/gfm-template-processing/build.gradle.kts +++ b/plugins/gfm/gfm-template-processing/build.gradle.kts @@ -1,6 +1,15 @@ import org.jetbrains.registerDokkaArtifactPublication +plugins { + org.jetbrains.conventions.`kotlin-jvm` + org.jetbrains.conventions.`maven-publish` +} + dependencies { + compileOnly(project(":core")) + implementation(kotlin("stdlib-jdk8")) + implementation(kotlin("stdlib")) + implementation(kotlin("reflect")) implementation(project(":plugins:base")) implementation(project(":plugins:gfm")) implementation(project(":plugins:all-modules-page")) @@ -8,8 +17,12 @@ dependencies { val coroutines_version: String by project implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version") + + testImplementation(project(":test-utils")) + testImplementation(project(":core:test-api")) + testImplementation("org.junit.jupiter:junit-jupiter:5.6.0") } registerDokkaArtifactPublication("dokkaGfmTemplateProcessing") { artifactId = "gfm-template-processing-plugin" -} \ No newline at end of file +} diff --git a/plugins/javadoc/build.gradle.kts b/plugins/javadoc/build.gradle.kts index 471e4dda..c41256ca 100644 --- a/plugins/javadoc/build.gradle.kts +++ b/plugins/javadoc/build.gradle.kts @@ -1,6 +1,15 @@ import org.jetbrains.registerDokkaArtifactPublication +plugins { + org.jetbrains.conventions.`kotlin-jvm` + org.jetbrains.conventions.`maven-publish` +} + dependencies { + compileOnly(project(":core")) + implementation(kotlin("stdlib-jdk8")) + implementation(kotlin("stdlib")) + implementation(kotlin("reflect")) compileOnly(project(":kotlin-analysis")) implementation("com.soywiz.korlibs.korte:korte-jvm:2.7.0") implementation(project(":plugins:base")) @@ -15,6 +24,10 @@ dependencies { val jsoup_version: String by project testImplementation("org.jsoup:jsoup:$jsoup_version") + + testImplementation(project(":test-utils")) + testImplementation(project(":core:test-api")) + testImplementation("org.junit.jupiter:junit-jupiter:5.6.0") } registerDokkaArtifactPublication("javadocPlugin") { diff --git a/plugins/jekyll/build.gradle.kts b/plugins/jekyll/build.gradle.kts index 64cf9800..483c58b3 100644 --- a/plugins/jekyll/build.gradle.kts +++ b/plugins/jekyll/build.gradle.kts @@ -1,8 +1,21 @@ import org.jetbrains.registerDokkaArtifactPublication +plugins { + org.jetbrains.conventions.`kotlin-jvm` + org.jetbrains.conventions.`maven-publish` +} + dependencies { + compileOnly(project(":core")) + implementation(kotlin("stdlib-jdk8")) + implementation(kotlin("stdlib")) + implementation(kotlin("reflect")) implementation(project(":plugins:base")) implementation(project(":plugins:gfm")) + + testImplementation(project(":test-utils")) + testImplementation(project(":core:test-api")) + testImplementation("org.junit.jupiter:junit-jupiter:5.6.0") } registerDokkaArtifactPublication("jekyllPlugin") { diff --git a/plugins/jekyll/jekyll-template-processing/build.gradle.kts b/plugins/jekyll/jekyll-template-processing/build.gradle.kts index 2ccb6b89..9845a993 100644 --- a/plugins/jekyll/jekyll-template-processing/build.gradle.kts +++ b/plugins/jekyll/jekyll-template-processing/build.gradle.kts @@ -1,6 +1,16 @@ import org.jetbrains.registerDokkaArtifactPublication +plugins { + org.jetbrains.conventions.`kotlin-jvm` + org.jetbrains.conventions.`maven-publish` +} + dependencies { + compileOnly(project(":core")) + implementation(kotlin("stdlib-jdk8")) + implementation(kotlin("stdlib")) + implementation(kotlin("reflect")) + implementation(project(":plugins:base")) implementation(project(":plugins:jekyll")) implementation(project(":plugins:all-modules-page")) @@ -10,8 +20,12 @@ dependencies { val coroutines_version: String by project implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version") + + testImplementation(project(":test-utils")) + testImplementation(project(":core:test-api")) + testImplementation("org.junit.jupiter:junit-jupiter:5.6.0") } registerDokkaArtifactPublication("dokkaJekyllTemplateProcessing") { artifactId = "jekyll-template-processing-plugin" -} \ No newline at end of file +} diff --git a/plugins/kotlin-as-java/build.gradle.kts b/plugins/kotlin-as-java/build.gradle.kts index fb20d659..1b759efb 100644 --- a/plugins/kotlin-as-java/build.gradle.kts +++ b/plugins/kotlin-as-java/build.gradle.kts @@ -1,6 +1,15 @@ import org.jetbrains.registerDokkaArtifactPublication +plugins { + org.jetbrains.conventions.`kotlin-jvm` + org.jetbrains.conventions.`maven-publish` +} + dependencies { + compileOnly(project(":core")) + implementation(kotlin("stdlib-jdk8")) + implementation(kotlin("stdlib")) + implementation(kotlin("reflect")) compileOnly(project(":kotlin-analysis")) implementation(project(":plugins:base")) testImplementation(project(":plugins:base")) @@ -9,6 +18,10 @@ dependencies { val jsoup_version: String by project testImplementation("org.jsoup:jsoup:$jsoup_version") testImplementation(project(":kotlin-analysis")) + + testImplementation(project(":test-utils")) + testImplementation(project(":core:test-api")) + testImplementation("org.junit.jupiter:junit-jupiter:5.6.0") } registerDokkaArtifactPublication("kotlinAsJavaPlugin") { diff --git a/plugins/mathjax/build.gradle.kts b/plugins/mathjax/build.gradle.kts index 0b69a038..07ac053b 100644 --- a/plugins/mathjax/build.gradle.kts +++ b/plugins/mathjax/build.gradle.kts @@ -1,6 +1,15 @@ import org.jetbrains.registerDokkaArtifactPublication +plugins { + org.jetbrains.conventions.`kotlin-jvm` + org.jetbrains.conventions.`maven-publish` +} + dependencies { + compileOnly(project(":core")) + implementation(kotlin("stdlib-jdk8")) + implementation(kotlin("stdlib")) + implementation(kotlin("reflect")) implementation(project(":plugins:base")) val jsoup_version: String by project @@ -9,6 +18,10 @@ dependencies { testImplementation(project(":core:content-matcher-test-utils")) testImplementation(kotlin("test-junit")) testImplementation(project(":kotlin-analysis")) + + testImplementation(project(":test-utils")) + testImplementation(project(":core:test-api")) + testImplementation("org.junit.jupiter:junit-jupiter:5.6.0") } registerDokkaArtifactPublication("mathjaxPlugin") { diff --git a/plugins/templating/build.gradle.kts b/plugins/templating/build.gradle.kts index ee1067ef..d4909d9b 100644 --- a/plugins/templating/build.gradle.kts +++ b/plugins/templating/build.gradle.kts @@ -1,10 +1,19 @@ import org.jetbrains.registerDokkaArtifactPublication +plugins { + org.jetbrains.conventions.`kotlin-jvm` + org.jetbrains.conventions.`maven-publish` +} + registerDokkaArtifactPublication("templating-plugin") { artifactId = "templating-plugin" } dependencies { + compileOnly(project(":core")) + implementation(kotlin("stdlib-jdk8")) + implementation(kotlin("stdlib")) + implementation(kotlin("reflect")) implementation(project(":plugins:base")) val coroutines_version: String by project @@ -23,4 +32,8 @@ dependencies { val jsoup_version: String by project implementation("org.jsoup:jsoup:$jsoup_version") testImplementation(project(":plugins:base:base-test-utils")) -} \ No newline at end of file + + testImplementation(project(":test-utils")) + testImplementation(project(":core:test-api")) + testImplementation("org.junit.jupiter:junit-jupiter:5.6.0") +} diff --git a/plugins/versioning/build.gradle.kts b/plugins/versioning/build.gradle.kts index 7d585a44..0c7ee0a4 100644 --- a/plugins/versioning/build.gradle.kts +++ b/plugins/versioning/build.gradle.kts @@ -1,10 +1,19 @@ import org.jetbrains.registerDokkaArtifactPublication +plugins { + org.jetbrains.conventions.`kotlin-jvm` + org.jetbrains.conventions.`maven-publish` +} + registerDokkaArtifactPublication("versioning-plugin") { artifactId = "versioning-plugin" } dependencies { + compileOnly(project(":core")) + implementation(kotlin("stdlib-jdk8")) + implementation(kotlin("stdlib")) + implementation(kotlin("reflect")) implementation(project(":plugins:base")) implementation(project(":plugins:templating")) @@ -24,4 +33,8 @@ dependencies { val jsoup_version: String by project implementation("org.jsoup:jsoup:$jsoup_version") implementation("org.apache.maven:maven-artifact:3.8.5") -} \ No newline at end of file + + testImplementation(project(":test-utils")) + testImplementation(project(":core:test-api")) + testImplementation("org.junit.jupiter:junit-jupiter:5.6.0") +} -- cgit