forked from int128/gradle-ssh-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
100 lines (89 loc) · 2.65 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
plugins {
id 'groovy'
id 'jacoco'
id 'maven-publish'
id 'ivy-publish'
id 'com.jfrog.bintray' version '1.0'
}
sourceCompatibility = JavaVersion.VERSION_1_6
targetCompatibility = JavaVersion.VERSION_1_6
repositories {
mavenLocal()
jcenter()
}
dependencies {
compile gradleApi()
compile localGroovy()
compile("org.hidetake:groovy-ssh:${project.property 'groovy-ssh.version'}") {
exclude module: 'groovy-all'
}
testCompile('org.spockframework:spock-core:0.7-groovy-2.0') {
exclude module: 'groovy-all'
}
testCompile 'cglib:cglib-nodep:3.1'
}
jacoco {
toolVersion = '0.7.1.201405082137'
}
check.dependsOn jacocoTestReport
task javadocJar(type: Jar, dependsOn: groovydoc) {
from "${buildDir}/docs/groovydoc"
classifier = 'javadoc'
}
task sourcesJar(type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
}
publishing {
publications {
maven(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
pom.withXml {
asNode().children().last() + {
resolveStrategy = DELEGATE_FIRST
name project.name
description project.description
url project.property('pom.url')
scm {
url project.property('pom.scm.url')
connection project.property('pom.scm.connection')
}
licenses {
license {
name project.property('pom.license.name')
url project.property('pom.license.url')
distribution 'repo'
}
}
developers {
developer {
id project.property('pom.developer.id')
name project.property('pom.developer.name')
}
}
}
}
}
}
}
bintray {
user = System.getenv('BINTRAY_USER') ?: project.properties.bintrayUser
key = System.getenv('BINTRAY_KEY') ?: project.properties.bintrayKey
publications = ['maven']
pkg {
repo = 'maven'
name = project.name
version {
attributes = ['gradle-plugin': 'org.hidetake.ssh:org.hidetake:gradle-ssh-plugin']
}
}
}
tasks.bintrayUpload.doFirst {
assert !project.version.contains('SNAPSHOT')
}
task install(dependsOn: 'publishMavenPublicationToMavenLocal')
task wrapper(type: Wrapper) {
gradleVersion = '2.1'
}