-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
92 lines (80 loc) · 3.38 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
92 lines (80 loc) · 3.38 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
import org.springframework.boot.gradle.plugin.SpringBootPlugin
plugins {
java
id("org.springframework.boot") version "4.1.0"
// The Storm plugin imports the BOM, adds storm-java21 and storm-core, wires the
// metamodel annotation processor, and enables the preview flags that Storm's Java
// String Templates (JEP 430) require on compile, test, and run (BootRun included).
id("st.orm") version "1.13.0"
}
group = "st.orm.demo"
version = "1.0.0"
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
repositories {
// mavenLocal first so locally built Storm versions (not yet on Central)
// resolve during development against the framework.
mavenLocal()
mavenCentral()
}
dependencies {
implementation(platform(SpringBootPlugin.BOM_COORDINATES))
implementation("org.springframework.boot:spring-boot-starter-webmvc")
implementation("org.springframework.boot:spring-boot-starter-thymeleaf")
implementation("org.springframework.boot:spring-boot-starter-jdbc")
implementation("org.springframework.boot:spring-boot-starter-flyway")
implementation("org.springframework.boot:spring-boot-starter-actuator")
// Tracer for the trace-context SQL comments; spans stay local without an exporter.
implementation("io.micrometer:micrometer-tracing-bridge-otel")
implementation("st.orm:storm-spring-boot-starter")
implementation("st.orm:storm-jackson3")
runtimeOnly("st.orm:storm-postgresql")
runtimeOnly("org.postgresql:postgresql")
runtimeOnly("org.flywaydb:flyway-database-postgresql")
testImplementation(platform("org.junit:junit-bom:5.11.4"))
testImplementation("org.junit.jupiter:junit-jupiter")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
testImplementation("st.orm:storm-test")
testImplementation("st.orm:storm-spring-boot-test-autoconfigure")
testImplementation("org.springframework.boot:spring-boot-starter-test")
testRuntimeOnly("st.orm:storm-h2")
testRuntimeOnly("com.h2database:h2:2.3.232")
testImplementation("com.microsoft.playwright:playwright:1.61.0")
}
// Storm's Java API is built on JDK String Templates (JEP 430), a Java 21
// preview feature — the toolchain is pinned to Java 21 above, and the Storm
// plugin enables preview features for every compile, test, and run task.
tasks.withType<Test>().configureEach {
testLogging {
events("passed", "failed", "skipped")
showStandardStreams = true
}
}
tasks.test {
useJUnitPlatform {
excludeTags("e2e")
}
}
// Playwright interface tests run against the live application: start the
// app (./gradlew bootRun), then run ./gradlew e2eTest.
tasks.register<Test>("e2eTest") {
description = "Runs Playwright interface tests against the running application."
group = "verification"
useJUnitPlatform {
includeTags("e2e")
}
testClassesDirs = sourceSets["test"].output.classesDirs
classpath = sourceSets["test"].runtimeClasspath
systemProperty("app.baseUrl", System.getProperty("app.baseUrl") ?: "http://localhost:8080")
outputs.upToDateWhen { false }
}
tasks.register<JavaExec>("installPlaywrightBrowsers") {
description = "Downloads the Chromium browser used by the Playwright tests."
group = "verification"
classpath = sourceSets["test"].runtimeClasspath
mainClass = "com.microsoft.playwright.CLI"
args("install", "chromium")
}