All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ru.astrainteractive.gradleplugin.StubJavaDocPlugin.kt Maven / Gradle / Ivy

There is a newer version: 1.4.0
Show newest version
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())
            }
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy