Last active
August 29, 2015 14:06
-
-
Save muuki88/4d65ad8172033c5389d1 to your computer and use it in GitHub Desktop.
SBT Native Packager - Auto Plugins
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// API proposal # 1 | |
lazy val root = project(file(".") | |
.enablePlugins(SbtNativePackager, JavaServerArchetype) | |
.settings( | |
"maintainer" in Debian := "Your Name <[email protected]" | |
) | |
) | |
// Implementation may look like | |
object SbtNativePackager extends AutoPlugin | |
with linux.LinuxPlugin with ... { | |
object autoimport extends linux.Keys.autoimport with ... | |
// projectSettings or buildSettings ? | |
override lazy val buildSettings = linuxSettings ++ ... | |
} | |
// API proposal # 2 | |
lazy val root = project(file(".") | |
.enablePlugins(UniversalPackagingPlugin, NativeDebianPackagingPlugin, JavaServerArchetype) | |
.settings( | |
"maintainer" in Debian := "Your Name <[email protected]" | |
) | |
) | |
// Implementation may look like | |
object UniversalPackagingPlugin extends AutoPlugin { | |
object autoimport { | |
} | |
// projectSettings or buildSettings ? | |
override lazy val buildSettings = Seq(...) | |
} | |
object WindowsPlugin extends AutoPlugin { | |
override def requires = UniversalPackagingPlugin | |
object autoimport { | |
} | |
// projectSettings or buildSettings ? | |
override lazy val buildSettings = Seq(...) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
IMHO the GenericToXYZ mappings should be handled by the respective plugin (Linux, Windows). If the archetypes require all these plugins, the mappings are always in place.