diff options
author | aSemy <897017+aSemy@users.noreply.github.com> | 2023-03-17 15:27:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-17 15:27:03 +0100 |
commit | 8bb4f4a86b131e9740a8074cb5775930f8280019 (patch) | |
tree | 2fea9f93d621d1a2c72129358a45a565cca68e6c /plugins/base | |
parent | 2a3917b7eb70b39360893b61f5cd7f580c41cfda (diff) | |
download | dokka-8bb4f4a86b131e9740a8074cb5775930f8280019.tar.gz dokka-8bb4f4a86b131e9740a8074cb5775930f8280019.tar.bz2 dokka-8bb4f4a86b131e9740a8074cb5775930f8280019.zip |
Introduce Gradle Version Catalog with type-safe project dependencies (#2884)
Diffstat (limited to 'plugins/base')
-rw-r--r-- | plugins/base/base-test-utils/build.gradle.kts | 21 | ||||
-rw-r--r-- | plugins/base/build.gradle.kts | 52 | ||||
-rw-r--r-- | plugins/base/frontend/build.gradle.kts | 2 |
3 files changed, 36 insertions, 39 deletions
diff --git a/plugins/base/base-test-utils/build.gradle.kts b/plugins/base/base-test-utils/build.gradle.kts index 36ff2011..924a96c8 100644 --- a/plugins/base/base-test-utils/build.gradle.kts +++ b/plugins/base/base-test-utils/build.gradle.kts @@ -6,20 +6,21 @@ plugins { } dependencies { - compileOnly(project(":core")) - implementation(kotlin("stdlib-jdk8")) - implementation(kotlin("stdlib")) + compileOnly(projects.core) + + implementation(kotlin("reflect")) - compileOnly(project(":plugins:base")) - implementation(project(":core:test-api")) - val jsoup_version: String by project - implementation("org.jsoup:jsoup:$jsoup_version") + compileOnly(projects.plugins.base) + implementation(projects.core.testApi) + + implementation(libs.jsoup) implementation(kotlin("test-junit")) - testImplementation(project(":test-utils")) - testImplementation(project(":core:test-api")) - testImplementation("org.junit.jupiter:junit-jupiter:5.6.0") + testImplementation(projects.testUtils) + testImplementation(projects.core.testApi) + testImplementation(platform(libs.junit.bom)) + testImplementation(libs.junit.jupiter) } registerDokkaArtifactPublication("dokkaBaseTestUtils") { diff --git a/plugins/base/build.gradle.kts b/plugins/base/build.gradle.kts index 2bbfaa8c..b8e63b17 100644 --- a/plugins/base/build.gradle.kts +++ b/plugins/base/build.gradle.kts @@ -6,59 +6,55 @@ plugins { } dependencies { - compileOnly(project(":core")) - implementation(kotlin("stdlib-jdk8")) - implementation(kotlin("stdlib")) + compileOnly(projects.core) + implementation(kotlin("reflect")) - val coroutines_version: String by project - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version") + implementation(libs.kotlinx.coroutines.core) - compileOnly(project(":kotlin-analysis")) - val jsoup_version: String by project - implementation("org.jsoup:jsoup:$jsoup_version") + compileOnly(projects.kotlinAnalysis) + implementation(libs.jsoup) - val jackson_version: String by project - implementation("com.fasterxml.jackson.module:jackson-module-kotlin:$jackson_version") - val jackson_databind_version: String by project + implementation(libs.jackson.kotlin) constraints { - implementation("com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version") { + implementation(libs.jackson.databind) { because("CVE-2022-42003") } } - val freemarker_version: String by project - implementation("org.freemarker:freemarker:$freemarker_version") + implementation(libs.freemarker) - testImplementation(project(":plugins:base:base-test-utils")) - testImplementation(project(":core:content-matcher-test-utils")) + testImplementation(projects.plugins.base.baseTestUtils) + testImplementation(projects.core.contentMatcherTestUtils) - val kotlinx_html_version: String by project - implementation("org.jetbrains.kotlinx:kotlinx-html-jvm:$kotlinx_html_version") + implementation(libs.kotlinx.html) - testImplementation(project(":kotlin-analysis")) - testImplementation(project(":test-utils")) - testImplementation(project(":core:test-api")) - testImplementation("org.junit.jupiter:junit-jupiter:5.6.0") + testImplementation(projects.kotlinAnalysis) + testImplementation(projects.testUtils) + testImplementation(projects.core.testApi) + testImplementation(platform(libs.junit.bom)) + testImplementation(libs.junit.jupiter) } val projectDistDir = project(":plugins:base:frontend").file("dist") val generateFrontendFiles = tasks.getByPath(":plugins:base:frontend:generateFrontendFiles") -val copyJsFiles by tasks.registering(Copy::class){ - from(projectDistDir){ +val copyJsFiles by tasks.registering(Copy::class) { + from(projectDistDir) { include("*.js") } dependsOn(generateFrontendFiles) - destinationDir = File(sourceSets.main.get().resources.sourceDirectories.singleFile, "dokka/scripts") + destinationDir = + File(sourceSets.main.get().resources.sourceDirectories.singleFile, "dokka/scripts") } -val copyCssFiles by tasks.registering(Copy::class){ - from(projectDistDir){ +val copyCssFiles by tasks.registering(Copy::class) { + from(projectDistDir) { include("*.css") } dependsOn(generateFrontendFiles) - destinationDir = File(sourceSets.main.get().resources.sourceDirectories.singleFile, "dokka/styles") + destinationDir = + File(sourceSets.main.get().resources.sourceDirectories.singleFile, "dokka/styles") } val copyFrontend by tasks.registering { diff --git a/plugins/base/frontend/build.gradle.kts b/plugins/base/frontend/build.gradle.kts index 9ed576cd..f837575e 100644 --- a/plugins/base/frontend/build.gradle.kts +++ b/plugins/base/frontend/build.gradle.kts @@ -4,7 +4,7 @@ plugins { } node { - version.set("16.13.0") + version.set(libs.versions.node) download.set(true) } |