mirror of
https://github.com/jlengrand/detekt.git
synced 2026-03-10 08:11:23 +00:00
Publish to Bintray using maven-publish (#2885)
* Publish to Bintray using maven-publish * Removed unused variable
This commit is contained in:
2
.github/CONTRIBUTING.md
vendored
2
.github/CONTRIBUTING.md
vendored
@@ -93,7 +93,7 @@ Following warning is expected until [Jekyll](https://github.com/jekyll/jekyll/is
|
||||
- `gradle increment<Patch|Minor|Major>`
|
||||
- `gradle build publishToMavenLocal -x detekt -x test` - publish to local first
|
||||
- `gradle build` - now fully build with tests and self-analysis.
|
||||
- `gradle bintrayUpload` - uploads artifacts to Bintray
|
||||
- `gradle publishDetektPublicationPublicationToBintrayRepository` - uploads artifacts to Bintray
|
||||
- `gradle publishPlugins` - uploads the Gradle Plugin to the Plugin Repositories
|
||||
- `gradle githubRelease` - creates a tag for the current version with changelog and cli jar
|
||||
- `gradle applyDocVersion applySelfAnalysisVersion`
|
||||
|
||||
@@ -17,7 +17,6 @@ object Plugins {
|
||||
const val DETEKT = "1.10.0"
|
||||
const val GITHUB_RELEASE = "2.2.12"
|
||||
const val ARTIFACTORY = "4.15.1"
|
||||
const val BINTRAY = "1.8.4"
|
||||
const val SHADOW = "5.2.0"
|
||||
const val VERSIONS = "0.28.0"
|
||||
const val SONAR = "2.8"
|
||||
@@ -30,7 +29,6 @@ dependencies {
|
||||
implementation("io.gitlab.arturbosch.detekt:detekt-gradle-plugin:${Plugins.DETEKT}")
|
||||
implementation("com.github.breadmoirai:github-release:${Plugins.GITHUB_RELEASE}")
|
||||
implementation("org.jfrog.buildinfo:build-info-extractor-gradle:${Plugins.ARTIFACTORY}")
|
||||
implementation("com.jfrog.bintray.gradle:gradle-bintray-plugin:${Plugins.BINTRAY}")
|
||||
implementation("com.github.jengelman.gradle.plugins:shadow:${Plugins.SHADOW}")
|
||||
implementation("com.github.ben-manes:gradle-versions-plugin:${Plugins.VERSIONS}")
|
||||
implementation("org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:${Plugins.SONAR}")
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
||||
import com.jfrog.bintray.gradle.BintrayExtension
|
||||
import groovy.lang.GroovyObject
|
||||
import org.jfrog.gradle.plugin.artifactory.dsl.ArtifactoryPluginConvention
|
||||
import org.jfrog.gradle.plugin.artifactory.dsl.PublisherConfig
|
||||
@@ -9,7 +8,6 @@ plugins {
|
||||
`java-library` apply false // is applied in commons; make configurations available in this script
|
||||
`maven-publish` apply false
|
||||
id("com.jfrog.artifactory") apply false
|
||||
id("com.jfrog.bintray") apply false
|
||||
}
|
||||
|
||||
project(":detekt-cli") {
|
||||
@@ -27,7 +25,6 @@ subprojects {
|
||||
|
||||
apply {
|
||||
plugin("maven-publish")
|
||||
plugin("com.jfrog.bintray")
|
||||
plugin("com.jfrog.artifactory")
|
||||
}
|
||||
|
||||
@@ -36,40 +33,17 @@ subprojects {
|
||||
val bintrayKey = findProperty("bintrayKey")?.toString()
|
||||
?: System.getenv("BINTRAY_API_KEY")
|
||||
|
||||
bintray {
|
||||
user = bintrayUser
|
||||
key = bintrayKey
|
||||
val mavenCentralUser = System.getenv("MAVEN_CENTRAL_USER") ?: ""
|
||||
val mavenCentralPassword = System.getenv("MAVEN_CENTRAL_PW") ?: ""
|
||||
|
||||
setPublications(DETEKT_PUBLICATION)
|
||||
|
||||
pkg(delegateClosureOf<BintrayExtension.PackageConfig> {
|
||||
repo = "code-analysis"
|
||||
name = "detekt"
|
||||
userOrg = "arturbosch"
|
||||
setLicenses("Apache-2.0")
|
||||
vcsUrl = "https://github.com/detekt/detekt"
|
||||
|
||||
version(delegateClosureOf<BintrayExtension.VersionConfig> {
|
||||
name = project.version as? String
|
||||
released = Date().toString()
|
||||
|
||||
gpg(delegateClosureOf<BintrayExtension.GpgConfig> {
|
||||
sign = true
|
||||
})
|
||||
|
||||
mavenCentralSync(delegateClosureOf<BintrayExtension.MavenCentralSyncConfig> {
|
||||
sync = true
|
||||
user = mavenCentralUser
|
||||
password = mavenCentralPassword
|
||||
close = "1"
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
publishing {
|
||||
repositories {
|
||||
maven {
|
||||
name = "bintray"
|
||||
url = uri("https://api.bintray.com/maven/arturbosch/code-analysis/detekt/;publish=1;override=1")
|
||||
credentials {
|
||||
username = bintrayUser
|
||||
password = bintrayKey
|
||||
}
|
||||
}
|
||||
}
|
||||
publications.register<MavenPublication>(DETEKT_PUBLICATION) {
|
||||
groupId = project.group as? String
|
||||
artifactId = project.name
|
||||
|
||||
@@ -3,3 +3,5 @@ systemProp.sonar.host.url=http://localhost:9000
|
||||
systemProp.file.encoding=UTF-8
|
||||
org.gradle.parallel=true
|
||||
org.gradle.caching=true
|
||||
# Needed for https://github.com/gradle/gradle/issues/11412
|
||||
systemProp.org.gradle.internal.publish.checksums.insecure=true
|
||||
|
||||
Reference in New Issue
Block a user