Skip to content

Commit

Permalink
fix build path
Browse files Browse the repository at this point in the history
  • Loading branch information
Robothy committed Sep 1, 2024
1 parent 29c29db commit 5e97216
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion buildSrc/src/main/groovy/local-s3.publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ publishing {


task delombok(type: DelombokTask, dependsOn: compileJava) {
ext.outputDir = file("${project.layout.buildDirectory}/delombok")
ext.outputDir = project.layout.buildDirectory.dir("/delombok").get()
outputs.dir(outputDir)
sourceSets.main.java.srcDirs.each {
inputs.dir(it)
Expand Down
14 changes: 7 additions & 7 deletions local-s3-docker/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ tasks.register('collectReachabilityMetadata', JavaExec) {

outputs.cacheIf { true }

inputs.file("${project.layout.buildDirectory}/libs/s3.jar")
inputs.file("${project.layout.buildDirectory.get()}/libs/s3.jar")
.withPropertyName("jar")
.withPathSensitivity(PathSensitivity.RELATIVE)

outputs.dir(file("${project.layout.buildDirectory}/reachability-metadata"))
outputs.dir(file("${project.layout.buildDirectory.get()}/reachability-metadata"))
.withPropertyName("reachability-metadata")

mainClass.set('com.robothy.s3.docker.ReachabilityMetadataGenerator')
Expand All @@ -48,20 +48,20 @@ tasks.register('buildGraalVMNativeImage', Exec) {
dependsOn('collectReachabilityMetadata')

outputs.cacheIf { true }
inputs.dir(file("${project.layout.buildDirectory}/reachability-metadata"))
inputs.dir(project.layout.buildDirectory.dir("/reachability-metadata"))
.withPropertyName("reachability-metadata")
.withPathSensitivity(PathSensitivity.RELATIVE)
inputs.file("${project.layout.buildDirectory}/libs/s3.jar")
inputs.file(project.layout.buildDirectory.file("/libs/s3.jar"))
.withPropertyName("jar")
.withPathSensitivity(PathSensitivity.RELATIVE)
outputs.file("${project.layout.buildDirectory}/bin/s3")
outputs.file(project.layout.buildDirectory.file("/bin/s3"))
.withPropertyName("s3-native-image")

doFirst {
var cmd = new ArrayList(executor)
var buildCmd = """docker run --rm \
-v ${project.projectDir}:/project \
-v ${project.layout.buildDirectory}/bin:/app \
-v ${project.layout.buildDirectory.get().asFile}/bin:/app \
ghcr.io/graalvm/native-image:ol9-java17-22.3.0 \
-jar /project/build/libs/s3.jar \
--initialize-at-build-time=ch.qos.logback,org.slf4j \
Expand All @@ -79,7 +79,7 @@ tasks.register('buildGraalVMNativeBasedDockerImage', Exec) {

outputs.cacheIf { true }

inputs.file("${project.layout.buildDirectory}/bin/s3")
inputs.file(project.layout.buildDirectory.file("/bin/s3"))
.withPropertyName("s3-native-image")
.withPathSensitivity(PathSensitivity.RELATIVE)

Expand Down

0 comments on commit 5e97216

Please sign in to comment.