Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JBake task doesn't clean stale outputs #55

Open
lacasseio opened this issue Jun 26, 2020 · 1 comment
Open

JBake task doesn't clean stale outputs #55

lacasseio opened this issue Jun 26, 2020 · 1 comment

Comments

@lacasseio
Copy link
Contributor

If input files are removed, the matching output files aren't removed. It's possible to work around the issue but I believe the bake task should take care of the cleaning to enhance the experience for all users. Using incremental change API, it should be easy to match removed files and delete them from the output folder.

The API is marked as introduced in Gradle 5.4.

@lacasseio
Copy link
Contributor Author

For context, the workaround is:

// Delete baked output before baking
allprojects {
	pluginManager.withPlugin('org.jbake.site') {
		tasks.named('bake', JBakeTask) {
			doFirst {
				output.deleteDir()
				output.mkdirs()
			}
		}
	}
}

Using the InputChanges API would be much better.

lacasseio added a commit to nokeedev/docs.nokee.dev that referenced this issue Jun 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant