-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbuild.gradle
More file actions
92 lines (78 loc) · 2.75 KB
/
Copy pathbuild.gradle
File metadata and controls
92 lines (78 loc) · 2.75 KB
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
plugins {
id 'java'
}
group = 'team.terrafirmgreg'
version = project.findProperty('site_version') ?: '1.0.0'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
repositories {
mavenCentral()
}
dependencies {
implementation 'com.google.code.gson:gson:2.13.1'
implementation 'com.google.guava:guava:32.1.2-jre'
implementation 'org.apache.commons:commons-lang3:3.18.0'
implementation 'org.slf4j:slf4j-api:1.7.36'
implementation 'info.picocli:picocli:4.7.1'
implementation 'commons-io:commons-io:2.20.0'
implementation 'org.freemarker:freemarker:2.3.32'
implementation 'ch.qos.logback:logback-classic:1.5.13'
compileOnly 'org.projectlombok:lombok:1.18.38'
annotationProcessor 'org.projectlombok:lombok:1.18.38'
testImplementation 'org.junit.jupiter:junit-jupiter:5.10.2'
testCompileOnly 'org.projectlombok:lombok:1.18.38'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.38'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
}
test {
workingDir = projectDir
useJUnitPlatform()
testLogging {
events 'passed', 'skipped', 'failed'
showExceptions = true
exceptionFormat = 'full'
}
reports.html.required = false
}
tasks.named('processResources') {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
from('assets/lang') {
into 'assets/lang'
}
}
tasks.named('processTestResources') {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
from('assets/lang') {
into 'assets/lang'
}
}
tasks.register('writeExportLanguagesFile', JavaExec) {
group = 'field guide'
description = 'Write export locale codes from Language enum to build/export-languages.txt (CI → -Dfieldguide.exportLanguages)'
classpath = sourceSets.main.runtimeClasspath
mainClass = 'team.terrafirmgreg.fieldguide.localization.ExportLanguages'
args = [layout.buildDirectory.file('export-languages.txt').get().asFile.absolutePath]
}
tasks.register('printExportLanguages', JavaExec) {
group = 'field guide'
description = 'Print comma-separated export locale codes from Language enum'
classpath = sourceSets.main.runtimeClasspath
mainClass = 'team.terrafirmgreg.fieldguide.localization.ExportLanguages'
}
jar {
archiveBaseName = 'field-guide-site'
manifest {
attributes('Main-Class': 'team.terrafirmgreg.fieldguide.site.SiteGenerator')
}
dependsOn configurations.runtimeClasspath
from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}