forked from cinchapi/jarsh
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
95 lines (77 loc) · 2.26 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
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'maven'
apply plugin: 'signing'
repositories {
mavenCentral()
}
dependencies {
compile gradleApi()
compile "org.codehaus.groovy:groovy-all:1.8.6"
compile 'net.nisgits.gradle:gradle-executable-jar-plugin:1.7.0'
}
task wrapper(type: Wrapper) {
gradleVersion = '1.8'
}
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
}
group = 'org.cinchapi'
version = 0.1
signing {
required { gradle.taskGraph.hasTask("uploadArchives") }
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'
pom.project {
name 'Jarsh'
packaging 'jar'
description 'A gradle plugin that generates an executable shell script that embeds a runnable application jar with all of its dependencies.'
url 'http://cinchapi.org/jarsh'
scm {
url 'git@github.com:cinchapi/jarsh.git'
connection 'git@github.com:cinchapi/jarsh.git'
developerConnection 'git@github.com:cinchapi/jarsh.git'
}
licenses {
license {
name 'The MIT License'
url 'http://opensource.org/licenses/MIT'
distribution 'repo'
}
}
developers {
developer {
id 'jnelson'
name 'Jeff Nelson'
}
}
}
}
}
}