From 3ba2d26d9fc7b9f9c9471afe9a8de099d591ed47 Mon Sep 17 00:00:00 2001 From: Goooler Date: Fri, 15 Sep 2023 23:26:15 +0800 Subject: [PATCH] Simple property assignments in KTS https://blog.gradle.org/simpler-kotlin-dsl-property-assignment --- buildSrc/build.gradle.kts | 2 +- buildSrc/settings.gradle.kts | 2 +- .../buildsrc/conventions/base.gradle.kts | 2 +- .../dokkatoo-example-projects.gradle.kts | 2 +- .../buildsrc/conventions/java-base.gradle.kts | 2 +- .../kotlin-gradle-plugin.gradle.kts | 2 +- .../conventions/maven-publishing.gradle.kts | 2 +- examples/build.gradle.kts | 2 +- .../dokkatoo/build.gradle.kts | 4 +-- .../gradle-example/dokka/build.gradle.kts | 11 ++++---- .../gradle-example/dokkatoo/build.gradle.kts | 6 ++--- .../dokka/build.gradle.kts | 4 +-- .../dokka/parentProject/build.gradle.kts | 10 +++---- .../dokkatoo/buildSrc/settings.gradle.kts | 2 +- .../main/kotlin/dokka-convention.gradle.kts | 2 +- .../dokkatoo/parentProject/build.gradle.kts | 2 +- .../childProjectA/build.gradle.kts | 4 +-- .../childProjectB/build.gradle.kts | 4 +-- .../dokka/build.gradle.kts | 4 +-- .../dokkatoo/build.gradle.kts | 6 ++--- modules/docs/build.gradle.kts | 2 +- .../build.gradle.kts | 8 +++--- .../it-android-0/dokkatoo/build.gradle.kts | 2 +- .../projects/it-basic/dokka/build.gradle.kts | 26 +++++++------------ .../it-basic/dokkatoo/build.gradle.kts | 14 +++++----- .../dokka/moduleA/moduleB/build.gradle.kts | 2 +- .../it-multiplatform-0/dokka/build.gradle.kts | 4 +-- modules/dokkatoo-plugin/build.gradle.kts | 10 +++---- settings.gradle.kts | 2 +- 29 files changed, 69 insertions(+), 76 deletions(-) diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index 832a98b9..81eb17ad 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -14,6 +14,6 @@ dependencies { java { toolchain { - languageVersion.set(JavaLanguageVersion.of(11)) + languageVersion = JavaLanguageVersion.of(11) } } diff --git a/buildSrc/settings.gradle.kts b/buildSrc/settings.gradle.kts index 855fe5d9..bc59e1ed 100644 --- a/buildSrc/settings.gradle.kts +++ b/buildSrc/settings.gradle.kts @@ -10,7 +10,7 @@ pluginManagement { @Suppress("UnstableApiUsage") dependencyResolutionManagement { - repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS) + repositoriesMode = RepositoriesMode.PREFER_SETTINGS repositories { mavenCentral() diff --git a/buildSrc/src/main/kotlin/buildsrc/conventions/base.gradle.kts b/buildSrc/src/main/kotlin/buildsrc/conventions/base.gradle.kts index 60bfa2fe..9cd1f01e 100644 --- a/buildSrc/src/main/kotlin/buildsrc/conventions/base.gradle.kts +++ b/buildSrc/src/main/kotlin/buildsrc/conventions/base.gradle.kts @@ -23,7 +23,7 @@ tasks.withType().configureEach { } tasks.withType().configureEach { - timeout.set(Duration.ofMinutes(60)) + timeout = Duration.ofMinutes(60) testLogging { showCauses = true diff --git a/buildSrc/src/main/kotlin/buildsrc/conventions/dokkatoo-example-projects.gradle.kts b/buildSrc/src/main/kotlin/buildsrc/conventions/dokkatoo-example-projects.gradle.kts index c6994a83..9d1af95f 100644 --- a/buildSrc/src/main/kotlin/buildsrc/conventions/dokkatoo-example-projects.gradle.kts +++ b/buildSrc/src/main/kotlin/buildsrc/conventions/dokkatoo-example-projects.gradle.kts @@ -64,7 +64,7 @@ fun createDokkatooExampleProjectsSettings( val destinationDir = it.parentFile val name = destinationDir.toRelativeString(projectDir.asFile).toAlphaNumericCamelCase() exampleProjects.register(name) { - this.exampleProjectDir.set(destinationDir) + this.exampleProjectDir = destinationDir } } diff --git a/buildSrc/src/main/kotlin/buildsrc/conventions/java-base.gradle.kts b/buildSrc/src/main/kotlin/buildsrc/conventions/java-base.gradle.kts index 203b80f2..590b32dc 100644 --- a/buildSrc/src/main/kotlin/buildsrc/conventions/java-base.gradle.kts +++ b/buildSrc/src/main/kotlin/buildsrc/conventions/java-base.gradle.kts @@ -13,7 +13,7 @@ plugins { extensions.getByType().apply { toolchain { - languageVersion.set(JavaLanguageVersion.of(11)) + languageVersion = JavaLanguageVersion.of(11) } withSourcesJar() } diff --git a/buildSrc/src/main/kotlin/buildsrc/conventions/kotlin-gradle-plugin.gradle.kts b/buildSrc/src/main/kotlin/buildsrc/conventions/kotlin-gradle-plugin.gradle.kts index 4174088a..ffa446d2 100644 --- a/buildSrc/src/main/kotlin/buildsrc/conventions/kotlin-gradle-plugin.gradle.kts +++ b/buildSrc/src/main/kotlin/buildsrc/conventions/kotlin-gradle-plugin.gradle.kts @@ -8,7 +8,7 @@ plugins { } tasks.validatePlugins { - enableStricterValidation.set(true) + enableStricterValidation = true } val createJavadocJarReadme by tasks.registering(Sync::class) { diff --git a/buildSrc/src/main/kotlin/buildsrc/conventions/maven-publishing.gradle.kts b/buildSrc/src/main/kotlin/buildsrc/conventions/maven-publishing.gradle.kts index 7af7b69f..89f9ca83 100644 --- a/buildSrc/src/main/kotlin/buildsrc/conventions/maven-publishing.gradle.kts +++ b/buildSrc/src/main/kotlin/buildsrc/conventions/maven-publishing.gradle.kts @@ -34,7 +34,7 @@ publishing { developers { developer { - email.set("adam@adamko.dev") + email = "adam@adamko.dev" } } } diff --git a/examples/build.gradle.kts b/examples/build.gradle.kts index da366c88..d98a7fee 100644 --- a/examples/build.gradle.kts +++ b/examples/build.gradle.kts @@ -44,5 +44,5 @@ configurations.exampleProjectsElements.configure { } dokkaSourceDownload { - dokkaVersion.set(libs.versions.kotlin.dokka) + dokkaVersion = libs.versions.kotlin.dokka } diff --git a/examples/custom-format-example/dokkatoo/build.gradle.kts b/examples/custom-format-example/dokkatoo/build.gradle.kts index 92cb6e04..2d2e4c26 100644 --- a/examples/custom-format-example/dokkatoo/build.gradle.kts +++ b/examples/custom-format-example/dokkatoo/build.gradle.kts @@ -4,7 +4,7 @@ plugins { } dokkatoo { - moduleName.set("customFormat-example") + moduleName = "customFormat-example" pluginsConfiguration.html { // Dokka's stylesheets and assets with conflicting names will be overridden. // In this particular case, logo-styles.css will be overridden @@ -13,6 +13,6 @@ dokkatoo { customAssets.from("ktor-logo.png") // Text used in the footer - footerMessage.set("(c) Custom Format Dokka example") + footerMessage = "(c) Custom Format Dokka example" } } diff --git a/examples/gradle-example/dokka/build.gradle.kts b/examples/gradle-example/dokka/build.gradle.kts index 5f54ad9d..d36530d4 100644 --- a/examples/gradle-example/dokka/build.gradle.kts +++ b/examples/gradle-example/dokka/build.gradle.kts @@ -18,7 +18,7 @@ tasks.withType().configureEach { dokkaSourceSets { named("main") { // used as project name in the header - moduleName.set("Dokka Gradle Example") + moduleName = "Dokka Gradle Example" // contains descriptions for the module and the packages includes.from("Module.md") @@ -26,11 +26,10 @@ tasks.withType().configureEach { // adds source links that lead to this repository, allowing readers // to easily find source code for inspected declarations sourceLink { - localDirectory.set(file("src/main/kotlin")) - remoteUrl.set(URL("https://github.com/Kotlin/dokka/tree/master/" + - "examples/gradle/dokka-gradle-example/src/main/kotlin" - )) - remoteLineSuffix.set("#L") + localDirectory = file("src/main/kotlin") + remoteUrl = URL("https://github.com/Kotlin/dokka/tree/master/" + + "examples/gradle/dokka-gradle-example/src/main/kotlin") + remoteLineSuffix = "#L" } } } diff --git a/examples/gradle-example/dokkatoo/build.gradle.kts b/examples/gradle-example/dokkatoo/build.gradle.kts index 57a41991..61e8ec9b 100644 --- a/examples/gradle-example/dokkatoo/build.gradle.kts +++ b/examples/gradle-example/dokkatoo/build.gradle.kts @@ -5,7 +5,7 @@ plugins { dokkatoo { // used as project name in the header - moduleName.set("Dokka Gradle Example") + moduleName = "Dokka Gradle Example" dokkatooSourceSets.main { @@ -15,9 +15,9 @@ dokkatoo { // adds source links that lead to this repository, allowing readers // to easily find source code for inspected declarations sourceLink { - localDirectory.set(file("src/main/kotlin")) + localDirectory = file("src/main/kotlin") remoteUrl("https://github.com/Kotlin/dokka/tree/master/examples/gradle/dokka-gradle-example/src/main/kotlin") - remoteLineSuffix.set("#L") + remoteLineSuffix = "#L" } } } diff --git a/examples/library-publishing-example/dokka/build.gradle.kts b/examples/library-publishing-example/dokka/build.gradle.kts index 731de85b..483a124c 100644 --- a/examples/library-publishing-example/dokka/build.gradle.kts +++ b/examples/library-publishing-example/dokka/build.gradle.kts @@ -16,13 +16,13 @@ dependencies { val dokkaJavadocJar by tasks.register("dokkaJavadocJar") { dependsOn(tasks.dokkaJavadoc) from(tasks.dokkaJavadoc.flatMap { it.outputDirectory }) - archiveClassifier.set("javadoc") + archiveClassifier = "javadoc" } val dokkaHtmlJar by tasks.register("dokkaHtmlJar") { dependsOn(tasks.dokkaHtml) from(tasks.dokkaHtml.flatMap { it.outputDirectory }) - archiveClassifier.set("html-doc") + archiveClassifier = "html-doc" } publishing { diff --git a/examples/multimodule-example/dokka/parentProject/build.gradle.kts b/examples/multimodule-example/dokka/parentProject/build.gradle.kts index 3563ecca..6d3f75e3 100644 --- a/examples/multimodule-example/dokka/parentProject/build.gradle.kts +++ b/examples/multimodule-example/dokka/parentProject/build.gradle.kts @@ -14,7 +14,7 @@ subprojects { tasks.withType().configureEach { dokkaSourceSets.configureEach { - documentedVisibilities.set(setOf( + documentedVisibilities = setOf( Visibility.PUBLIC, Visibility.PROTECTED )) @@ -23,9 +23,9 @@ subprojects { sourceLink { val exampleDir = "https://github.com/Kotlin/dokka/tree/master/examples/gradle/dokka-multimodule-example" - localDirectory.set(rootProject.projectDir) - remoteUrl.set(URL("$exampleDir")) - remoteLineSuffix.set("#L") + localDirectory = rootProject.projectDir + remoteUrl = URL("$exampleDir") + remoteLineSuffix = "#L" } } } @@ -34,5 +34,5 @@ subprojects { // Configures only the parent MultiModule task, // this will not affect subprojects tasks.dokkaHtmlMultiModule { - moduleName.set("Dokka MultiModule Example") + moduleName = "Dokka MultiModule Example" } diff --git a/examples/multimodule-example/dokkatoo/buildSrc/settings.gradle.kts b/examples/multimodule-example/dokkatoo/buildSrc/settings.gradle.kts index b7510ccf..1d8bcf76 100644 --- a/examples/multimodule-example/dokkatoo/buildSrc/settings.gradle.kts +++ b/examples/multimodule-example/dokkatoo/buildSrc/settings.gradle.kts @@ -11,7 +11,7 @@ pluginManagement { @Suppress("UnstableApiUsage") dependencyResolutionManagement { - repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS) + repositoriesMode = RepositoriesMode.PREFER_SETTINGS repositories { mavenCentral() diff --git a/examples/multimodule-example/dokkatoo/buildSrc/src/main/kotlin/dokka-convention.gradle.kts b/examples/multimodule-example/dokkatoo/buildSrc/src/main/kotlin/dokka-convention.gradle.kts index 227f9822..0ec0769c 100644 --- a/examples/multimodule-example/dokkatoo/buildSrc/src/main/kotlin/dokka-convention.gradle.kts +++ b/examples/multimodule-example/dokkatoo/buildSrc/src/main/kotlin/dokka-convention.gradle.kts @@ -11,7 +11,7 @@ dokkatoo { sourceLink { // Read docs for more details: https://kotlinlang.org/docs/dokka-gradle.html#source-link-configuration remoteUrl("https://github.com/Kotlin/dokka/tree/master/examples/gradle/dokka-multimodule-example") - localDirectory.set(rootDir) + localDirectory = rootDir } } } diff --git a/examples/multimodule-example/dokkatoo/parentProject/build.gradle.kts b/examples/multimodule-example/dokkatoo/parentProject/build.gradle.kts index 2a698a7b..1158182a 100644 --- a/examples/multimodule-example/dokkatoo/parentProject/build.gradle.kts +++ b/examples/multimodule-example/dokkatoo/parentProject/build.gradle.kts @@ -19,5 +19,5 @@ dependencies { } dokkatoo { - moduleName.set("Dokka MultiModule Example") + moduleName = "Dokka MultiModule Example" } diff --git a/examples/multimodule-example/dokkatoo/parentProject/childProjectA/build.gradle.kts b/examples/multimodule-example/dokkatoo/parentProject/childProjectA/build.gradle.kts index 4f77c976..99790494 100644 --- a/examples/multimodule-example/dokkatoo/parentProject/childProjectA/build.gradle.kts +++ b/examples/multimodule-example/dokkatoo/parentProject/childProjectA/build.gradle.kts @@ -11,11 +11,11 @@ dokkatoo { //region DON'T COPY - this is only needed for internal Dokkatoo integration tests dokkatoo { - modulePath.set("childProjectA") // match the original dokka default + modulePath = "childProjectA" // match the original dokka default } tasks.withType().configureEach { generator.dokkaSourceSets.configureEach { - sourceSetScope.set(":parentProject:childProjectA:dokkaHtmlPartial") + sourceSetScope = ":parentProject:childProjectA:dokkaHtmlPartial" } } //endregion diff --git a/examples/multimodule-example/dokkatoo/parentProject/childProjectB/build.gradle.kts b/examples/multimodule-example/dokkatoo/parentProject/childProjectB/build.gradle.kts index 7fb1871b..88fe7a4d 100644 --- a/examples/multimodule-example/dokkatoo/parentProject/childProjectB/build.gradle.kts +++ b/examples/multimodule-example/dokkatoo/parentProject/childProjectB/build.gradle.kts @@ -11,11 +11,11 @@ dokkatoo { //region DON'T COPY - this is only needed for internal Dokkatoo integration tests dokkatoo { - modulePath.set("childProjectB") // match the original dokka default + modulePath = "childProjectB" // match the original dokka default } tasks.withType().configureEach { generator.dokkaSourceSets.configureEach { - sourceSetScope.set(":parentProject:childProjectB:dokkaHtmlPartial") + sourceSetScope = ":parentProject:childProjectB:dokkaHtmlPartial" } } //endregion diff --git a/examples/multiplatform-example/dokka/build.gradle.kts b/examples/multiplatform-example/dokka/build.gradle.kts index 7c5f11cf..928e048b 100644 --- a/examples/multiplatform-example/dokka/build.gradle.kts +++ b/examples/multiplatform-example/dokka/build.gradle.kts @@ -34,8 +34,8 @@ tasks.withType().configureEach { dokkaSourceSets { // Create a custom source set not known to the Kotlin Gradle Plugin register("customSourceSet") { - this.jdkVersion.set(9) - this.displayName.set("custom") + this.jdkVersion = 9 + this.displayName = "custom" this.sourceRoots.from(file("src/customJdk9/kotlin")) } } diff --git a/examples/multiplatform-example/dokkatoo/build.gradle.kts b/examples/multiplatform-example/dokkatoo/build.gradle.kts index d93cac61..612c4d05 100644 --- a/examples/multiplatform-example/dokkatoo/build.gradle.kts +++ b/examples/multiplatform-example/dokkatoo/build.gradle.kts @@ -25,8 +25,8 @@ kotlin { dokkatoo { // Create a custom source set not known to the Kotlin Gradle Plugin dokkatooSourceSets.register("customSourceSet") { - jdkVersion.set(9) - displayName.set("custom") + jdkVersion = 9 + displayName = "custom" sourceRoots.from("src/customJdk9/kotlin") } } @@ -34,6 +34,6 @@ dokkatoo { //region DON'T COPY - this is only needed for internal Dokkatoo integration tests dokkatoo { - sourceSetScopeDefault.set(":dokkaHtml") + sourceSetScopeDefault = ":dokkaHtml" } //endregion diff --git a/modules/docs/build.gradle.kts b/modules/docs/build.gradle.kts index a27b177c..5ed799a2 100644 --- a/modules/docs/build.gradle.kts +++ b/modules/docs/build.gradle.kts @@ -12,7 +12,7 @@ dependencies { } dokkatoo { - moduleName.set("Dokkatoo Gradle Plugin") + moduleName = "Dokkatoo Gradle Plugin" pluginsConfiguration.named("html") { customStyleSheets.from( diff --git a/modules/dokkatoo-plugin-integration-tests/build.gradle.kts b/modules/dokkatoo-plugin-integration-tests/build.gradle.kts index c1c9dadf..223b2ec3 100644 --- a/modules/dokkatoo-plugin-integration-tests/build.gradle.kts +++ b/modules/dokkatoo-plugin-integration-tests/build.gradle.kts @@ -69,10 +69,10 @@ testing.suites { targets.configureEach { testTask.configure { - javaLauncher.set(javaToolchains.launcherFor { + javaLauncher = javaToolchains.launcherFor { // Android test project requires Java 17 - languageVersion.set(JavaLanguageVersion.of(17)) - }) + languageVersion = JavaLanguageVersion.of(17) + } val projectTestTempDirPath = "$buildDir_/test-temp-dir" inputs.property("projectTestTempDir", projectTestTempDirPath) @@ -264,7 +264,7 @@ tasks.withType().configureEach { } dokkaSourceDownload { - dokkaVersion.set(libs.versions.kotlin.dokka) + dokkaVersion = libs.versions.kotlin.dokka } tasks.updateAndroidLocalProperties { diff --git a/modules/dokkatoo-plugin-integration-tests/projects/it-android-0/dokkatoo/build.gradle.kts b/modules/dokkatoo-plugin-integration-tests/projects/it-android-0/dokkatoo/build.gradle.kts index e70e7335..7ea53c2b 100644 --- a/modules/dokkatoo-plugin-integration-tests/projects/it-android-0/dokkatoo/build.gradle.kts +++ b/modules/dokkatoo-plugin-integration-tests/projects/it-android-0/dokkatoo/build.gradle.kts @@ -27,6 +27,6 @@ tasks.withType().configureEach { // sourceSetScope renaming is fine, I'm not worried about it. The default comes from the // Gradle Task name, so a name difference doesn't matter. // We can just manually force the Dokkatoo name to match Dokka. - sourceSetScope.set(":dokkaHtml") + sourceSetScope = ":dokkaHtml" } } diff --git a/modules/dokkatoo-plugin-integration-tests/projects/it-basic/dokka/build.gradle.kts b/modules/dokkatoo-plugin-integration-tests/projects/it-basic/dokka/build.gradle.kts index e81e35fd..2aceb16d 100644 --- a/modules/dokkatoo-plugin-integration-tests/projects/it-basic/dokka/build.gradle.kts +++ b/modules/dokkatoo-plugin-integration-tests/projects/it-basic/dokka/build.gradle.kts @@ -25,31 +25,25 @@ dependencies { } tasks.withType { - moduleName.set("Basic Project") + moduleName = "Basic Project" dokkaSourceSets { configureEach { - documentedVisibilities.set( - setOf(DokkaConfiguration.Visibility.PUBLIC, DokkaConfiguration.Visibility.PROTECTED) - ) + documentedVisibilities = setOf(DokkaConfiguration.Visibility.PUBLIC, DokkaConfiguration.Visibility.PROTECTED) suppressedFiles.from(file("src/main/kotlin/it/suppressedByPath")) perPackageOption { - matchingRegex.set("it.suppressedByPackage.*") - suppress.set(true) + matchingRegex = "it.suppressedByPackage.*" + suppress = true } perPackageOption { - matchingRegex.set("it.overriddenVisibility.*") - documentedVisibilities.set( - setOf(DokkaConfiguration.Visibility.PRIVATE) - ) + matchingRegex = "it.overriddenVisibility.*") + documentedVisibilities = setOf(DokkaConfiguration.Visibility.PRIVATE) } sourceLink { - localDirectory.set(file("src/main")) - remoteUrl.set( - URL( + localDirectory = file("src/main") + remoteUrl = URL( "https://github.com/Kotlin/dokka/tree/master/" + "integration-tests/gradle/projects/it-basic/src/main" ) - ) } } @@ -57,7 +51,7 @@ tasks.withType { kotlinSourceSet(kotlin.sourceSets["test"]) } } - suppressObviousFunctions.set(false) + suppressObviousFunctions = false - pluginsMapConfiguration.set(mapOf(DokkaBase::class.qualifiedName to """{ "customStyleSheets": ["${file("../customResources/logo-styles.css").invariantSeparatorsPath}", "${file("../customResources/custom-style-to-add.css").invariantSeparatorsPath}"], "customAssets" : ["${file("../customResources/custom-resource.svg").invariantSeparatorsPath}"] }""")) + pluginsMapConfiguration = mapOf(DokkaBase::class.qualifiedName to """{ "customStyleSheets": ["${file("../customResources/logo-styles.css").invariantSeparatorsPath}", "${file("../customResources/custom-style-to-add.css").invariantSeparatorsPath}"], "customAssets" : ["${file("../customResources/custom-resource.svg").invariantSeparatorsPath}"] }""") } diff --git a/modules/dokkatoo-plugin-integration-tests/projects/it-basic/dokkatoo/build.gradle.kts b/modules/dokkatoo-plugin-integration-tests/projects/it-basic/dokkatoo/build.gradle.kts index 2653c753..820d899b 100644 --- a/modules/dokkatoo-plugin-integration-tests/projects/it-basic/dokkatoo/build.gradle.kts +++ b/modules/dokkatoo-plugin-integration-tests/projects/it-basic/dokkatoo/build.gradle.kts @@ -17,7 +17,7 @@ kotlin { } dokkatoo { - moduleName.set("Basic Project") + moduleName = "Basic Project" dokkatooSourceSets.configureEach { documentedVisibilities( VisibilityModifier.PUBLIC, @@ -25,17 +25,17 @@ dokkatoo { ) suppressedFiles.from(file("src/main/kotlin/it/suppressedByPath")) perPackageOption { - matchingRegex.set("it.suppressedByPackage.*") - suppress.set(true) + matchingRegex = "it.suppressedByPackage.*" + suppress = true } perPackageOption { - matchingRegex.set("it.overriddenVisibility.*") + matchingRegex = "it.overriddenVisibility.*" documentedVisibilities( VisibilityModifier.PRIVATE, ) } sourceLink { - localDirectory.set(file("src/main")) + localDirectory = file("src/main") remoteUrl( "https://github.com/Kotlin/dokka/tree/master/integration-tests/gradle/projects/it-basic/src/main" ) @@ -53,12 +53,12 @@ dokkatoo { } dokkatooPublications.configureEach { - suppressObviousFunctions.set(false) + suppressObviousFunctions = false } } tasks.withType().configureEach { generator.dokkaSourceSets.configureEach { - sourceSetScope.set(":dokkaHtml") + sourceSetScope = ":dokkaHtml" } } diff --git a/modules/dokkatoo-plugin-integration-tests/projects/it-multimodule-0/dokka/moduleA/moduleB/build.gradle.kts b/modules/dokkatoo-plugin-integration-tests/projects/it-multimodule-0/dokka/moduleA/moduleB/build.gradle.kts index 1981701f..d00f83d7 100644 --- a/modules/dokkatoo-plugin-integration-tests/projects/it-multimodule-0/dokka/moduleA/moduleB/build.gradle.kts +++ b/modules/dokkatoo-plugin-integration-tests/projects/it-multimodule-0/dokka/moduleA/moduleB/build.gradle.kts @@ -6,7 +6,7 @@ plugins { } tasks.withType().configureEach { - moduleName.set("!Module B!") + moduleName = "!Module B!" dokkaSourceSets.configureEach { includes.from("Module.md") } diff --git a/modules/dokkatoo-plugin-integration-tests/projects/it-multiplatform-0/dokka/build.gradle.kts b/modules/dokkatoo-plugin-integration-tests/projects/it-multiplatform-0/dokka/build.gradle.kts index d7d47bd5..f77bb7ee 100644 --- a/modules/dokkatoo-plugin-integration-tests/projects/it-multiplatform-0/dokka/build.gradle.kts +++ b/modules/dokkatoo-plugin-integration-tests/projects/it-multiplatform-0/dokka/build.gradle.kts @@ -40,8 +40,8 @@ tasks.withType().configureEach { dokkaSourceSets { configureEach { externalDocumentationLink { - url.set(URL("https://kotlinlang.org/api/kotlinx.coroutines/")) - //packageListUrl.set(URL("https://kotlinlang.org/api/kotlinx.coroutines/package-list")) + url = URL("https://kotlinlang.org/api/kotlinx.coroutines/") + //packageListUrl = URL("https://kotlinlang.org/api/kotlinx.coroutines/package-list") } } } diff --git a/modules/dokkatoo-plugin/build.gradle.kts b/modules/dokkatoo-plugin/build.gradle.kts index 277c1e5f..31b41277 100644 --- a/modules/dokkatoo-plugin/build.gradle.kts +++ b/modules/dokkatoo-plugin/build.gradle.kts @@ -80,8 +80,8 @@ gradlePlugin { registerDokkaPlugin("DokkatooJekyllPlugin", "Jekyll") plugins.configureEach { - website.set("https://github.com/adamko-dev/dokkatoo/") - vcsUrl.set("https://github.com/adamko-dev/dokkatoo.git") + website = "https://github.com/adamko-dev/dokkatoo/" + vcsUrl = "https://github.com/adamko-dev/dokkatoo.git" tags.addAll( "dokka", "dokkatoo", @@ -157,7 +157,7 @@ testing.suites { /** Functional tests suite */ val testFunctional by registering(JvmTestSuite::class) { description = "Tests that use Gradle TestKit to test functionality" - testType.set(TestSuiteType.FUNCTIONAL_TEST) + testType = TestSuiteType.FUNCTIONAL_TEST targets.all { testTask.configure { @@ -173,7 +173,7 @@ skipTestFixturesPublications() val aggregateTestReports by tasks.registering(TestReport::class) { group = LifecycleBasePlugin.VERIFICATION_GROUP - destinationDirectory.set(layout.buildDirectory.dir("reports/tests/aggregated")) + destinationDirectory = layout.buildDirectory.dir("reports/tests/aggregated") dependsOn(tasks.withType()) @@ -244,7 +244,7 @@ dokkatoo { url("https://docs.gradle.org/${gradle.gradleVersion}/javadoc/") } sourceLink { - localDirectory.set(file("src/main/kotlin")) + localDirectory = file("src/main/kotlin") val relativeProjectPath = projectDir.relativeToOrNull(rootDir)?.invariantSeparatorsPath ?: "" remoteUrl("https://github.com/adamko-dev/dokkatoo/tree/main/$relativeProjectPath/src/main/kotlin") } diff --git a/settings.gradle.kts b/settings.gradle.kts index 497f3e34..889ea87f 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -10,7 +10,7 @@ pluginManagement { @Suppress("UnstableApiUsage") dependencyResolutionManagement { - repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS) + repositoriesMode = RepositoriesMode.PREFER_SETTINGS repositories { mavenCentral()