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

Issue #120 fix - set fork working dir to temp dir #142

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hesselapplications
Copy link

Fixes #120

By default gradle-execfork-plugin sets the working dir to the project directory. This causes issues when running generateOpenApiDocs during a gradle build:

Reason: Task ':skeleton-server:forkedSpringBootRun' uses this output of task ':skeleton-server:bootJarMainClassName' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.

Using a temporary directory instead of the project dir default resolves this

@@ -96,7 +96,7 @@ open class OpenApiGradlePlugin : Plugin<Project> {

// use original bootRun parameter if the list-type customBootRun properties are empty
workingDir = customBootRun.workingDir.asFile.orNull
?: fork.workingDir
?: fork.temporaryDir
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Successfully merging this pull request may close these issues.

Build fails when running the api generation during a publish task.
1 participant