Skip to content

Instantly share code, notes, and snippets.

@LethalMaus
Created April 15, 2024 15:26
Show Gist options
  • Select an option

  • Save LethalMaus/83ee60e3caa5d651465986e5a8be2fee to your computer and use it in GitHub Desktop.

Select an option

Save LethalMaus/83ee60e3caa5d651465986e5a8be2fee to your computer and use it in GitHub Desktop.
artifactory.build.gradle.kts
plugins {
id("com.jfrog.artifactory") version "5.+" apply false
}
configure<org.jfrog.gradle.plugin.artifactory.dsl.ArtifactoryPluginConvention> {
setContextUrl("<your_jfrog_url>")
publish {
repository {
repoKey = "<your_jfrog_repo_key>"
// Best to fetch from local.properties or similar
username = "<your_jfrog_username>"
password = "<your_jfrog_password>"
}
defaults {
publications("aar")
setPublishArtifacts(true)
setPublishPom(true)
}
}
}
// Optional: To prevent publishing on every build
tasks {
named<ArtifactoryTask>("artifactoryPublish") {
skip = true
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment