Fixed module deploy

This commit is contained in:
Alexander Nozik 2019-07-07 18:06:24 +03:00
parent 404bcfd28a
commit 52e01dceac
2 changed files with 8 additions and 7 deletions

View File

@ -8,7 +8,7 @@ plugins {
} }
group = "scientifik" group = "scientifik"
version = "0.1.1" version = "0.1.2"
repositories { repositories {
gradlePluginPortal() gradlePluginPortal()

View File

@ -38,6 +38,10 @@ open class ScientifikPublishPlugin : Plugin<Project> {
project.plugins.apply("maven-publish") project.plugins.apply("maven-publish")
val extension = project.extensions.create<ScientifikExtension>("scientifik") val extension = project.extensions.create<ScientifikExtension>("scientifik")
if (extension.kdoc) {
project.plugins.apply("org.jetbrains.dokka")
}
project.afterEvaluate { project.afterEvaluate {
val bintrayRepo = project.bintrayRepo val bintrayRepo = project.bintrayRepo
@ -48,6 +52,9 @@ open class ScientifikPublishPlugin : Plugin<Project> {
return@afterEvaluate return@afterEvaluate
} }
project.plugins.apply("com.jfrog.bintray")
project.plugins.apply("com.jfrog.artifactory")
project.configure<PublishingExtension> { project.configure<PublishingExtension> {
repositories { repositories {
maven("https://bintray.com/mipt-npm/$bintrayRepo") maven("https://bintray.com/mipt-npm/$bintrayRepo")
@ -86,8 +93,6 @@ open class ScientifikPublishPlugin : Plugin<Project> {
} }
if (extension.kdoc) { if (extension.kdoc) {
project.plugins.apply("org.jetbrains.dokka")
extensions.findByType<KotlinMultiplatformExtension>()?.apply { extensions.findByType<KotlinMultiplatformExtension>()?.apply {
val dokka by tasks.getting(DokkaTask::class) { val dokka by tasks.getting(DokkaTask::class) {
@ -171,8 +176,6 @@ open class ScientifikPublishPlugin : Plugin<Project> {
} }
project.plugins.apply("com.jfrog.bintray")
project.configure<BintrayExtension> { project.configure<BintrayExtension> {
user = project.findProperty("bintrayUser") as? String ?: System.getenv("BINTRAY_USER") user = project.findProperty("bintrayUser") as? String ?: System.getenv("BINTRAY_USER")
key = project.findProperty("bintrayApiKey") as? String? ?: System.getenv("BINTRAY_API_KEY") key = project.findProperty("bintrayApiKey") as? String? ?: System.getenv("BINTRAY_API_KEY")
@ -205,8 +208,6 @@ open class ScientifikPublishPlugin : Plugin<Project> {
// } // }
} }
project.plugins.apply("com.jfrog.artifactory")
project.configure<ArtifactoryPluginConvention> { project.configure<ArtifactoryPluginConvention> {
val artifactoryUser: String? by project val artifactoryUser: String? by project
val artifactoryPassword: String? by project val artifactoryPassword: String? by project