mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-28 12:07:46 +01:00
33 lines
1.1 KiB
Plaintext
33 lines
1.1 KiB
Plaintext
import org.jfrog.gradle.plugin.artifactory.dsl.ArtifactoryPluginConvention
|
|
import org.jfrog.gradle.plugin.artifactory.task.ArtifactoryTask
|
|
|
|
plugins {
|
|
id("com.jfrog.artifactory")
|
|
}
|
|
|
|
val ARTIFACTORY_CONTEXT_URL = "artifactory_contextUrl"
|
|
val ARTIFACTORY_USER = "artifactory_user"
|
|
val ARTIFACTORY_PASSWORD = "artifactory_password"
|
|
|
|
if (!project.hasProperty(ARTIFACTORY_CONTEXT_URL)) ext[ARTIFACTORY_CONTEXT_URL] = "http://localhost"
|
|
if (!project.hasProperty(ARTIFACTORY_USER)) ext[ARTIFACTORY_USER] = "guest"
|
|
if (!project.hasProperty(ARTIFACTORY_PASSWORD)) ext[ARTIFACTORY_PASSWORD] = ""
|
|
|
|
configure<ArtifactoryPluginConvention> {
|
|
setContextUrl("${project.property(ARTIFACTORY_CONTEXT_URL)}")
|
|
clientConfig.publisher.run {
|
|
repoKey = when {
|
|
"${project.version}".contains("SNAPSHOT") -> "libs-snapshot-local"
|
|
else -> "libs-release-local"
|
|
}
|
|
username = "${project.property(ARTIFACTORY_USER)}"
|
|
password = "${project.property(ARTIFACTORY_PASSWORD)}"
|
|
isMaven = true
|
|
isIvy = false
|
|
}
|
|
}
|
|
|
|
tasks.named<ArtifactoryTask>("artifactoryPublish") {
|
|
isSkip = true
|
|
}
|