-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.upload
108 lines (96 loc) · 3.47 KB
/
build.upload
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
apply from: 'build.shared'
apply plugin: 'maven'
apply plugin: 'signing'
apply plugin: 'checkstyle'
sourceCompatibility = 1.8
targetCompatibility = 1.8
compileJava {
String[] java8Paths = new String[9]
java8Paths[0] = "/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/"
java8Paths[1] = "/usr/lib/jvm/java-8-openjdk/jre/lib/"
java8Paths[2] = "/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/lib/"
java8Paths[3] = "/usr/lib/jvm/java-1.8.0-openjdk/jre/lib/"
java8Paths[4] = "/usr/lib/jvm/java-8-sun/jre/lib/"
java8Paths[5] = "/usr/lib/jvm/jdk1.8.0_122/jre/lib/"
java8Paths[6] = "/usr/lib/jvm/jdk1.8.0_65/jre/lib/"
java8Paths[7] = "/usr/lib/jvm/jdk1.8.0_45/jre/lib/"
java8Paths[8] = "/usr/lib/jvm/jdk1.8.0_20/jre/lib/"
for (String path : java8Paths) {
if (new java.io.File(path).exists()) {
println 'Using java 8: ' + path
options.bootstrapClasspath = fileTree(include: ['*.jar'], dir: path)
break
}
}
if (options.bootstrapClasspath == null) {
println 'Unable to find java 8 rt.jar, will cause failure so exiting now'
println ''
System.exit(1)
}
}
compileTestJava {
options.compilerArgs << "-Xlint:all" << "-Xlint:-deprecation" << "-Werror"
String[] java8Paths = new String[9]
java8Paths[0] = "/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/"
java8Paths[1] = "/usr/lib/jvm/java-8-openjdk/jre/lib/"
java8Paths[2] = "/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/lib/"
java8Paths[3] = "/usr/lib/jvm/java-1.8.0-openjdk/jre/lib/"
java8Paths[4] = "/usr/lib/jvm/java-8-sun/jre/lib/"
java8Paths[5] = "/usr/lib/jvm/jdk1.8.0_122/jre/lib/"
java8Paths[6] = "/usr/lib/jvm/jdk1.8.0_65/jre/lib/"
java8Paths[7] = "/usr/lib/jvm/jdk1.8.0_45/jre/lib/"
java8Paths[8] = "/usr/lib/jvm/jdk1.8.0_20/jre/lib/"
for (String path : java8Paths) {
if (new java.io.File(path).exists()) {
options.bootstrapClasspath = fileTree(include: ['*.jar'], dir: path)
break
}
}
}
signing {
sign configurations.archives
}
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment {
MavenDeployment deployment -> signing.signPom(deployment)
}
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: sonatypeUsername, password: sonatypePassword)
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots") {
authentication(userName: sonatypeUsername, password: sonatypePassword)
}
pom.project {
name 'LiteSockets'
packaging 'jar'
description 'A light weight socket library designed for highly concurrent applications. LiteSockets leverages threadly to make it easy to maintain concurrent connections while keeping threading on a per-client basis single threaded.'
url 'https://github.com/threadly/litesockets'
scm {
url 'scm:[email protected]:threadly/litesockets.git'
connection 'scm:[email protected]:threadly/litesockets.git'
developerConnection 'scm:[email protected]:threadly/litesockets.git'
}
licenses {
license {
name 'Mozilla Public License Version 2.0'
url 'https://www.mozilla.org/MPL/2.0/'
distribution 'repo'
}
}
developers {
developer {
id 'lwahlmeier'
name 'Luke Wahlmeier'
}
developer {
id 'jent'
name 'Mike Jensen'
email '[email protected]'
}
}
}
}
}
}