Skip to content

Commit 45de812

Browse files
Build optimizations (#1073)
* Build optimizations
1 parent f464116 commit 45de812

File tree

6 files changed

+25
-4
lines changed

6 files changed

+25
-4
lines changed

.github/workflows/build-docker-and-push.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
uses: gradle/actions/setup-gradle@v4
4343

4444
- name: Build with Gradle
45-
run: ./gradlew build -p web --build-cache --info
45+
run: ./gradlew build -p web --no-daemon --build-cache --info
4646

4747
- name: 'Login to GitHub Container Registry'
4848
uses: docker/login-action@v3

.github/workflows/build-template.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
- name: Build with Gradle
5454
run: |
5555
./gradlew ${{ inputs.gradle-targets }} ${{ inputs.gradle-args }} ${{ env.SONAR_TARGETS }} \
56-
--daemon --parallel --build-cache --info
56+
--no-daemon --parallel --build-cache --info
5757
5858
# - id: "auth"
5959
# name: Authenticate to Google Cloud

.github/workflows/on_deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
5555

5656
- name: Build with Gradle
57-
run: ./gradlew build -p web --build-cache --info
57+
run: ./gradlew build -p web --no-daemon --build-cache --info
5858

5959
- name: Authenticate to Google Cloud
6060
id: "auth"

build.gradle.kts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,22 @@ allprojects {
5050

5151
configure<KotlinJvmProjectExtension> {
5252
jvmToolchain(21)
53+
compilerOptions {
54+
freeCompilerArgs
55+
.addAll(
56+
"-Xjsr305=strict",
57+
"-Xannotation-default-target=param-property"
58+
)
59+
}
5360
}
5461

5562
tasks.withType<Test> {
5663
useJUnitPlatform()
57-
jvmArgs("-Xshare:off", "-XX:+EnableDynamicAgentLoading")
64+
jvmArgs(
65+
"-Xshare:off",
66+
"-XX:+EnableDynamicAgentLoading",
67+
"-Dkotest.framework.classpath.scanning.autoscan.disable=true"
68+
)
5869
}
5970

6071
tasks.withType<JacocoReport> {

konsoll/build.gradle.kts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,8 @@ dependencies {
1010
implementation(libs.picocli)
1111
runtimeOnly(libs.logback.classic)
1212
}
13+
14+
tasks.test {
15+
@Suppress("UNNECESSARY_SAFE_CALL")
16+
jvmArgs?.add("-Dkotest.framework.config.fqn=no.ssb.kostra.program.ProjectConfig")
17+
}

web/build.gradle.kts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ micronaut {
4444
}
4545
}
4646

47+
tasks.test {
48+
@Suppress("UNNECESSARY_SAFE_CALL")
49+
jvmArgs?.add("-Dkotest.framework.config.fqn=no.ssb.kostra.web.ProjectConfig")
50+
}
51+
4752
tasks.register<Copy>("processFrontendResources") {
4853
val backendTargetDir = project.layout.buildDirectory.dir("resources/main/static")
4954
val frontendBuildDir =

0 commit comments

Comments
 (0)