diff --git a/build.gradle.kts b/build.gradle.kts index 7986ce1..7e29485 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,4 +1,9 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. +import org.jetbrains.dokka.gradle.DokkaMultiModuleTask + +plugins { + id("org.jetbrains.dokka") +} buildscript { repositories { @@ -18,3 +23,8 @@ allprojects { mavenCentral() } } + +tasks.withType(DokkaMultiModuleTask::class.java) { + outputDirectory.set(rootProject.file("dokka-docs")) + failOnWarning.set(false) +} diff --git a/buildSrc/src/main/java/io/wax911/emoji/buildSrc/plugin/components/AndroidConfiguration.kt b/buildSrc/src/main/java/io/wax911/emoji/buildSrc/plugin/components/AndroidConfiguration.kt index 02402fa..c8c3637 100644 --- a/buildSrc/src/main/java/io/wax911/emoji/buildSrc/plugin/components/AndroidConfiguration.kt +++ b/buildSrc/src/main/java/io/wax911/emoji/buildSrc/plugin/components/AndroidConfiguration.kt @@ -19,7 +19,7 @@ internal fun Project.configureSpotless() { spotlessExtension().run { kotlin { target("**/kotlin/**/*.kt") - targetExclude("${layout.buildDirectory}/**/*.kt", "**/test/**/*.kt", "bin/**/*.kt") + targetExclude("${layout.buildDirectory.get()}/**/*.kt", "**/test/**/*.kt", "bin/**/*.kt") ktlint(libs.versions.ktlint.get()) licenseHeaderFile(rootProject.file("spotless/copyright.kt")) } diff --git a/buildSrc/src/main/java/io/wax911/emoji/buildSrc/plugin/components/AndroidOptions.kt b/buildSrc/src/main/java/io/wax911/emoji/buildSrc/plugin/components/AndroidOptions.kt index 27ac558..28a17bc 100644 --- a/buildSrc/src/main/java/io/wax911/emoji/buildSrc/plugin/components/AndroidOptions.kt +++ b/buildSrc/src/main/java/io/wax911/emoji/buildSrc/plugin/components/AndroidOptions.kt @@ -42,7 +42,7 @@ private fun Project.createMavenPublicationUsing(sourcesJar: Jar) { version = props[PropertyTypes.VERSION] artifact(sourcesJar) - artifact("${project.layout.buildDirectory}/outputs/aar/${project.name}-release.aar") + artifact("${project.layout.buildDirectory.get()}/outputs/aar/${project.name}-release.aar") from(component) pom { @@ -181,7 +181,6 @@ private fun Project.createDokkaTaskProvider() = tasks.named("dokkaHtm } } - internal fun Project.configureOptions() { if (isLibraryModule()) { println("Applying additional tasks options for dokka and javadoc on ${project.path}") @@ -194,7 +193,7 @@ internal fun Project.configureOptions() { } val classesJar by tasks.register("classesJar", Jar::class.java) { - from("${project.layout.buildDirectory}/intermediates/classes/release") + from("${project.layout.buildDirectory.get()}/intermediates/classes/release") } artifacts {