Use file signing

This commit is contained in:
Alexander Nozik 2021-02-19 21:25:05 +03:00
parent 371a38f9c3
commit d8dc65da79
2 changed files with 13 additions and 4 deletions

View File

@ -16,9 +16,11 @@ description = "Build tools for DataForge and kscience projects"
repositories {
gradlePluginPortal()
jcenter()
maven("https://repo.kotlin.link")
maven("https://kotlin.bintray.com/kotlinx")
maven("https://dl.bintray.com/kotlin/kotlin-eap")
maven("https://dl.bintray.com/kotlin/kotlin-dev")
}
val kotlinVersion = "1.4.30"
@ -33,7 +35,7 @@ dependencies {
implementation("org.jetbrains.kotlin:kotlin-serialization:$kotlinVersion")
implementation("org.jetbrains.kotlinx:atomicfu-gradle-plugin:0.15.1")
implementation("org.jetbrains.dokka:dokka-gradle-plugin:1.4.20")
implementation("org.jetbrains.dokka:dokka-base:1.4.20")
// implementation("org.jetbrains.dokka:dokka-base:1.4.20")
implementation("org.jetbrains.intellij.plugins:gradle-changelog-plugin:1.0.0")
implementation("org.jetbrains.kotlinx:binary-compatibility-validator:0.4.0")
}
@ -195,7 +197,7 @@ publishing {
}
}
signing {
useGpgCmd()
//useGpgCmd()
sign(publications)
}
}

View File

@ -14,7 +14,7 @@ import org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension
open class KSciencePublishPlugin : Plugin<Project> {
override fun apply(project: Project): Unit = project.plugins.withId("ru.mipt.npm.kscience") {
project.run {
project.afterEvaluate {
if (plugins.findPlugin("maven-publish") == null) {
plugins.apply("maven-publish")
}
@ -29,6 +29,7 @@ open class KSciencePublishPlugin : Plugin<Project> {
// return
// }
project.configure<PublishingExtension> {
plugins.withId("org.jetbrains.kotlin.js") {
val kotlin = extensions.findByType<KotlinJsProjectExtension>()!!
@ -62,9 +63,15 @@ open class KSciencePublishPlugin : Plugin<Project> {
}
}
val dokkaJar: Jar by tasks.creating(Jar::class) {
group = "documentation"
archiveClassifier.set("javadoc")
from(tasks.findByName("dokkaHtml"))
}
// Process each publication we have in this project
publications.withType<MavenPublication>().forEach { publication ->
publication.artifact(dokkaJar)
publication.pom {
name.set(project.name)
description.set(project.description)
@ -177,7 +184,7 @@ open class KSciencePublishPlugin : Plugin<Project> {
}
extensions.findByType<SigningExtension>()?.apply {
useGpgCmd()
//useGpgCmd()
sign(publications)
}