Hey there! I'm struggling to deploy a spring boot (kotlin) application on Railway via GitHub. Curre...
m
Hey there! I'm struggling to deploy a spring boot (kotlin) application on Railway via GitHub. Current build.gradle.kts:
Copy code
plugins {
    kotlin("jvm") version "1.9.25"
    kotlin("plugin.spring") version "1.9.25"
    kotlin("plugin.jpa") version "2.0.21"
    id("org.springframework.boot") version "3.5.7"
    id("io.spring.dependency-management") version "1.1.7"
}

group = "eu.project"
version = "0.0.1-SNAPSHOT"
description = "Demo project for Spring Boot"

java {
    toolchain {
        languageVersion.set(JavaLanguageVersion.of(17))
    }
}

repositories {
    mavenCentral()
}

dependencies {...}

kotlin {
    compilerOptions {
        freeCompilerArgs.addAll("-Xjsr305=strict")
    }
}

tasks.withType<Test> {
    useJUnitPlatform()
}

tasks.withType<JavaCompile> {
    options.release.set(17)
}
The error from build logs: Build failed with an exception. • What went wrong:
Could not determine the dependencies of task ':compileKotlin'.
Cannot find a Java installation on your machine (Linux 6.1.0-37-cloud-amd64 amd64) matching: {languageVersion=17, vendor=any vendor, implementation=vendor-specific, nativeImageCapable=false}. Toolchain download repositories have not been configured. What's the issue? I used to deploy another spring boot app the same way c.a. three months ago and everything was fine.
j
You're configured your build to require Java 17, but there is no Java 17 installed that it could find