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

fix idea sync failing on composite builds, add support for composite builds #367

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

NikkyAI
Copy link
Collaborator

@NikkyAI NikkyAI commented Jun 5, 2021

🚀 Description

handles failure due to uninitialized versionPropertiesFile during idea sync

it does this by catching the exception and setting the description of task refrewshVersions to the most likely correct value

main project and included project will have seperate versions.properties
(although if they both are configured to point at the same file it might work?)

it also refactors RefreshVersionsConfigHolder usage
using the rootProject path as the key each uses their own RefresVersionsConfig instance
this avoids the parentProject writing to the included builds versions.properties

the only breaking change is for groovy code: versionFor needs to be passed the project to grab the correct config instance
(works out of the box as receiver in kotlin)
unless there is a way to make these functions have a receiver without breaking usage code ?

versionFor was moved into the extension versions, so that it can keep a reference to the correct config
the usage looks like so now:

version.versionFor("version.kotlin")

// alternative

versions {
	versionFor("version.kotlin")
}

it does not require imports in the buildscript anymore

📄 Motivation and Context

makes includeBuild not fail
this mainly fixes the idea sync failing and removing all tasks from the tool window

should unblock work on #205

🧪 How Has This Been Tested?

tested on idea ultimate on windows and linux
all sample projects pass checks and idea sync

📦 Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

✅ Checklist

@NikkyAI NikkyAI marked this pull request as ready for review June 7, 2021 05:49
@LouisCAD
Copy link
Member

LouisCAD commented Jun 7, 2021

I've seen I broke something with Kotlin plugin version by trying to fix something, I'll fix it on the main branch first.

@LouisCAD
Copy link
Member

LouisCAD commented Jun 7, 2021

@NikkyAI I fixed what I broke on the main branch, you can undo the changes you did to work that around in this PR.

@NikkyAI
Copy link
Collaborator Author

NikkyAI commented Jun 7, 2021

@LouisCAD i reverted the commit, kepts the plugin alias so that tests do not fail, i will remove that in a future PR when i work on integrating parent and included builds more

@LouisCAD
Copy link
Member

LouisCAD commented Jun 7, 2021

If you merge latest main again, the issue will go away.

@NikkyAI
Copy link
Collaborator Author

NikkyAI commented Jun 7, 2021

further testing reveals this breaks in different ways.. still needs more testing

@LouisCAD LouisCAD self-requested a review June 8, 2021 11:27
@NikkyAI NikkyAI changed the title fix idea sync failing on composite builds fix idea sync failing on composite builds, add support for composite builds Jul 28, 2021
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.

2 participants