-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
65 lines (52 loc) · 1.67 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
plugins {
id "application"
}
apply plugin : "java"
java {
toolchain {
languageVersion = JavaLanguageVersion.of(15)
}
}
javadoc {
source = sourceSets.main.allJava
destinationDir = reporting.file("$project.projectDir/docs")
}
group 'com.example'
version '1.0-SNAPSHOT'
ext {
javaMainClass = "com.example.ContinuousIntegrationServer"
toolingApiVersion = gradle.gradleVersion
}
application {
mainClassName = javaMainClass
}
repositories {
mavenCentral()
maven { url 'https://repo.gradle.org/gradle/libs-releases' }
}
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.2'
implementation 'javax.servlet:javax.servlet-api:4.0.1'
implementation 'org.eclipse.jetty:jetty-server:11.0.6'
implementation 'com.google.code.gson:gson:2.8.9'
implementation 'org.eclipse.jgit:org.eclipse.jgit:6.0.0.202111291000-r'
implementation 'commons-io:commons-io:2.11.0'
implementation "org.gradle:gradle-tooling-api:$toolingApiVersion"
// The tooling API need an SLF4J implementation available at runtime
runtimeOnly 'org.slf4j:slf4j-simple:1.7.35'
implementation 'org.xerial:sqlite-jdbc:3.36.0.3'
}
run.doFirst {
def jsonFile = file('./conf.json')
def parsedJson = new groovy.json.JsonSlurper().parseText(jsonFile.text)
environment('Token', parsedJson.token)
environment("PORT", parsedJson.port)
}
test {
def jsonFile = file('./conf.json')
def parsedJson = new groovy.json.JsonSlurper().parseText(jsonFile.text)
environment('Token', parsedJson.token)
environment("PORT", parsedJson.port)
useJUnitPlatform()
}