This repository has been archived by the owner on Oct 30, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
160 lines (143 loc) · 4.31 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.1'
classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:3.0.3'
}
}
allprojects {
group = 'org.jvalue.ceps'
version = '0.1.1'
}
subprojects {
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'com.jfrog.artifactory'
sourceCompatibility = 1.7
// setup generated sources (if any)
ext {
mainSourcesDir = 'src/main/java'
generatedSourcesDir = 'target/generated-sources/java'
}
sourceSets {
main {
java {
srcDir mainSourcesDir
srcDir generatedSourcesDir
}
}
}
// default dependency locations
repositories {
mavenLocal()
jcenter()
}
// show compiler warnings
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked"
}
// gradle wrapper
task wrapper(type: Wrapper) {
gradleVersion = '2.4'
}
// integration test
def testSrcDir = file('src/integrationtest/java')
def testResourceDir = file('src/integrationtest/resources')
sourceSets {
integrationTest {
java.srcDir testSrcDir
resources.srcDir testResourceDir
compileClasspath = sourceSets.main.output + configurations.testCompile + sourceSets.test.output
runtimeClasspath = output + compileClasspath
}
}
task integrationTest(type: Test) {
testClassesDir = sourceSets.integrationTest.output.classesDir
classpath = sourceSets.integrationTest.runtimeClasspath
}
check.dependsOn integrationTest
// let intellij know about 'special' folders
idea {
module {
testSourceDirs += testSrcDir
sourceDirs += file(generatedSourcesDir)
}
}
// publishing to jcenter
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
}
}
}
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, javadocJar
}
bintray {
user = project.hasProperty("bintray_user") ? bintray_user : "dummy user"
key = project.hasProperty("bintray_key") ? bintray_key : "dummy key"
publications = ['mavenJava']
dryRun = false
publish = true
pkg {
repo = 'maven'
name = 'ceps'
desc = 'Complex Event Processing Service'
websiteUrl = 'https://github.com/jvalue/cep-serivce'
issueTrackerUrl = 'https://github.com/jvalue/cep-service/issues'
vcsUrl = 'https://github.com/jvalue/cep-service.git'
licenses = ['AGPL-3.0']
publicDownloadNumbers = true
version {
name = project.version
gpg {
sign = true
passphrase = project.hasProperty("bintray_gpg_passphrase") ? bintray_gpg_passphrase : "dummy passphrase"
}
mavenCentralSync {
sync = false
user = 'userToken'
password = 'password'
close = '1'
}
}
}
}
// snapshots
artifactory {
contextUrl = 'http://oss.jfrog.org/artifactory'
publish {
repository {
repoKey = 'oss-snapshot-local'
username = project.hasProperty("artifactory_user") ? artifactory_user : "dummy user"
password = project.hasProperty("artifactory_password") ? artifactory_password : "dummy key"
maven = true
}
defaults {
publications ('mavenJava')
}
}
resolve {
repository {
repoKey = 'libs-snapshot'
maven = true
}
}
}
}