Dev #5

Merged
altavir merged 24 commits from dev into master 2020-12-28 09:44:15 +03:00
2 changed files with 7 additions and 34 deletions
Showing only changes of commit 152578aaf7 - Show all commits

View File

@ -6,7 +6,7 @@ plugins {
} }
group = "ru.mipt.npm" group = "ru.mipt.npm"
version = "0.6.3-dev-1.4.20-M2" version = "0.6.4-dev-1.4.20-M2"
repositories { repositories {
gradlePluginPortal() gradlePluginPortal()

View File

@ -3,11 +3,11 @@ package ru.mipt.npm.gradle
import org.gradle.api.Plugin import org.gradle.api.Plugin
import org.gradle.api.Project import org.gradle.api.Project
import org.gradle.api.plugins.JavaPluginExtension 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.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.dsl.KotlinJvmProjectExtension
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
@ -20,6 +20,8 @@ open class KScienceJVMPlugin : Plugin<Project> {
extensions.findByType<JavaPluginExtension>()?.apply { extensions.findByType<JavaPluginExtension>()?.apply {
targetCompatibility = KScienceVersions.JVM_TARGET targetCompatibility = KScienceVersions.JVM_TARGET
withSourcesJar()
//withJavadocJar()
} }
tasks.withType<KotlinCompile> { tasks.withType<KotlinCompile> {
@ -42,35 +44,6 @@ open class KScienceJVMPlugin : Plugin<Project> {
implementation("org.junit.jupiter:junit-jupiter:5.6.1") 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<PublishingExtension> {
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 { tasks.apply {