diff options
Diffstat (limited to 'runners')
3 files changed, 9 insertions, 3 deletions
diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinClasspathUtils.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinClasspathUtils.kt index 2770153d..1d0fa4a3 100644 --- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinClasspathUtils.kt +++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/kotlin/kotlinClasspathUtils.kt @@ -25,6 +25,7 @@ internal fun Project.classpathOf(sourceSet: KotlinSourceSet): FileCollection { private fun Project.compileClasspathOf(compilation: KotlinCompilation): FileCollection { if (compilation.target.isAndroidTarget()) { // This is a workaround for https://youtrack.jetbrains.com/issue/KT-33893 + @Suppress("DEPRECATION") // for compatibility return compilation.compileKotlinTask.cast<KotlinCompile>().classpath } @@ -34,5 +35,6 @@ private fun Project.compileClasspathOf(compilation: KotlinCompilation): FileColl ?: files() return compilation.compileDependencyFiles + platformDependencyFiles + + @Suppress("DEPRECATION") // for compatibility (compilation.compileKotlinTask.run { this as? KotlinCompile }?.classpath ?: files()) } diff --git a/runners/maven-plugin/build.gradle.kts b/runners/maven-plugin/build.gradle.kts index 7b3bc649..d62b82dd 100644 --- a/runners/maven-plugin/build.gradle.kts +++ b/runners/maven-plugin/build.gradle.kts @@ -13,9 +13,12 @@ dependencies { implementation(kotlin("stdlib-jdk8")) } +val mavenBuildDir = setupMaven.mavenBuildDir +val mavenBinDir = setupMaven.mavenBinDir + tasks.named<Delete>("clean") { - delete(setupMaven.mavenBuildDir) - delete(setupMaven.mavenBinDir) + delete(mavenBuildDir) + delete(mavenBinDir) } /** diff --git a/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt b/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt index 94eacdb5..64cf8ee2 100644 --- a/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt +++ b/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt @@ -17,6 +17,7 @@ import org.apache.maven.project.MavenProjectHelper import org.apache.maven.repository.RepositorySystem import org.codehaus.plexus.archiver.Archiver import org.codehaus.plexus.archiver.jar.JarArchiver +import org.codehaus.plexus.archiver.util.DefaultFileSet import org.codehaus.plexus.util.xml.Xpp3Dom import org.jetbrains.dokka.* import org.jetbrains.dokka.DokkaConfiguration.ExternalDocumentationLink @@ -404,7 +405,7 @@ class DokkaJavadocJarMojo : AbstractDokkaMojo(listOf(javadocDependency)) { val archiver = MavenArchiver() archiver.archiver = jarArchiver archiver.setOutputFile(javadocJar) - archiver.archiver.addDirectory(File(outputDir), arrayOf("**/**"), arrayOf()) + archiver.archiver.addFileSet(DefaultFileSet().apply { directory = File(outputDir) }) archive.isAddMavenDescriptor = false archiver.createArchive(session, mavenProject, archive) |