-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
121 lines (103 loc) · 3.42 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
plugins {
id 'java'
// id 'jacoco'
// id 'org.barfuin.gradle.jacocolog' version '1.0.1'
id 'application'
}
group 'com.cpt'
version '1.0-SNAPSHOT'
sourceCompatibility = "17"
targetCompatibility = "17"
ext {
PACKAGE_USER = System.getenv("PACKAGES_USER")
PACKAGE_TOKEN = System.getenv("PACKAGES_TOKEN")
}
repositories {
mavenCentral()
maven {
url = 'https://maven.pkg.github.com/ChrisTopping/tensor'
credentials {
username PACKAGES_USER
password PACKAGES_TOKEN
}
}
}
sourceSets {
integrationTest {
java {
compileClasspath += main.output + test.output
runtimeClasspath += main.output + test.output
srcDir file('src/it/java')
}
}
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
integrationTestImplementation.extendsFrom testImplementation
integrationTestRuntimeOnly.extendsFrom testRuntimeOnly
}
dependencies {
implementation group: 'dev.christopping', name: 'tensor', version: '1.0.5'
implementation group: 'org.reflections', name: 'reflections', version: '0.10.2'
implementation 'org.projectlombok:lombok:1.18.26'
compileOnly 'org.projectlombok:lombok:1.18.26'
implementation group: 'com.google.guava', name: 'guava', version: '31.0.1-jre'
implementation group: 'com.diogonunes', name: 'JColor', version: '5.2.0'
implementation group: 'org.slf4j', name: 'slf4j-api', version: '1.8.0-beta4'
implementation group: 'org.slf4j', name: 'slf4j-nop', version: '1.8.0-beta4'
implementation group: 'com.squareup.okhttp3', name: 'okhttp', version: '4.10.0'
implementation group: 'org.jsoup', name: 'jsoup', version: '1.17.1'
implementation group: 'io.github.cdimascio', name: 'java-dotenv', version: '5.2.2'
annotationProcessor 'org.projectlombok:lombok:1.18.26'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.2'
testCompileOnly 'org.projectlombok:lombok:1.18.26'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.2'
testImplementation group: 'org.assertj', name: 'assertj-core', version: '3.21.0'
}
test {
useJUnitPlatform()
// finalizedBy jacocoTestReport
}
task integrationTest(type: Test) {
useJUnitPlatform()
description = 'Run integration tests.'
check.dependsOn(integrationTest)
group = 'verification'
testClassesDirs = sourceSets.integrationTest.output.classesDirs
classpath = sourceSets.integrationTest.runtimeClasspath
shouldRunAfter test
}
check.dependsOn integrationTest
//jacoco {
// toolVersion = "0.8.7"
//}
//jacocoTestReport {
// dependsOn test
// reports {
// xml.required = true
// csv.required = false
// html.outputLocation = layout.buildDirectory.dir('jacoco')
// }
//}
application {
mainClass = 'com.cpt.adventofcode.SolverRunner'
description = 'Advent of Code Solver'
}
task generate(type: JavaExec) {
group = "Execution"
description = "Generate a new solution"
classpath = sourceSets.main.runtimeClasspath
mainClass = "com.cpt.adventofcode.GeneratorRunner"
standardInput = System.in
standardOutput = System.out
}
task scrape(type: JavaExec) {
group = "Execution"
description = "Generate a new solution by scraping adventofcode"
classpath = sourceSets.main.runtimeClasspath
mainClass = "com.cpt.adventofcode.ScraperRunner"
standardInput = System.in
standardOutput = System.out
}