diff --git a/build.gradle.kts b/build.gradle.kts index cee3a27..6195eaf 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -8,7 +8,7 @@ plugins { } group = "scientifik" -version = "0.1.1" +version = "0.1.2" repositories { gradlePluginPortal() diff --git a/src/main/kotlin/scientifik/ScientifikPublishPlugin.kt b/src/main/kotlin/scientifik/ScientifikPublishPlugin.kt index 5e836d4..d2097d3 100644 --- a/src/main/kotlin/scientifik/ScientifikPublishPlugin.kt +++ b/src/main/kotlin/scientifik/ScientifikPublishPlugin.kt @@ -38,6 +38,10 @@ open class ScientifikPublishPlugin : Plugin { project.plugins.apply("maven-publish") val extension = project.extensions.create("scientifik") + if (extension.kdoc) { + project.plugins.apply("org.jetbrains.dokka") + } + project.afterEvaluate { val bintrayRepo = project.bintrayRepo @@ -48,6 +52,9 @@ open class ScientifikPublishPlugin : Plugin { return@afterEvaluate } + project.plugins.apply("com.jfrog.bintray") + project.plugins.apply("com.jfrog.artifactory") + project.configure { repositories { maven("https://bintray.com/mipt-npm/$bintrayRepo") @@ -86,8 +93,6 @@ open class ScientifikPublishPlugin : Plugin { } if (extension.kdoc) { - project.plugins.apply("org.jetbrains.dokka") - extensions.findByType()?.apply { val dokka by tasks.getting(DokkaTask::class) { @@ -171,8 +176,6 @@ open class ScientifikPublishPlugin : Plugin { } - project.plugins.apply("com.jfrog.bintray") - project.configure { user = project.findProperty("bintrayUser") as? String ?: System.getenv("BINTRAY_USER") key = project.findProperty("bintrayApiKey") as? String? ?: System.getenv("BINTRAY_API_KEY") @@ -205,8 +208,6 @@ open class ScientifikPublishPlugin : Plugin { // } } - project.plugins.apply("com.jfrog.artifactory") - project.configure { val artifactoryUser: String? by project val artifactoryPassword: String? by project