diff --git a/build.gradle.kts b/build.gradle.kts index d49f099..20b5880 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -6,7 +6,7 @@ plugins { } group = "ru.mipt.npm" -version = "0.6.3-dev-1.4.20-M2" +version = "0.6.4-dev-1.4.20-M2" repositories { gradlePluginPortal() diff --git a/src/main/kotlin/ru/mipt/npm/gradle/KScienceJVMPlugin.kt b/src/main/kotlin/ru/mipt/npm/gradle/KScienceJVMPlugin.kt index f3a6d1b..6367268 100644 --- a/src/main/kotlin/ru/mipt/npm/gradle/KScienceJVMPlugin.kt +++ b/src/main/kotlin/ru/mipt/npm/gradle/KScienceJVMPlugin.kt @@ -3,11 +3,11 @@ package ru.mipt.npm.gradle import org.gradle.api.Plugin import org.gradle.api.Project import org.gradle.api.plugins.JavaPluginExtension -import org.gradle.api.publish.PublishingExtension -import org.gradle.api.publish.maven.MavenPublication -import org.gradle.api.tasks.bundling.Jar import org.gradle.api.tasks.testing.Test -import org.gradle.kotlin.dsl.* +import org.gradle.kotlin.dsl.configure +import org.gradle.kotlin.dsl.findByType +import org.gradle.kotlin.dsl.get +import org.gradle.kotlin.dsl.withType import org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension import org.jetbrains.kotlin.gradle.tasks.KotlinCompile @@ -20,6 +20,8 @@ open class KScienceJVMPlugin : Plugin { extensions.findByType()?.apply { targetCompatibility = KScienceVersions.JVM_TARGET + withSourcesJar() + //withJavadocJar() } tasks.withType { @@ -42,35 +44,6 @@ open class KScienceJVMPlugin : Plugin { implementation("org.junit.jupiter:junit-jupiter:5.6.1") } } - - val sourcesJar by tasks.registering(Jar::class) { - archiveClassifier.set("sources") - from(sourceSet.kotlin.srcDirs.first()) - } - - pluginManager.withPlugin("maven-publish") { - - configure { - publications { - register("jvm", MavenPublication::class) { - from(components["java"]) - artifact(sourcesJar.get()) - } - } - } - -// pluginManager.withPlugin("org.jetbrains.dokka") { -// logger.info("Adding dokka functionality to project ${project.name}") - -// val dokkaHtml by tasks.getting(DokkaTask::class){ -// dokkaSourceSets { -// configureEach { -// jdkVersion.set(11) -// } -// } -// } -// } - } } tasks.apply {