Skip to content

Commit

Permalink
Disable native image compilation because too many things rely on refl…
Browse files Browse the repository at this point in the history
…ection, update dependencies.
  • Loading branch information
Isti01 committed Aug 30, 2024
1 parent 0624e5e commit 8227a3e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
17 changes: 8 additions & 9 deletions backend/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
plugins {
kotlin("jvm") version "1.9.24"
kotlin("plugin.spring") version "1.9.24"
id("org.springframework.boot") version "3.3.2"
kotlin("jvm") version "2.0.20"
kotlin("plugin.spring") version "2.0.20"
id("org.springframework.boot") version "3.3.3"
id("io.spring.dependency-management") version "1.1.6"
id("org.graalvm.buildtools.native") version "0.10.2"
}

group = "hu.bme.sch"
version = "1.0.0"
version = "1.0.1"

java {
toolchain {
Expand All @@ -25,7 +24,7 @@ repositories {
mavenCentral()
}

extra["springModulithVersion"] = "1.2.1"
extra["springModulithVersion"] = "1.2.3"

dependencies {
implementation("org.springframework.boot:spring-boot-starter-data-jdbc")
Expand Down Expand Up @@ -57,8 +56,8 @@ kotlin {
}

tasks.getByName<org.springframework.boot.gradle.tasks.bundling.BootBuildImage>("bootBuildImage") {
environment.put(
"BP_NATIVE_IMAGE_BUILD_ARGUMENTS",
"${environment.get()["BP_NATIVE_IMAGE_BUILD_ARGUMENTS"] ?: ""} -march=compatibility"
environment = mapOf(
"BP_NATIVE_IMAGE" to "false",
"BP_JVM_VERSION" to java.toolchain.languageVersion.get().asInt().toString()
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,15 @@ class PrincipalAuthenticationDetailsManager(
}


private fun validateText(username: String?, message: String) {
private final fun validateText(username: String?, message: String) {
contract {
returns() implies (username != null)
}
if (username.isNullOrBlank()) throw IllegalArgumentException(message)
}


private fun validateUser(user: UserDetails?, message: String) {
private final fun validateUser(user: UserDetails?, message: String) {
contract {
returns() implies (user != null)
}
Expand Down

0 comments on commit 8227a3e

Please sign in to comment.