-
Notifications
You must be signed in to change notification settings - Fork 441
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
Wip/autoplugins #374
Wip/autoplugins #374
Conversation
I'll be reviewing shortly (once I'm through the morning meetings). SUPER excited to see this, great work! |
val Rpm = rpm.RpmPlugin.Rpm | ||
val Windows = windows.WindowsPlugin.Windows | ||
|
||
val autoImport = packager.Keys |
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.
Hmm, this was a big question in my head when I initially tried to do this when 0.13.5 was released. Should we split the keys into different autoImports per-plugin or just have one glob? Practically it probably doesn't matter, but you could see the sbt-native-packager was designed to have them be separate objects.
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.
My vote = different autoImports per plugin.
import sbt._ | ||
import java.io.File | ||
|
||
object StageHelper { |
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.
I think it would be possible to improve the name here. Perhaps Stager
even?
Note: I really dislike using the terms "helper", "util", "default" etc. - they become dumping grounds.
When this PR nears readiness I'll create an AutoPlugin that extends native packager with another format we're using internally. That should give these changes a good workout. |
While we're doing a bit of re-factoring API wise, can we please have it so that val stage = TaskKey[File]... I need a result from |
I will add these changes. |
Branching sounds likr a good plan |
@huntc Hmm, I’m not fluent enough in this problem space right now, can we discuss that next week? |
I have change some of the stuff requested and fixed all the universal tests. The structure is slowly finalizing. The |
1cb20fc
to
54e51c2
Compare
72840cc
to
942226a
Compare
* | ||
* @example Enable the plugin in the `build.sbt` | ||
* {{{ | ||
* disablePlugins(DebianNativePackaging) |
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.
I think this needs to be changed now.
I think this definitely LGTM, once travis responds. |
942226a
to
91fd4c4
Compare
Removed the comments and tested locally (for the docker stuff). |
This is a work-in-progress pull-request. Feel free to add suggestions, corrections and ideas for the autoplugins.
AutoPlugin Dependency Hierarchy
Keys
For backwards compatibility there are all Keys inside
packager.Keys
or in the referenceNativePackagerKeys
.All keys are defined in traits. The
autoImport
objects of the respecting plugin extends these traitsand define addition configurations if necessary. The structure should always look like this
Archetypes
I included the archetype declarations. Mostly because I'm not sure how to enable plugins in a scala (multi) build file.