-
Notifications
You must be signed in to change notification settings - Fork 30
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
Jdt enhancements #23
Jdt enhancements #23
Conversation
ed85888
to
e4cd898
Compare
* } | ||
* } | ||
* ``` | ||
*/ | ||
public class ConventionJdt extends OomphConvention { | ||
final static String JDT_CORE_PREFS = ".metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs"; | ||
final static List<String> JDT_COMPLIANCE_PROPS = Collections.unmodifiableList(Arrays.asList("org.eclipse.jdt.core.compiler.codegen.targetPlatform", "org.eclipse.jdt.core.compiler.compliance", "org.eclipse.jdt.core.compiler.source")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good usecase for com.diffplug.common.collect.ImmutableList.of()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But it's fine as-is :) Is this about what you wanted to do? I've got some thoughts on a way to reorganize this, but don't wanna cause a conflict. Just lemme know when you're at a stopping point and I'll push it up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ImmutableList was the right way to go. I pushed the change in.
You're free to do your worst now. :)
When a DSL method gets called (e.g. compilerComplicanceLevel), ideally we would call extension.workspaceProp() or extension.addSetupAction() right there, immediately. That keeps everything local, so there are fewer places to debug. There are cases, such as installedJres, where you have aggregate several calls to a method into a single action. In that case, we can use the `close()` method to know that the user has finished calling methods, and we can now take our aggregated actions.
…y resolve the file. In a gradle DSL, anytime you want a File, you can do `project.file(Object input)` and it will give you a file. That way the input can be a File or a relative path, and gradle will resolve it to relative to the project.
I left my comments in the commit messages. Take a look, and lemme know if it looks alright to you. If it does, and I didn't break the CI, I'll merge it. Thanks for another great contribution!! You got other stuff coming down the pipe re: Goomph? |
Changes look good. #21 is the only thing I might look at, but I'm not real optimistic about getting to it until next week. |
Sounds good. |
Just added a few convenience methods to enhance the DSL.
Feedback welcome.