-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle
More file actions
66 lines (54 loc) · 1.64 KB
/
build.gradle
File metadata and controls
66 lines (54 loc) · 1.64 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
plugins {
id 'java'
id 'war'
id 'org.springframework.boot' version '3.5.7'
id 'io.spring.dependency-management' version '1.1.7'
}
group = 'com.eriksandsten'
version = '0.0.1-SNAPSHOT'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(24)
}
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-webflux'
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'org.projectlombok:lombok'
implementation 'org.xerial:sqlite-jdbc'
implementation 'org.springframework.boot:spring-boot-starter-test'
implementation 'org.rocksdb:rocksdbjni:10.4.2'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}
tasks.named('test') {
useJUnitPlatform()
}
tasks.register('compileCSS', Exec) {
group = "Other"
description = "Compiles Sass CSS files"
onlyIf {
project.findProperty("springProfile") == "dev"
}
def cssDirectory = "$projectDir/src/main/resources/static/css/"
doFirst {
def oldCSSFile = file "$cssDirectory/style.css"
if (oldCSSFile.exists()) {
println "Deleting ${oldCSSFile}"
oldCSSFile.delete()
}
file(cssDirectory).mkdirs()
}
workingDir = file("$cssDirectory")
commandLine 'dart-sass', '--no-source-map', 'style.scss', 'style.css'
}
tasks.named('bootRun') {
dependsOn tasks.named('compileCSS')
}
tasks.named('build') {
dependsOn tasks.named('compileCSS')
}