Skip to content

Commit f885229

Browse files
fix: depend on classpath to sync context (#33)
1 parent 077d775 commit f885229

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

hypertrace-gradle-docker-java-application-plugin/CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,12 @@
5151

5252
- Add support for exposing multiple docker image ports via `ports` config
5353

54-
## [0.9.6]
54+
## [0.9.7]
5555

5656
- Improve docker layering by splitting libraries into 3 layers. From the top down:
5757
- Local libraries being built as part of the target gradle build
5858
- Organization libraries that satisfy the `orgLibrarySpec` property on the `javaApplication`
5959
spec as documented in the README, but do not satisfy the local library criteria.
6060
- External libraries, presumed to be any library that does not meet the criteria of either of
61-
the above layers.
61+
the above layers.
62+
- First appeared in 0.9.5, but bugs prevent correct execution until 0.9.7

hypertrace-gradle-docker-java-application-plugin/src/main/java/org/hypertrace/gradle/docker/HypertraceDockerJavaApplicationPlugin.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,8 @@ void createDockerfileTask(Project project, HypertraceDockerJavaApplication javaA
154154
private void createDockerStartScriptTask(Project project) {
155155
project.getTasks()
156156
.register(DOCKER_START_SCRIPT_TASK_NAME, CreateStartScripts.class, startScript -> {
157-
startScript.getInputs().file(this.getStartScriptTemplate(project));
157+
startScript.getInputs()
158+
.file(this.getStartScriptTemplate(project));
158159
((TemplateBasedScriptGenerator) startScript.getUnixStartScriptGenerator()).setTemplate(this.getStartScriptTemplate(project));
159160
startScript.setGroup(DockerPlugin.TASK_GROUP);
160161
startScript.setDescription("Creates a startup script for use by the docker container");
@@ -178,7 +179,7 @@ private void createDockerStartScriptTask(Project project) {
178179
private void createContextSyncTask(Project project) {
179180
project.getTasks()
180181
.register(SYNC_BUILD_CONTEXT_TASK_NAME, Sync.class, sync -> {
181-
sync.dependsOn(CLASSES_TASK_NAME);
182+
sync.dependsOn(CLASSES_TASK_NAME, this.getRuntimeClasspath(project));
182183
sync.setGroup(DockerPlugin.TASK_GROUP);
183184
sync.setDescription("Copies required artifacts into the build context directory");
184185
sync.into(this.getDockerfileTask(project)

0 commit comments

Comments
 (0)