-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
91 lines (81 loc) · 2.59 KB
/
build.gradle
File metadata and controls
91 lines (81 loc) · 2.59 KB
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
buildscript {
repositories {
jcenter()
}
dependencies {
classpath "com.github.townsfolk:gradle-release:1.2"
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:2.2.4"
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:0.3"
classpath "com.netflix.nebula:nebula-publishing-plugin:1.9.7"
classpath "com.netflix.nebula:gradle-info-plugin:1.9.5"
}
}
apply plugin: "idea"
apply plugin: "project-reports"
apply plugin: "groovy"
apply plugin: "info"
apply plugin: "release"
apply plugin: "nebula-source-jar"
apply plugin: "nebula-javadoc-jar"
apply plugin: "maven-publish"
apply plugin: "artifactory-publish"
apply plugin: "bintray"
repositories {
jcenter()
}
dependencies {
compile "com.netflix.feign:feign-gson:6.1.2"
testCompile "org.codehaus.groovy:groovy-all:2.3.1"
testCompile "org.spockframework:spock-core:0.7-groovy-2.0"
testRuntime "cglib:cglib-nodep:3.1" // allows mocking of classes (in addition to interfaces)
testRuntime "org.objenesis:objenesis:2.1" // allows mocking of classes without default constructor (together with CGLIB)
}
targetCompatibility = "1.7"
sourceCompatibility = "1.7"
publishing {
publications {
main(MavenPublication) {
from components.java
artifact sourceJar
artifact javadocJar
}
}
}
artifactory {
contextUrl = "https://oss.jfrog.org/artifactory"
publish {
repository {
repoKey = "oss-snapshot-local"
username = project.hasProperty("ojo_user") ? ojo_user : ""
password = project.hasProperty("ojo_password") ? ojo_password : ""
maven = true
}
defaults {
publications "main"
}
}
clientConfig.includeEnvVars = true
if (System.getenv("TRAVIS")) {
clientConfig.info.buildNumber = System.getenv("TRAVIS_BUILD_NUMBER")
clientConfig.info.vcsRevision = System.getenv("TRAVIS_COMMIT")
}
}
bintray {
user = project.hasProperty("bintrayUserName") ? bintrayUserName : ""
key = project.hasProperty("bintrayApiKey") ? bintrayApiKey : ""
publications = ["main"]
pkg {
repo = "main"
userOrg = "commercehub-oss"
name = "sensu-java-api"
desc = "Java API for the Sensu monitoring framework"
licenses = ["Apache-2.0"]
}
}
task checkSnapshot << {
if (!version.contains("-SNAPSHOT")) {
throw new GradleException("Version (${version}) needs -SNAPSHOT if publishing snapshot")
}
}
artifactoryPublish.dependsOn checkSnapshot
createReleaseTag.dependsOn bintrayUpload