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

Write configuration to IPR file as well as .idea to avoid errors in legacy projects #810

Merged
merged 2 commits into from
Nov 11, 2022

Conversation

jackwickham
Copy link
Contributor

Before this PR

If a project was previously imported from an IPR file (such as that generated by ./gradlew idea), but later migrated to using the gradle integration, the project configuration is still stored in the {rootProject}.ipr file, not in the .idea directory. However, the PJF gradle plugin only updates the IPR file when running ./gradlew idea - when importing a gradle project it only writes to the .idea directory.

This means that intellij tries to use whichever version of PJF was in use when the project was migrated to gradle, which may not even exist on disk any more, causing errors whenever it tries to run.

After this PR

==COMMIT_MSG==
Write configuration to IPR file if it exists, as well as the .idea directory, to avoid errors in legacy projects
==COMMIT_MSG==

Possible downsides?

Maybe we should just migrate the legacy .ipr projects to using the .idea format? But I don't know that it's automatable, and probably isn't the responsibility of this plugin anyway.

@changelog-app
Copy link

changelog-app bot commented Nov 11, 2022

Generate changelog in changelog/@unreleased

Type

  • Feature
  • Improvement
  • Fix
  • Break
  • Deprecation
  • Manual task
  • Migration

Description

Write configuration to IPR file if it exists, as well as the .idea directory, to avoid errors in legacy projects

Check the box to generate changelog(s)

  • Generate changelog entry

@CRogers
Copy link
Contributor

CRogers commented Nov 11, 2022

👍

@bulldozer-bot bulldozer-bot bot merged commit 7e9ac21 into develop Nov 11, 2022
@bulldozer-bot bulldozer-bot bot deleted the jw/ipr-support branch November 11, 2022 14:47
@svc-autorelease
Copy link
Collaborator

Released 2.28.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants