-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
executable file
·187 lines (167 loc) · 4.6 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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
buildscript {
repositories {
mavenLocal()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "gradle.plugin.co.riiid:gradle-github-plugin:0.4.2"
classpath "net.ltgt.gradle:gradle-apt-plugin:0.6"
}
}
plugins {
id 'groovy'
id 'java'
id 'application'
id 'com.github.johnrengelman.shadow' version '1.2.3'
//id "com.linkedin.python-sdist" version "0.3.9"
id 'maven-publish'
id "net.ltgt.apt" version "0.6"
}
def strict = false
if(System.getenv("STRICT_TYPECHECKING") != null) {
strict = true
println "COMPILE STATIC & TYPECHECKED"
}
compileGroovy {
groovyOptions.javaAnnotationProcessing = true
if(strict)
groovyOptions.configurationScript = file("gradle/config.groovy")
}
compileGroovy {
}
apply plugin: "co.riiid.gradle"
apply plugin: 'distribution'
apply plugin: 'idea'
apply plugin: 'java'
apply plugin: 'groovy'
def libversion = '3.5.1'
subprojects {
ext {
libversion = '3.5.1'
}
}
if(System.getenv("VERTX_VERSION") != null)
libversion = System.getenv("VERTX_VERSION")
sourceSets{
main{
groovy{
exclude "net/iowntheinter/kvdn/storage/lock/*"
exclude "net/iowntheinter/kvdn/storage/queue/*"
exclude "net/iowntheinter/kvdn/storage/counter/*"
}
}
}
version = "$libversion-${new File('src/main/resources/_KVDN_VERSION.txt').text.trim()}"
println("version $version")
def GH_TOKEN = System.getenv("GH_TOKEN")
def AWS_MVN_BUCKET = System.getenv("AWS_MVN_BUCKET")
def AWS_DEFAULT_REGION = System.getenv("AWS_DEFAULT_REGION")
def AWS_ACCESS_KEY_ID = System.getenv("AWS_ACCESS_KEY_ID")
def AWS_SECRET_ACCESS_KEY = System.getenv("AWS_SECRET_ACCESS_KEY")
def USER = System.getenv("USER")
distributions {
clients {
baseName = 'clients'
contents {
from { 'Client/' }
}
}
}
if(System.getenv("GH_TOKEN") != null) {
github {
owner = 'cinterloper'
repo = 'kvdn'
token = GH_TOKEN
tagName = version
targetCommitish = 'master'
name = "v$version"
body = """# KVDN
release $version
${System.getenv('RELEASE_NOTES')?:""}
"""
assets = [
"build/libs/kvdn-$version-fat.jar",
"build/distributions/clients-${version}.zip",
"build/distributions/clients-${version}.tar"
]
}
}
repositories {
mavenCentral()
mavenLocal()
jcenter()
// pyGradlePyPi()
maven { url 'http://dl.bintray.com/gesellix/docker-utils' }
flatDir { dirs '/usr/share/java' }
flatDir { dirs 'lib/' }
if (AWS_MVN_BUCKET && !AWS_MVN_BUCKET.allWhitespace) {
maven {
url "s3://$AWS_MVN_BUCKET/maven2"
credentials(AwsCredentials) {
accessKey AWS_ACCESS_KEY_ID
secretKey AWS_SECRET_ACCESS_KEY
}
}
}
}
publishing {
repositories {
mavenLocal()
if (AWS_MVN_BUCKET && !AWS_MVN_BUCKET.allWhitespace) {
maven {
url "s3://$AWS_MVN_BUCKET/maven2"
credentials(AwsCredentials) {
accessKey AWS_ACCESS_KEY_ID
secretKey AWS_SECRET_ACCESS_KEY
}
}
}
}
publications {
mavenJava(MavenPublication) {
groupId 'net.iowntheinter'
artifactId 'kvdn'
from components.java
}
}
}
sourceCompatibility = '1.8'
mainClassName = 'io.vertx.core.Launcher';
dependencies {
compile "io.vertx:vertx-web:$libversion"
compile "io.vertx:vertx-core:$libversion"
compile "com.google.guava:guava:19.0"
compile "io.vertx:vertx-lang-groovy:$libversion"
compile "io.vertx:vertx-auth-common:$libversion"
compile "io.vertx:vertx-auth-jwt:$libversion"
compile "io.vertx:vertx-auth-shiro:$libversion"
compile "io.vertx:vertx-service-proxy:$libversion"
compile 'ch.qos.logback:logback-classic:1.1.7'
compile 'ch.qos.logback:logback-core:1.1.7'
compile "net.iowntheinter:kvdn-util:$version"
testCompile "io.vertx:vertx-unit:$libversion"
testCompile group: 'junit', name: 'junit', version: '4.+'
}
test {
testLogging {
// Show that tests are run in the command-line output
events 'started', 'passed'
}
}
processResources {
from 'src/main/groovy'
}
shadowJar {
classifier = 'fat'
manifest {
attributes 'Main-Verticle': 'groovy:kvdn-start.groovy'
}
mergeServiceFiles{
include 'META-INF/services/io.vertx.core.spi.VerticleFactory'
}
}
task wrapper(type: Wrapper) {
gradleVersion = '2.8'
}