Moved deploy configuration to afterEvaluate
This commit is contained in:
parent
cd9bf6adc2
commit
404bcfd28a
@ -8,7 +8,7 @@ plugins {
|
||||
}
|
||||
|
||||
group = "scientifik"
|
||||
version = "0.1.0"
|
||||
version = "0.1.1"
|
||||
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
|
@ -38,11 +38,14 @@ open class ScientifikPublishPlugin : Plugin<Project> {
|
||||
project.plugins.apply("maven-publish")
|
||||
val extension = project.extensions.create<ScientifikExtension>("scientifik")
|
||||
|
||||
project.afterEvaluate {
|
||||
|
||||
val bintrayRepo = project.bintrayRepo
|
||||
val vcs = project.vcs
|
||||
|
||||
if (bintrayRepo == null || vcs == null) {
|
||||
project.logger.warn("[${project.name}] Missing deployment configuration. Skipping publish.")
|
||||
return@afterEvaluate
|
||||
}
|
||||
|
||||
project.configure<PublishingExtension> {
|
||||
@ -85,7 +88,7 @@ open class ScientifikPublishPlugin : Plugin<Project> {
|
||||
if (extension.kdoc) {
|
||||
project.plugins.apply("org.jetbrains.dokka")
|
||||
|
||||
project.afterEvaluate {
|
||||
|
||||
extensions.findByType<KotlinMultiplatformExtension>()?.apply {
|
||||
val dokka by tasks.getting(DokkaTask::class) {
|
||||
outputFormat = "html"
|
||||
@ -165,7 +168,7 @@ open class ScientifikPublishPlugin : Plugin<Project> {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
project.plugins.apply("com.jfrog.bintray")
|
||||
@ -193,9 +196,9 @@ open class ScientifikPublishPlugin : Plugin<Project> {
|
||||
}
|
||||
|
||||
//workaround bintray bug
|
||||
project.afterEvaluate {
|
||||
|
||||
setPublications(*project.extensions.findByType<PublishingExtension>()!!.publications.names.toTypedArray())
|
||||
}
|
||||
|
||||
|
||||
// project.tasks.figetByPath("bintrayUpload") {
|
||||
// dependsOn(publishToMavenLocal)
|
||||
@ -231,3 +234,4 @@ open class ScientifikPublishPlugin : Plugin<Project> {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user