forked from cdapio/netty-http
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
126 lines (108 loc) · 3.46 KB
/
build.gradle
File metadata and controls
126 lines (108 loc) · 3.46 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
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
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'idea'
apply plugin: "maven-publish"
group = 'io.cdap.http'
version = '1.6.0'
description = "Netty based path router"
sourceCompatibility = 1.8
targetCompatibility = 1.8
compileJava.options.encoding = 'UTF-8'
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
def getVersion = { ->
def stdout = new ByteArrayOutputStream()
exec {
commandLine './bin/version.sh'
standardOutput = stdout
}
return stdout.toString().trim()
}
buildscript {
repositories {
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "com.github.jengelman.gradle.plugins:shadow:1.2.3"
}
}
ext {
// S3 Maven repo setup.
if (System.getenv("AWS_ACCESS_KEY_ID") != null && System.getenv("AWS_SECRET_ACCESS_KEY") != null) {
ext.repo = {}
ext.repo.accessKey = System.getenv("AWS_ACCESS_KEY_ID")
ext.repo.secretKey = System.getenv("AWS_SECRET_ACCESS_KEY")
} else {
def awsKeyFile = project.file(System.getProperty("user.home") + "/.clickagy/aws")
if (!awsKeyFile.exists()) {
throw new FileNotFoundException(awsKeyFile.absolutePath)
} else {
Properties properties = new Properties()
awsKeyFile.withInputStream { instr ->
properties.load(instr)
}
ext.repo = properties
}
}
}
repositories {
maven { url "https://repo.maven.apache.org/maven2" }
}
version = getVersion()
dependencies {
compile group: 'javax.ws.rs', name: 'javax.ws.rs-api', version:'2.0'
compile group: 'io.netty', name: 'netty-buffer', version:'4.1.50.Final'
compile group: "io.netty", name: "netty-transport-native-epoll", version: "4.1.50.Final"
compile group: 'io.netty', name: 'netty-codec-http', version:'4.1.50.Final'
compile group: 'io.netty', name: 'netty-handler', version:'4.1.50.Final'
compile group: 'org.slf4j', name: 'slf4j-api', version:'1.7.5'
compile group: 'com.google.code.findbugs', name: 'jsr305', version:'2.0.1'
compile group: 'commons-beanutils', name: 'commons-beanutils-core', version:'1.8.3'
testCompile group: 'junit', name: 'junit', version:'4.11'
testCompile group: 'ch.qos.logback', name: 'logback-core', version:'1.0.9'
testCompile group: 'ch.qos.logback', name: 'logback-classic', version:'1.0.9'
testCompile group: 'com.google.code.gson', name: 'gson', version:'2.2.4'
}
idea {
module {
sourceDirs += file("${projectDir}/build/generated/source/apt/main")
testSourceDirs += file("${projectDir}/build/generated/source/apt/test")
}
}
task sourceJar(type: Jar, dependsOn: classes) {
classifier "sources"
from sourceSets.main.allSource
}
artifacts {
archives sourceJar
}
publishing {
publications {
projectName(MavenPublication) {
groupId project.group
artifactId "http"
version project.version
from project(":").components.java
artifact project(":").sourceJar {
classifier "sources"
}
}
}
repositories {
maven {
url "s3://clickagy-release/mvn"
credentials(AwsCredentials) {
accessKey repo.getProperty("accessKey")
secretKey repo.getProperty("secretKey")
}
}
}
}
wrapper {
gradleVersion = "4.9"
distributionType = "ALL"
}