Skip to content

Commit 7ffdb47

Browse files
committed
feat: use Java 25
1 parent d7c99aa commit 7ffdb47

File tree

5 files changed

+94
-49
lines changed

5 files changed

+94
-49
lines changed

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
uses: actions/setup-java@v3
6464
with:
6565
distribution: 'temurin'
66-
java-version: 24
66+
java-version: 25
6767

6868
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
6969
# If this step fails, then you should remove it and run the build manually (see below)

backend/build.gradle

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ version = '0.0.1-SNAPSHOT'
2121

2222
java {
2323
toolchain {
24-
languageVersion = JavaLanguageVersion.of(24)
24+
languageVersion = JavaLanguageVersion.of(25)
2525
}
2626
}
2727

@@ -49,7 +49,7 @@ dependencies {
4949
implementation 'org.springframework.ai:spring-ai-starter-model-ollama'
5050
testImplementation 'org.springframework.boot:spring-boot-starter-test'
5151
testImplementation 'org.springframework.security:spring-security-test'
52-
testImplementation 'com.tngtech.archunit:archunit-junit5:1.4.0'
52+
testImplementation 'com.tngtech.archunit:archunit-junit5:1.4.1'
5353
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
5454
}
5555

@@ -60,3 +60,17 @@ bootJar {
6060
tasks.named('test') {
6161
useJUnitPlatform()
6262
}
63+
64+
// Ensure backend tasks wait for frontend
65+
66+
tasks.named('processResources') {
67+
dependsOn(':frontend:buildAngular')
68+
}
69+
70+
tasks.named('classes') {
71+
dependsOn(':frontend:buildAngular')
72+
}
73+
74+
tasks.named('bootJar') {
75+
dependsOn(':frontend:buildAngular')
76+
}

frontend/build.gradle

Lines changed: 75 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -11,58 +11,89 @@
1111
limitations under the License.
1212
*/
1313
plugins {
14-
id 'java'
14+
id 'java'
1515
}
1616

1717
group = 'ch.xxx'
1818
version = '0.0.1-SNAPSHOT'
1919

2020
task cleanAngular {
21-
if(project.hasProperty('withAngular')) {
22-
println('Task cleanAngular')
23-
delete('src/angular/node_modules')
24-
}
21+
onlyIf {
22+
project.hasProperty('withAngular')
23+
}
24+
doLast {
25+
println('Task cleanAngular')
26+
delete('src/angular/node_modules')
27+
}
28+
}
29+
30+
task cleanDist {
31+
onlyIf {
32+
project.hasProperty('withAngular')
33+
}
34+
doLast {
35+
delete('src/angular/dist')
36+
}
37+
}
38+
39+
task createDist {
40+
onlyIf {
41+
project.hasProperty('withAngular')
42+
}
43+
doLast {
44+
mkdir('src/angular/dist')
45+
}
46+
}
47+
48+
task npmInstall(type: Exec) {
49+
onlyIf {
50+
project.hasProperty('withAngular')
51+
}
52+
workingDir = file('src/angular')
53+
if (System.getProperty("os.name").toUpperCase().contains("WINDOWS")){
54+
commandLine 'npm.cmd', 'install'
55+
} else {
56+
commandLine 'npm', 'install'
57+
}
58+
dependsOn cleanAngular
59+
}
60+
61+
task npmBuild(type: Exec) {
62+
onlyIf {
63+
project.hasProperty('withAngular')
64+
}
65+
workingDir = file('src/angular')
66+
if (System.getProperty("os.name").toUpperCase().contains("WINDOWS")){
67+
commandLine 'npm.cmd', 'run', 'build'
68+
} else {
69+
commandLine 'npm', 'run', 'build'
70+
}
71+
dependsOn npmInstall, cleanDist, createDist
72+
}
73+
74+
task testAngular(type: Exec) {
75+
onlyIf {
76+
project.hasProperty('withAngular')
77+
}
78+
workingDir = file('src/angular')
79+
if (System.getProperty("os.name").toUpperCase().contains("WINDOWS")){
80+
commandLine 'npm.cmd', 'run', 'test'
81+
} else {
82+
if(project.hasProperty("useChromium")) {
83+
commandLine 'npm', 'run', 'test-chromium'
84+
} else {
85+
commandLine 'npm', 'run', 'test'
86+
}
87+
}
88+
dependsOn npmInstall
89+
doFirst {
90+
println("Running ${commandLine.join(' ')}")
91+
}
2592
}
2693

2794
task buildAngular {
28-
if(project.hasProperty('withAngular')) {
29-
exec {
30-
println('Task buildAngular - npm install')
31-
workingDir 'src/angular'
32-
if (System.getProperty("os.name").toUpperCase().contains("WINDOWS")){
33-
commandLine('npm.cmd', 'install')
34-
} else {
35-
commandLine('npm', 'install')
36-
}
37-
}
38-
exec {
39-
println('Task buildAngular - npm run build')
40-
workingDir 'src/angular'
41-
if (System.getProperty("os.name").toUpperCase().contains("WINDOWS")){
42-
commandLine('npm.cmd', 'run', 'build')
43-
} else {
44-
commandLine('npm', 'run', 'build')
45-
}
46-
}
47-
}
95+
dependsOn npmBuild, testAngular
4896
}
4997

50-
task testAngular {
51-
if(project.hasProperty('withAngular')) {
52-
exec {
53-
workingDir 'src/angular'
54-
if (System.getProperty("os.name").toUpperCase().contains("WINDOWS")){
55-
println('Task buildAngular - npm run test')
56-
commandLine('npm.cmd', 'run', 'test')
57-
} else {
58-
if(project.hasProperty("useChromium")) {
59-
println('Task buildAngular - npm run test-chromium')
60-
commandLine('npm', 'run', 'test-chromium')
61-
} else {
62-
logger.info('Task buildAngular - npm run test')
63-
commandLine('npm', 'run', 'test')
64-
}
65-
}
66-
}
67-
}
68-
}
98+
// Make sure the main build task depends on buildAngular
99+
build.dependsOn buildAngular

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

mcp-server/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ version = '0.0.1-SNAPSHOT'
2121

2222
java {
2323
toolchain {
24-
languageVersion = JavaLanguageVersion.of(24)
24+
languageVersion = JavaLanguageVersion.of(25)
2525
}
2626
}
2727

0 commit comments

Comments
 (0)