ru.astrainteractive.gradleplugin.StubJavaDocPlugin.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of convention Show documentation
Show all versions of convention Show documentation
GradlePlugin for my kotlin projects
package ru.astrainteractive.gradleplugin
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.publish.PublishingExtension
import org.gradle.api.publish.maven.MavenPublication
import org.gradle.jvm.tasks.Jar
import org.gradle.kotlin.dsl.configure
import org.gradle.kotlin.dsl.register
import org.gradle.kotlin.dsl.withType
/**
* @author https://github.com/icerockdev/moko-gradle-plugin
*/
class StubJavaDocPlugin : Plugin {
override fun apply(target: Project) {
with(target.plugins) {
apply("org.gradle.maven-publish")
}
val javadocJar = target.tasks.register("javadocJar", Jar::class) {
archiveClassifier.set("javadoc")
}
target.configure {
publications.withType {
artifact(javadocJar.get())
}
}
}
}