Skip to content

Commit

Permalink
Update to Java 21 & Replace depricated buildDir
Browse files Browse the repository at this point in the history
  • Loading branch information
LukBelter committed Jul 30, 2024
1 parent 956490d commit c8e0091
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ nexusPublishing {

tasks.withType(KotlinCompile::class).all {
kotlinOptions {
jvmTarget = "17"
jvmTarget = "21"
}
}
2 changes: 1 addition & 1 deletion buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ dependencies {

tasks.withType<KotlinCompile> {
kotlinOptions {
jvmTarget = "17"
jvmTarget = "21"
}
}
4 changes: 2 additions & 2 deletions buildSrc/src/main/kotlin/org.openbase.bco.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ group = "org.openbase"
val releaseVersion = !version.toString().endsWith("-SNAPSHOT")

java {
sourceCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = sourceCompatibility
withSourcesJar()
withJavadocJar()
Expand All @@ -45,7 +45,7 @@ dependencies {
tasks.withType<KotlinCompile> {
kotlinOptions {
freeCompilerArgs = listOf("-Xjsr305=strict")
jvmTarget = "17"
jvmTarget = "21"
}
}

Expand Down
4 changes: 2 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Install dependencies
FROM eclipse-temurin:17-jdk AS builder
FROM eclipse-temurin:21-jdk AS builder

ENV \
JAVA_OPTS="" \
Expand Down Expand Up @@ -38,7 +38,7 @@ RUN cd lib/jul && \
RUN ./gradlew :bco.app.util:installDist -x test -x javadoc --no-daemon --stacktrace

# Switch to baseline image
FROM eclipse-temurin:17-jre
FROM eclipse-temurin:21-jre

# # Install app
COPY --from=builder /workspace/module/app/util/build/install/bco/bin /usr/bin/
Expand Down
6 changes: 3 additions & 3 deletions module/app/util/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ fun createAdditionalScript(name: String, configureStartScripts: CreateStartScrip
tasks.register<CreateStartScripts>("startScripts$name") {
configureStartScripts()
applicationName = name
outputDir = File(project.buildDir, "scripts")
outputDir = File(project.layout.buildDirectory.get().asFile, "scripts")
classpath = tasks.getByName("jar").outputs.files + configurations.runtimeClasspath.get()
}.also {
application.applicationDistribution.into("bin") {
Expand Down Expand Up @@ -117,7 +117,7 @@ tasks.register("deploy-bco-dist") {
dependsOn("installDist")
val bcoDist = System.getenv("BCO_DIST") ?: "${System.getenv("HOME")}/usr"
val mainDist = distributions.getByName("main").distributionBaseName.get()
val fromDir = File(project.buildDir, "install/$mainDist")
val fromDir = File(project.layout.buildDirectory.get().asFile, "install/$mainDist")
doFirst {
copy {
from(fromDir)
Expand Down Expand Up @@ -148,7 +148,7 @@ tasks.register("testDeploy") {
//println("Copy to ${System.getenv("HOME")}/local/bco_tmp")
//println("BCO_DIST: ${BCO_DIST}")
copy {
from(File(project.buildDir, "install/bco-test"))
from(File(project.layout.buildDirectory.get().asFile, "install/bco-test"))
into("${System.getenv("HOME")}/local/bco_tmp")
}
}

0 comments on commit c8e0091

Please sign in to comment.