File tree Expand file tree Collapse file tree 8 files changed +41
-0
lines changed
src/sbt-test/sbt-reproducible-builds Expand file tree Collapse file tree 8 files changed +41
-0
lines changed Original file line number Diff line number Diff line change
1
+ import net .bzzt .reproduciblebuilds .ReproducibleBuildsPlugin .disambiguation
2
+
3
+ enablePlugins(ReproducibleBuildsPlugin )
4
+ enablePlugins(SbtOsgi )
5
+
6
+ OsgiKeys .exportPackage := Seq (" net.bzzt" )
7
+
8
+ // When replacing packageBin with the OSGi bundle...
9
+ Compile / packageBin := OsgiKeys .bundle.value
10
+
11
+ // We need to explicitly load the rb settings again to
12
+ // make sure the OSGi package is post-processed:
13
+ ReproducibleBuildsPlugin .projectSettings
14
+
15
+ // Make the filename static for easier validation:
16
+ disambiguation in Compile := (_ => Some (" STATIC" ))
Original file line number Diff line number Diff line change
1
+ sbt.version =1.2.1
Original file line number Diff line number Diff line change
1
+ sys.props.get(" plugin.version" ) match {
2
+ case Some (x) => addSbtPlugin(" net.bzzt" % " sbt-reproducible-builds" % sys.props(" plugin.version" ))
3
+ case _ => sys.error(""" |The system property 'plugin.version' is not defined.
4
+ |Specify this property using the scriptedLaunchOpts -D.""" .stripMargin)
5
+ }
6
+
7
+
8
+ addSbtPlugin(" com.typesafe.sbt" % " sbt-osgi" % " 0.9.4" )
Original file line number Diff line number Diff line change
1
+ package net .bzzt
2
+
3
+ object Main extends App {
4
+ println(" Hello, Reproducible World" )
5
+ }
Original file line number Diff line number Diff line change
1
+ > package
2
+ $ exists target/scala-2.12/stripped/osgi_2.12-0.1.0-SNAPSHOT.jar
3
+ $ must-mirror target/scala-2.12/stripped/osgi_2.12-0.1.0-SNAPSHOT.jar expected/osgi_2.12-0.1.0-SNAPSHOT.jar
4
+ > reproducibleBuildsCertification
5
+ $ exists target/scala-2.12/osgi_2.12_0.1.0-SNAPSHOT_all_STATIC.buildinfo
6
+ # Not on travis:
7
+ #> signedReproducibleBuildsCertification
8
+ #> reproducibleBuildsUploadCertification
9
+ #> reproducibleBuildsCheckCertification
Original file line number Diff line number Diff line change
1
+ package net .bzzt
2
+
1
3
object Main extends App {
2
4
println(" Hello, Reproducible World" )
3
5
}
You can’t perform that action at this time.
0 commit comments