Removed artifactory mentions

This commit is contained in:
Alexander Nozik 2019-10-04 18:38:15 +03:00
parent 72d0d3fac6
commit 06f683ea5d
2 changed files with 2 additions and 35 deletions

View File

@ -24,7 +24,6 @@ dependencies {
implementation("org.jetbrains.kotlin:kotlin-serialization:$kotlinVersion") implementation("org.jetbrains.kotlin:kotlin-serialization:$kotlinVersion")
implementation("org.jetbrains.kotlinx:kotlinx-metadata-jvm:0.1.0") implementation("org.jetbrains.kotlinx:kotlinx-metadata-jvm:0.1.0")
implementation("org.jetbrains.kotlinx:atomicfu-gradle-plugin:0.12.10") 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("com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4")
implementation("org.jetbrains.dokka:dokka-gradle-plugin:0.9.18") implementation("org.jetbrains.dokka:dokka-gradle-plugin:0.9.18")
} }
@ -33,7 +32,7 @@ gradlePlugin {
plugins { plugins {
create("scientifik-publish") { create("scientifik-publish") {
id = "scientifik.publish" id = "scientifik.publish"
description = "The publication plugin for bintray and artifactory" description = "The publication plugin for bintray and bitbucket"
implementationClass = "scientifik.ScientifikPublishPlugin" implementationClass = "scientifik.ScientifikPublishPlugin"
} }

View File

@ -2,7 +2,6 @@ package scientifik
import com.jfrog.bintray.gradle.BintrayExtension import com.jfrog.bintray.gradle.BintrayExtension
import com.jfrog.bintray.gradle.tasks.BintrayUploadTask import com.jfrog.bintray.gradle.tasks.BintrayUploadTask
import groovy.lang.GroovyObject
import org.gradle.api.Plugin import org.gradle.api.Plugin
import org.gradle.api.Project import org.gradle.api.Project
import org.gradle.api.publish.PublishingExtension 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.internal.artifact.FileBasedMavenArtifact
import org.gradle.api.publish.maven.tasks.PublishToMavenRepository import org.gradle.api.publish.maven.tasks.PublishToMavenRepository
import org.gradle.kotlin.dsl.* 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<Project> { open class ScientifikPublishPlugin : Plugin<Project> {
@ -39,7 +34,6 @@ open class ScientifikPublishPlugin : Plugin<Project> {
} }
project.plugins.apply("com.jfrog.bintray") project.plugins.apply("com.jfrog.bintray")
project.plugins.apply("com.jfrog.artifactory")
project.configure<PublishingExtension> { project.configure<PublishingExtension> {
// Process each publication we have in this project // Process each publication we have in this project
@ -104,7 +98,7 @@ open class ScientifikPublishPlugin : Plugin<Project> {
} }
pluginManager.withPlugin("scientifik.mpp"){ pluginManager.withPlugin("scientifik.mpp"){
tasks.filter { it is ArtifactoryTask || it is BintrayUploadTask }.forEach { tasks.filterIsInstance<BintrayUploadTask>().forEach {
it.doFirst { it.doFirst {
publications.filterIsInstance<MavenPublication>() publications.filterIsInstance<MavenPublication>()
.forEach { publication -> .forEach { publication ->
@ -122,32 +116,6 @@ open class ScientifikPublishPlugin : Plugin<Project> {
} }
project.configure<ArtifactoryPluginConvention> {
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<PublisherConfig> {
repository(delegateClosureOf<GroovyObject> {
setProperty("repoKey", "gradle-dev-local")
setProperty("username", artifactoryUser)
setProperty("password", artifactoryPassword)
})
defaults(delegateClosureOf<GroovyObject> {
invokeMethod("publications", arrayOf("jvm", "js", "kotlinMultiplatform", "metadata"))
})
})
resolve(delegateClosureOf<ResolverConfig> {
repository(delegateClosureOf<GroovyObject> {
setProperty("repoKey", "gradle-dev")
setProperty("username", artifactoryUser)
setProperty("password", artifactoryPassword)
})
})
}
if (bintrayRepo == null) { if (bintrayRepo == null) {
project.logger.warn("[${project.name}] Bintray repository not defined") project.logger.warn("[${project.name}] Bintray repository not defined")
} else { } else {