-
Notifications
You must be signed in to change notification settings - Fork 92
Add OSGi headers and source bundle #3
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,7 +2,7 @@ organization := "org.scala-lang.modules" | |
|
|
||
| name := "scala-xml" | ||
|
|
||
| version := "1.0-RC4" | ||
| version := "1.0.0-RC4" | ||
|
|
||
| // standard stuff follows: | ||
| scalaVersion := "2.11.0-M5" | ||
|
|
@@ -105,6 +105,24 @@ definedTests in Test += ( | |
| }, true, Array()) | ||
| ) | ||
|
|
||
| osgiSettings | ||
|
|
||
| val osgiVersion = version(_.replace('-', '.')) | ||
|
|
||
| OsgiKeys.bundleSymbolicName := s"${organization.value}.${name.value}" | ||
|
|
||
| OsgiKeys.bundleVersion := osgiVersion.value | ||
|
|
||
| OsgiKeys.exportPackage := Seq(s"scala.xml.*;version=${version.value}") | ||
|
|
||
| // Sources should also have a nice MANIFEST file | ||
| packageOptions in packageSrc := Seq(Package.ManifestAttributes( | ||
| ("Bundle-SymbolicName", s"${organization.value}.${name.value}.source"), | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this build pushing the source bundle too? I'm a bit unfamiliar with what this does in non-eclipse OSGi environs....
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, nevermind, just saw the packageSrc. Sweet. |
||
| ("Bundle-Name", s"${name.value} sources"), | ||
| ("Bundle-Version", osgiVersion.value), | ||
| ("Eclipse-SourceBundle", s"""${organization.value}.${name.value};version="${osgiVersion.value}";roots:="."""") | ||
| )) | ||
|
|
||
|
|
||
| // TODO: mima | ||
| // import com.typesafe.tools.mima.plugin.MimaPlugin.mimaDefaultSettings | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| addSbtPlugin("com.typesafe.sbt" % "sbt-osgi" % "0.6.0") |
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.
Note that this must be coordinated with https://github.com/scala/scala/blob/master/versions.properties, https://github.com/scala/scala-partest/blob/master/build.sbt#L19, and possibly others (TODO for me: make an overview of this)
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 should not be checked in with a non-SNAPSHOT version, the release process is the only place where it should tick over to a real version, ever so briefly.
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.
Reason: if I checkout this locally and
publish-local, I will overwrite the local binaries with something newer than the released version. Those might be resolved by an upstream project inducing the subtle brand of calamity that we can do without.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 agree, but I didn't want to push this change in this PR, which is about OSGi. If everyone agrees on -SNAPSHOT I can prepare another PR.
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.
Agreed.
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.
@adriaanm What should I do about those files? Wouldn't they evolve naturally, once a new release of
scala-xmlis cut? (assuming the propagation step is done on releases).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.
Sorry, I again forgot about using snapshot in the repo . +1 on what Jason said.
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.
Also, that change is fine in this pr, as long as it's a separate commit