-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathbuild.gradle
100 lines (81 loc) · 1.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
plugins {
id 'java-library'
id 'idea'
id 'com.google.osdetector' version '1.6.2'
id 'io.freefair.lombok' version '3.8.4'
id 'maven-publish'
}
group 'org.onedrive'
version '0.10.2'
compileJava {
sourceCompatibility = 1.7
targetCompatibility = 1.7
}
compileTestJava {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
repositories {
jcenter()
}
ext {
nettyVer = '4.1.38.Final'
jacksonVer = '2.10.0.pr1'
}
dependencies {
implementation "com.fasterxml.jackson.core:jackson-annotations:$jacksonVer"
implementation "com.fasterxml.jackson.core:jackson-core:$jacksonVer"
api "io.netty:netty-buffer:$nettyVer"
api "io.netty:netty-codec:$nettyVer"
api "io.netty:netty-codec-http:$nettyVer"
api "io.netty:netty-common:$nettyVer"
api "io.netty:netty-handler:$nettyVer"
api "io.netty:netty-resolver:$nettyVer"
api "io.netty:netty-transport:$nettyVer"
if (osdetector.os == 'linux') {
implementation "io.netty:netty-transport-native-epoll:4.+:${osdetector.classifier}"
}
else if (osdetector.os == 'osx' || osdetector.os.endsWith('bsd')) {
implementation "io.netty:netty-transport-native-kqueue:4.+:${osdetector.classifier}"
}
api 'org.jetbrains:annotations:+'
testCompile "com.fasterxml.jackson.core:jackson-databind:$jacksonVer"
testCompile 'org.junit.jupiter:junit-jupiter-api:5.+'
testRuntime 'org.junit.jupiter:junit-jupiter-engine:5.+'
}
test {
useJUnitPlatform()
}
javadoc {
if (JavaVersion.current() >= JavaVersion.VERSION_1_9) {
options.addBooleanOption('html5').setValue(true)
}
}
task sourcesJar(type: Jar) {
archiveClassifier = 'sources'
from sourceSets.main.allJava
}
task javadocJar(type: Jar) {
archiveClassifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives jar
archives sourcesJar
archives javadocJar
}
publishing {
publications {
myLibrary(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
}
}
repositories {
maven {
name = 'myRepo'
url = "file://${buildDir}/repo"
}
}
}