summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorRocky Madden <git@rockymadden.com>2013-01-10 14:04:39 -0700
committerRocky Madden <git@rockymadden.com>2013-01-10 14:04:39 -0700
commitc0db60eef9a20484d1a20a8b61bd376cbbf9dfd3 (patch)
tree4cd41afb228c645f19e3001cb3f246a6d2c93b32 /core
parent49edadda1a9281d1e9196d5f628716bd62626328 (diff)
downloadstringmetric-c0db60eef9a20484d1a20a8b61bd376cbbf9dfd3.tar.gz
stringmetric-c0db60eef9a20484d1a20a8b61bd376cbbf9dfd3.tar.bz2
stringmetric-c0db60eef9a20484d1a20a8b61bd376cbbf9dfd3.zip
Signing and Maven code must be located in subproject Gradle build.
Diffstat (limited to 'core')
-rwxr-xr-xcore/build.gradle68
1 files changed, 68 insertions, 0 deletions
diff --git a/core/build.gradle b/core/build.gradle
index 6cce643..312e6c0 100755
--- a/core/build.gradle
+++ b/core/build.gradle
@@ -1,3 +1,8 @@
+apply plugin: 'maven'
+apply plugin: 'signing'
+
+def isMavenDeployable = hasProperty('mavenRepositoryUrl') && hasProperty('mavenRepositoryUsername') && hasProperty('mavenRepositoryPassword')
+
dependencies {
testCompile 'com.google.caliper:caliper:0.5-rc1'
}
@@ -42,4 +47,67 @@ sourceSets {
srcDir 'source/test/scala'
}
}
+}
+
+if (isMavenDeployable) {
+ signing {
+ sign configurations.archives
+ }
+
+ task scaladocJar(type: Jar, dependsOn: scaladoc) {
+ classifier = 'javadoc'
+ from "${project.buildDir}/docs/scaladoc"
+ }
+
+ task sourceJar(type: Jar, dependsOn: classes) {
+ classifier = 'sources'
+ from sourceSets.main.allSource
+ }
+
+ artifacts {
+ archives jar
+ archives scaladocJar
+ archives sourceJar
+ }
+
+ uploadArchives {
+ repositories {
+ mavenDeployer {
+ beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
+
+ repository(url: mavenRepositoryUrl) {
+ authentication(userName: mavenRepositoryUsername, password: mavenRepositoryPassword)
+ }
+
+ pom.project {
+ description "${parent.project.description}"
+ groupId "${parent.project.group}"
+ name "${project.name}"
+ packaging 'jar'
+ url "${parent.project.url}"
+ version "${parent.project.version}"
+
+ developers {
+ developer {
+ id 'rockymadden'
+ name 'Rocky Madden'
+ }
+ }
+
+ licenses {
+ license {
+ name 'Apache License v2.0'
+ url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
+ distribution 'repo'
+ }
+ }
+
+ scm {
+ url "${parent.project.scm}"
+ connection "${parent.project.scm}"
+ }
+ }
+ }
+ }
+ }
} \ No newline at end of file