-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
108 lines (87 loc) · 2.41 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'maven'
apply plugin: 'signing'
repositories {
mavenCentral()
}
dependencies {
}
task wrapper(type: Wrapper) {
gradleVersion = '1.8'
}
def getVersion = { ->
def stdout = new ByteArrayOutputStream()
exec {
commandLine 'bash', 'version.sh'
standardOutput = stdout
}
return stdout.toString().trim()
}
ext.globalVersion = getVersion()
group = 'org.cinchapi'
version = globalVersion
jar {
manifest {
attributes("Specificiation-Title": "PROJECT NAME", "Specificiation-Version": version, "Implementation-Version": version)
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives sourcesJar
archives javadocJar
}
signing {
sign configurations.archives
}
def getMaven = { ->
def stdout = new ByteArrayOutputStream()
exec {
commandLine 'cat', '.maven'
standardOutput = stdout
}
return stdout.toString().trim()
}
project.ext.maven = getMaven()
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: project.maven) {
authentication(userName: sonatypeUsername, password: sonatypePassword)
}
pom.version = '0.1.0'
pom.project {
name 'PROJECT NAME'
packaging 'jar'
description 'PROJECT DESCRIPTION'
url 'http://cinchapi.org/concourse'
scm {
url '[email protected]:cinchapi/PROJECT-REPO.git'
connection '[email protected]:cinchapi/PROJECT-REPO.git'
developerConnection '[email protected]:cinchapi/PROJECT-REPO.git'
}
licenses {
license {
name 'The Apache License, Version 2.0'
url 'http://opensource.org/licenses/Apache-2.0'
distribution 'repo'
}
}
developers {
developer {
id 'jnelson'
name 'Jeff Nelson'
}
}
}
}
}
}