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

Settings plugin and IDEA #297

Closed
dmurat opened this issue May 6, 2020 · 10 comments
Closed

Settings plugin and IDEA #297

dmurat opened this issue May 6, 2020 · 10 comments
Assignees
Labels
question Further information is requested
Milestone

Comments

@dmurat
Copy link

dmurat commented May 6, 2020

I applied the settings plugin on a nested project structure. And it works as expected. Unfortunately, IDEA displays a suffix for nested projects with qualified project names. This is very distracting for me (old habits, I guess). So, I'm wondering if there is some way to make IDEA behave in a more unsurprising way.

Here is a screenshot of what I will like to have:

image

After applying the settings plugin I get the following:

image

Tnx

@dmurat
Copy link
Author

dmurat commented May 6, 2020

I forget to ask, why not use the native Gradle way of nesting projects with colon syntax (:subprojects:project1, etc)?

@aalmiray
Copy link
Collaborator

aalmiray commented May 6, 2020

Because it's shorter to type :project1:task than :subprojects:project1:task. It might not seen like much but the paths can get really long if you have a 3rd to nth level project structure. The disadvantage is of course that paths must be unique. There may be cases where conflicts may arise when subpaths are equal but their parent are not. In which case perhaps adding a flag to regain the default behavior would be a good idea.

@aalmiray
Copy link
Collaborator

aalmiray commented May 6, 2020

Do note that on your first screenshot, subprojects is treated as a project. You can verify this by invoking gradle projects, also because that folder has bold font in IntelliJ.

@dmurat
Copy link
Author

dmurat commented May 6, 2020

Yes, I'm aware of this and did make some adjustments in a build script to work around this. If I can choose, I will still rather use that kind of setup since I rarely execute commands on subprojects directly. Unfortunately, with kordamp I cannot have that kind of layout and those nice kordamp aggregate reports.

To be fair, after an hour, IDEA's module name rendering bothers me less, but I don't believe that at least some of my coworkers will be easily convinced :-)

Btw, I'm not quite sure, but it looks like that Gradle renders these module names, and IDEA just displays them.

@dmurat
Copy link
Author

dmurat commented May 6, 2020

I found an option in IDEA for configuring qualified names of the module. There are some complicated methods through UI (https://www.jetbrains.com/help/idea/creating-and-managing-modules.html#), but I found it much easier to set <option name="useQualifiedModuleNames" value="false" /> in .idea/gradle.xml. What a relief 😄

@aalmiray
Copy link
Collaborator

aalmiray commented May 6, 2020

OK, so there's a fix for the module name in IDEA. I've got a fix for the long paths as well.

@aalmiray aalmiray added the question Further information is requested label May 6, 2020
@aalmiray aalmiray self-assigned this May 6, 2020
@aalmiray aalmiray added this to the 0.36.0 milestone May 6, 2020
@dmurat
Copy link
Author

dmurat commented May 6, 2020

Now with module names resolved, I kinda like kordamp short version 😃 . It simplifies my build script somewhat, containing directory is not rendered in bold since it is not a real module, and all aggregate reports are working. Great.

@aalmiray
Copy link
Collaborator

aalmiray commented May 6, 2020

Good. I sill think it's a good idea to keep the long paths option albeit disabled by default. Long live short project paths!

@aalmiray
Copy link
Collaborator

aalmiray commented May 8, 2020

Is there something else that needs to be done for this issue?

@dmurat
Copy link
Author

dmurat commented May 8, 2020

No. Tnx for the effort. I will close it now.

@dmurat dmurat closed this as completed May 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants