-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.gradle
71 lines (56 loc) · 2.19 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
plugins {
// Apply the java plugin to add support for Java
id 'java'
// Apply the application plugin to add support for building an application
id 'application'
}
group 'cz.chovanecm.snow'
version '0.2.1-SNAPSHOT'
mainClassName = "cz.chovanecm.snow.ui.cli.CommandLineInterface"
description = "Utility to access ServiceNow scripts and download them."
sourceCompatibility = 1.14
targetCompatibility = 1.14
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
}
repositories {
mavenCentral()
}
dependencies {
implementation group: 'com.github.jsonj', name: 'jsonj', version: '0.8'
implementation 'com.google.code.gson:gson:2.8.9'
implementation group: 'commons-cli', name: 'commons-cli', version: '1.2'
implementation 'io.reactivex.rxjava3:rxjava:3.1.3'
implementation 'org.projectlombok:lombok:1.18.26'
annotationProcessor group: 'org.projectlombok', name: 'lombok', version: '1.18.28'
compileOnly group: 'org.projectlombok', name: 'lombok', version: '1.18.28'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.2.0'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-params', version: '5.2.0'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.2.0'
testImplementation "org.mockito:mockito-core:2.+"
}
test {
useJUnitPlatform()
}
apply plugin: 'idea'
tasks.register('setHttpProxyFromEnv') {
def map = ['HTTP_PROXY': 'http', 'HTTPS_PROXY': 'https']
//Change this if you need it
def proxy = [
"HTTP_PROXY" : "http://proxy.com:10123",
"HTTPS_PROXY": "http://proxy.com:10123"
]
def linuxProxy = System.getenv()
// and use the correct proxy profile here in the for loop
for (e in linuxProxy) {
def key = e.key.toUpperCase()
if (key in map) {
def base = map[key]
def url = e.value.toURL()
println " - systemProp.${base}.proxy=${url.host}:${url.port}"
System.setProperty("${base}.proxyHost", url.host.toString())
System.setProperty("${base}.proxyPort", url.port.toString())
}
}
}
build.dependsOn setHttpProxyFromEnv