From 06f683ea5d41a17298cfef908568612ccd2a7fc4 Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Fri, 4 Oct 2019 18:38:15 +0300 Subject: [PATCH] Removed artifactory mentions --- build.gradle.kts | 3 +- .../scientifik/ScientifikPublishPlugin.kt | 34 +------------------ 2 files changed, 2 insertions(+), 35 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 4aa76be..7ceb58b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -24,7 +24,6 @@ dependencies { implementation("org.jetbrains.kotlin:kotlin-serialization:$kotlinVersion") implementation("org.jetbrains.kotlinx:kotlinx-metadata-jvm:0.1.0") implementation("org.jetbrains.kotlinx:atomicfu-gradle-plugin:0.12.10") - implementation("org.jfrog.buildinfo:build-info-extractor-gradle:4.9.7") implementation("com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4") implementation("org.jetbrains.dokka:dokka-gradle-plugin:0.9.18") } @@ -33,7 +32,7 @@ gradlePlugin { plugins { create("scientifik-publish") { id = "scientifik.publish" - description = "The publication plugin for bintray and artifactory" + description = "The publication plugin for bintray and bitbucket" implementationClass = "scientifik.ScientifikPublishPlugin" } diff --git a/src/main/kotlin/scientifik/ScientifikPublishPlugin.kt b/src/main/kotlin/scientifik/ScientifikPublishPlugin.kt index cd42149..6316b41 100644 --- a/src/main/kotlin/scientifik/ScientifikPublishPlugin.kt +++ b/src/main/kotlin/scientifik/ScientifikPublishPlugin.kt @@ -2,7 +2,6 @@ package scientifik import com.jfrog.bintray.gradle.BintrayExtension import com.jfrog.bintray.gradle.tasks.BintrayUploadTask -import groovy.lang.GroovyObject import org.gradle.api.Plugin import org.gradle.api.Project import org.gradle.api.publish.PublishingExtension @@ -10,10 +9,6 @@ import org.gradle.api.publish.maven.MavenPublication import org.gradle.api.publish.maven.internal.artifact.FileBasedMavenArtifact import org.gradle.api.publish.maven.tasks.PublishToMavenRepository import org.gradle.kotlin.dsl.* -import org.jfrog.gradle.plugin.artifactory.dsl.ArtifactoryPluginConvention -import org.jfrog.gradle.plugin.artifactory.dsl.PublisherConfig -import org.jfrog.gradle.plugin.artifactory.dsl.ResolverConfig -import org.jfrog.gradle.plugin.artifactory.task.ArtifactoryTask open class ScientifikPublishPlugin : Plugin { @@ -39,7 +34,6 @@ open class ScientifikPublishPlugin : Plugin { } project.plugins.apply("com.jfrog.bintray") - project.plugins.apply("com.jfrog.artifactory") project.configure { // Process each publication we have in this project @@ -104,7 +98,7 @@ open class ScientifikPublishPlugin : Plugin { } pluginManager.withPlugin("scientifik.mpp"){ - tasks.filter { it is ArtifactoryTask || it is BintrayUploadTask }.forEach { + tasks.filterIsInstance().forEach { it.doFirst { publications.filterIsInstance() .forEach { publication -> @@ -122,32 +116,6 @@ open class ScientifikPublishPlugin : Plugin { } - project.configure { - val artifactoryUser: String? by project - val artifactoryPassword: String? by project - val artifactoryContextUrl = "http://npm.mipt.ru:8081/artifactory" - - setContextUrl(artifactoryContextUrl)//The base Artifactory URL if not overridden by the publisher/resolver - publish(delegateClosureOf { - repository(delegateClosureOf { - setProperty("repoKey", "gradle-dev-local") - setProperty("username", artifactoryUser) - setProperty("password", artifactoryPassword) - }) - - defaults(delegateClosureOf { - invokeMethod("publications", arrayOf("jvm", "js", "kotlinMultiplatform", "metadata")) - }) - }) - resolve(delegateClosureOf { - repository(delegateClosureOf { - setProperty("repoKey", "gradle-dev") - setProperty("username", artifactoryUser) - setProperty("password", artifactoryPassword) - }) - }) - } - if (bintrayRepo == null) { project.logger.warn("[${project.name}] Bintray repository not defined") } else {