mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-23 01:29:43 +01:00
Add gradle task to publish this plugin to Maven Central
Former-commit-id: dc5bfcbc382d7eb5f227c655214560082c8b9633
This commit is contained in:
@@ -35,6 +35,7 @@ plugins {
|
|||||||
apply plugin: 'idea'
|
apply plugin: 'idea'
|
||||||
apply plugin: 'groovy'
|
apply plugin: 'groovy'
|
||||||
apply plugin: 'maven'
|
apply plugin: 'maven'
|
||||||
|
apply plugin: 'signing'
|
||||||
apply plugin: "com.gradle.plugin-publish"
|
apply plugin: "com.gradle.plugin-publish"
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
@@ -56,14 +57,73 @@ version = '0.0.3'
|
|||||||
//-------------------------------
|
//-------------------------------
|
||||||
// Local debug use only
|
// Local debug use only
|
||||||
//
|
//
|
||||||
|
//uploadArchives {
|
||||||
|
// repositories {
|
||||||
|
// mavenDeployer {
|
||||||
|
// repository(url: uri('../../../repo'))
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
//-------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
// upload to maven central
|
||||||
uploadArchives {
|
uploadArchives {
|
||||||
repositories {
|
repositories {
|
||||||
mavenDeployer {
|
mavenDeployer {
|
||||||
repository(url: uri('../../../repo'))
|
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
|
||||||
|
|
||||||
|
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
|
||||||
|
authentication(userName: sonatypeUsername, password: sonatypePassword)
|
||||||
|
}
|
||||||
|
|
||||||
|
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
|
||||||
|
authentication(userName: sonatypeUsername, password: sonatypePassword)
|
||||||
|
}
|
||||||
|
|
||||||
|
pom.project {
|
||||||
|
name 'Dependency Check Gradle Plugin'
|
||||||
|
packaging 'jar'
|
||||||
|
description 'Dependency-Check is a utility that attempts to detect publicly disclosed vulnerabilities contained within project dependencies.'
|
||||||
|
url 'https://github.com/wmaintw/DependencyCheck/tree/master/dependency-check-gradle'
|
||||||
|
|
||||||
|
scm {
|
||||||
|
connection 'git@github.com:wmaintw/DependencyCheck.git'
|
||||||
|
developerConnection 'git@github.com:wmaintw/DependencyCheck.git'
|
||||||
|
url 'https://github.com/wmaintw/DependencyCheck'
|
||||||
|
}
|
||||||
|
|
||||||
|
licenses {
|
||||||
|
license {
|
||||||
|
name 'The Apache License, Version 2.0'
|
||||||
|
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
developers {
|
||||||
|
developer {
|
||||||
|
id 'wmaintw'
|
||||||
|
name 'Wei Ma'
|
||||||
|
email 'wma@thoughtworks.com'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//-------------------------------
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
task javadocJar(type: Jar) {
|
||||||
|
classifier = 'javadoc'
|
||||||
|
from javadoc
|
||||||
|
}
|
||||||
|
|
||||||
|
artifacts {
|
||||||
|
archives javadocJar, sourcesJar
|
||||||
|
}
|
||||||
|
|
||||||
|
signing {
|
||||||
|
sign configurations.archives
|
||||||
|
}
|
||||||
|
|
||||||
// publish to Bintray
|
// publish to Bintray
|
||||||
plugindev {
|
plugindev {
|
||||||
|
|||||||
Reference in New Issue
Block a user