-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
76 lines (59 loc) · 1.82 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
plugins {
id 'java-library'
id 'maven-publish'
id 'com.jfrog.bintray' version '1.8.0'
}
repositories {
jcenter()
maven {
url 'https://dl.bintray.com/espere-me/production/'
}
}
dependencies {
compileOnly group: 'me.espere.feelings', name: 'feelings-spec', version: 'v0.0.4'
implementation group: 'org.apache.commons', name: 'commons-csv', version: '1.4'
implementation(group: 'edu.stanford.nlp', name: 'stanford-corenlp', version: '3.8.0') {
exclude module: 'javax.servlet-api'
}
testImplementation group: 'me.espere.feelings', name: 'feelings-spec', version: 'v0.0.4'
testImplementation 'junit:junit:4.12'
testImplementation group: 'org.assertj', name: 'assertj-core', version: '3.9.1'
testImplementation group: 'org.mockito', name: 'mockito-core', version: '2.16.0'
}
publishing {
publications {
feelingsImpl(MavenPublication) {
from components.java
groupId 'me.espere.feelings'
artifactId 'feelings-impl'
}
}
}
bintray {
dryRun = !project.hasProperty('deploy')
user System.getenv('BINTRAY_USER')
key System.getenv('BINTRAY_KEY')
pkg {
repo = 'production'
name = 'feelings-impl'
userOrg = 'espere-me'
version {
name = project.property('version')
}
}
publications = ['feelingsImpl']
publish = true
}
task checkVersion {
description 'This task fails the build if the version property is not set'
doLast {
if (project.property('version') == 'unspecified') {
throw new GradleException('You must specify a version property')
}
}
}
tasks.bintrayUpload.dependsOn checkVersion
tasks.bintrayUpload.dependsOn clean
tasks.bintrayUpload.dependsOn build
clean.mustRunAfter checkVersion
build.mustRunAfter clean