forked from wasabifx/wasabi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
147 lines (122 loc) · 3.97 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
buildscript {
ext.kotlin_version = '0.1-SNAPSHOT'
ext.dokka_version = '0.9.7'
repositories {
mavenCentral()
jcenter()
maven {
url "https://oss.sonatype.org/content/repositories/snapshots"
}
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// classpath "org.jetbrains.dokka:dokka-gradle-plugin:$dokka_version"
}
}
if (hasProperty("teamcity") && kotlin_version != '0.1-SNAPSHOT') {
version = teamcity["build.number"]
} else
version = "0.1-SNAPSHOT"
apply plugin: 'kotlin'
// apply plugin: 'org.jetbrains.dokka'
repositories {
mavenCentral()
maven {
url 'http://oss.sonatype.org/content/repositories/snapshots'
}
maven {
url 'http://oss.sonatype.org/content/repositories/snapshots'
}
}
compileKotlin {
// kotlinOptions.annotations = file('annotations/Gradle_io.netty_netty-all_4.0.31.Final')
}
dependencies {
compile "io.netty:netty-all:4.1.0.CR6",
"commons-codec:commons-codec:1.9",
"commons-logging:commons-logging:1.1.1",
"com.netflix.rxjava:rxjava-core:0.20.0-RC4",
"org.slf4j:slf4j-api:1.7.5",
"org.slf4j:slf4j-simple:1.7.5",
"joda-time:joda-time:2.3",
"com.fasterxml.jackson.core:jackson-core:2.8.1",
"com.fasterxml.jackson.core:jackson-databind:2.8.1",
"com.fasterxml.jackson.core:jackson-annotations:2.8.1",
"com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.8.1",
"com.fasterxml.jackson.module:jackson-module-kotlin:2.8.1",
"com.fasterxml.woodstox:woodstox-core:5.0.1",
"org.yaml:snakeyaml:1.17",
// Used for HTTP2 support.
"org.mortbay.jetty.alpn:alpn-boot:8.1.8.v20160420"
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
compile "org.jetbrains.kotlin:kotlin-test:$kotlin_version"
testCompile "junit:junit:4.9"
testCompile "org.mockito:mockito-all:1.9.5"
testCompile "org.apache.httpcomponents:httpclient:4.5.1"
testCompile 'com.squareup.okhttp3:okhttp:3.2.0'
}
test {
// set heap size for the test JVM(s)
minHeapSize = "128m"
maxHeapSize = "512m"
// set JVM arguments for the test JVM(s)
jvmArgs '-XX:MaxPermSize=256m'
}
sourceSets {
main {
kotlin {
srcDir "src/main/kotlin"
}
}
test {
kotlin {
srcDir "test/main/kotlin"
}
}
main.java.srcDirs += 'src/main/kotlin'
}
apply plugin: 'maven'
apply plugin: 'maven-publish'
task sourceJar(type: Jar) {
from sourceSets.main.allSource
}
artifacts {
archives sourceJar
}
publishing {
publications {
mavenJava(MavenPublication) {
groupId = "org.wasabi"
artifactId = "wasabi"
version = "${version}"
from components.java
artifact sourceJar {
classifier "sources"
}
}
}
repositories {
maven {
url "http://repository.jetbrains.com/wasabi"
if (rootProject.hasProperty("deploy_username") && rootProject.hasProperty("deploy_password")) {
credentials {
username "${rootProject.deploy_username}"
password "${rootProject.deploy_password}"
}
}
}
}
}
task wrapper(type: Wrapper) {
gradleVersion = '2.12'
doLast() {
def gradleOpts = "-XX:MaxPermSize=300m -Xmx1024m"
def gradlew_sh = file("gradlew")
def gradlew_bat = file("gradlew.bat")
gradlew_sh.text = gradlew_sh.text.replace("DEFAULT_JVM_OPTS=",
"GRADLE_OPTS=\"$gradleOpts \$GRADLE_OPTS\"\nDEFAULT_JVM_OPTS=")
gradlew_bat.text = gradlew_bat.text.replace("set DEFAULT_JVM_OPTS=",
"set GRADLE_OPTS=$gradleOpts %GRADLE_OPTS%\nset DEFAULT_JVM_OPTS=")
}
}