Skip to content
This repository was archived by the owner on Jun 14, 2024. It is now read-only.

Use sync instead of copy on the explodeWar task - #162

Merged
loosebazooka merged 1 commit into
GoogleCloudPlatform:masterfrom
int128:sync-on-explodewar
Sep 6, 2017
Merged

loosebazooka merged 1 commit into
GoogleCloudPlatform:masterfrom
int128:sync-on-explodewar

Conversation

@int128

@int128 int128 commented Sep 4, 2017

Copy link
Copy Markdown
Contributor

This pull request improves processing time and battery consumption for the explodeWar task by using sync task. Current implementation always copies all files (big JARs!) but this copies only modified files.

@loosebazooka

Copy link
Copy Markdown
Contributor

Interesting idea, we do like to clean the exploded app directory though. Does sync remove files in the destination that are NOT in the source?

@int128

int128 commented Sep 6, 2017

Copy link
Copy Markdown
Contributor Author

Yes, sync task removes files not in the source. For example, build/exploded-app/WEB-INF/classes/foo will be removed unless src/main/resources/foo exists.

This task is like the Copy task, except the destination directory will only contain the files copied. All files that exist in the destination directory will be deleted before copying files, unless a Sync.preserve(org.gradle.api.Action) is specified.

https://docs.gradle.org/current/dsl/org.gradle.api.tasks.Sync.html

@loosebazooka

Copy link
Copy Markdown
Contributor

Thanks @int128 for helping improve the codebase. I'll merge this in.

@loosebazooka
loosebazooka merged commit e135d7b into GoogleCloudPlatform:master Sep 6, 2017
@loosebazooka loosebazooka mentioned this pull request Sep 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants