diff --git a/.travis.yml b/.travis.yml index 2463f507e..35ca2c5f0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,12 @@ -language: scala +language: java +scala: 2.12.3 os: linux before_install: - if [[ "$TRAVIS_OS_NAME" = "osx" ]]; then brew update; brew install xz; + brew install sbt; fi script: sbt "$SBT_TEST_CMD"; @@ -12,24 +14,33 @@ script: sbt "$SBT_TEST_CMD"; matrix: include: - jdk: oraclejdk8 + language: scala env: SBT_TEST_CMD="^validate" - jdk: oraclejdk8 + language: scala env: SBT_TEST_CMD="^validateUniversal" - jdk: oraclejdk8 + language: scala env: SBT_TEST_CMD="^validateJar" - jdk: oraclejdk8 + language: scala env: SBT_TEST_CMD="^validateBash" - jdk: oraclejdk8 + language: scala env: SBT_TEST_CMD="^validateAsh" - jdk: oraclejdk8 + language: scala env: SBT_TEST_CMD="^validateRpm" - jdk: oraclejdk8 + language: scala env: SBT_TEST_CMD="^validateDebian" # for now we can't test the docker image generation on travis - jdk: oraclejdk8 + language: scala env: SBT_TEST_CMD="^validateDockerUnit" # jdk packaging is only available on jdk8+ - jdk: oraclejdk8 + language: scala env: SBT_TEST_CMD="^validateJdkPackagerTravis" # oraclejdk8 is not yet available. # see https://github.com/travis-ci/travis-ci/issues/2316 @@ -41,6 +52,7 @@ addons: apt: packages: - rpm + - fakeroot sudo: false cache: diff --git a/build.sbt b/build.sbt index f4f4514cc..9e479e0ee 100644 --- a/build.sbt +++ b/build.sbt @@ -3,7 +3,7 @@ sbtPlugin := true name := "sbt-native-packager" organization := "com.typesafe.sbt" -scalaVersion in Global := "2.10.6" +scalaVersion in Global := "2.12.3" // crossBuildingSettings crossSbtVersions := Vector("0.13.16", "1.0.0") @@ -35,7 +35,7 @@ libraryDependencies ++= { Seq( // these dependencies have to be explicitly added by the user "com.spotify" % "docker-client" % "3.5.13" % Provided, - "org.vafer" % "jdeb" % "1.3" % Provided artifacts Artifact("jdeb", "jar", "jar") + "org.vafer" % "jdeb" % "1.3" % Provided artifacts Artifact("jdeb", "jar", "jar") ) } } @@ -54,13 +54,11 @@ libraryDependencies ++= { } // configure github page -enablePlugins(SphinxPlugin, SiteScaladocPlugin) +enablePlugins(SphinxPlugin, SiteScaladocPlugin, GhpagesPlugin) -ghpages.settings git.remoteRepo := "git@github.com:sbt/sbt-native-packager.git" // scripted test settings -scriptedSettings scriptedLaunchOpts += "-Dproject.version=" + version.value // Release configuration @@ -80,7 +78,7 @@ releaseProcess := Seq[ReleaseStep]( setNextVersion, commitNextVersion, pushChanges, - releaseStepTask(GhPagesKeys.pushSite) + releaseStepTask(ghpagesPushSite) ) // bintray config @@ -112,4 +110,4 @@ addCommandAlias( ) // TODO check the cygwin scripted tests and run them on appveyor -addCommandAlias("validateWindows", "; test-only * -- -n windows;scripted universal/dist universal/stage windows/*") +addCommandAlias("validateWindows", "; testOnly * -- -n windows ; scripted universal/dist universal/stage windows/*") diff --git a/project/build.properties b/project/build.properties index c091b86ca..94005e587 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=0.13.16 +sbt.version=1.0.0 diff --git a/project/plugins.sbt b/project/plugins.sbt index db3fc01f0..a037eaddc 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,15 +1,15 @@ -addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.5.4") -addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "1.0.0") +addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.6.2") +addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "1.3.0") addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.6") -addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0") +addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.0-M1") -libraryDependencies += "org.scala-sbt" % "scripted-plugin" % sbtVersion.value +libraryDependencies += "org.scala-sbt" %% "scripted-plugin" % sbtVersion.value // Scripted plugin needs to declare this as a dependency libraryDependencies += "jline" % "jline" % "2.11" // For our bintray publishing -addSbtPlugin("me.lessis" % "bintray-sbt" % "0.3.0") +addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.5.1") // For code formatting addSbtPlugin("com.lucidchart" % "sbt-scalafmt" % "1.10") diff --git a/src/sbt-test/windows/test-custom-main/build.sbt b/src/sbt-test/windows/test-custom-main/build.sbt index 9797baa3f..7acfd5870 100644 --- a/src/sbt-test/windows/test-custom-main/build.sbt +++ b/src/sbt-test/windows/test-custom-main/build.sbt @@ -13,7 +13,7 @@ TaskKey[Unit]("checkAppMain") := { val process = sys.process.Process("target/universal/stage/bin/test-custom-main.bat") val out = (process !!) - if (out.trim != "App Main Method") error("unexpected output: " + out) + if (out.trim != "App Main Method") sys.error("unexpected output: " + out) () } @@ -22,6 +22,6 @@ TaskKey[Unit]("checkCustomMain") := { val process = sys.process.Process("target/universal/stage/bin/test-custom-main.bat", Seq("-main", "CustomMain")) val out = (process !!) - if (out.trim != "Custom Main Method") error("unexpected output: " + out) + if (out.trim != "Custom Main Method") sys.error("unexpected output: " + out) () } diff --git a/test-project-docker/project/build.properties b/test-project-docker/project/build.properties index c091b86ca..7b6213bdc 100644 --- a/test-project-docker/project/build.properties +++ b/test-project-docker/project/build.properties @@ -1 +1 @@ -sbt.version=0.13.16 +sbt.version=1.0.1 diff --git a/test-project-docker/project/plugins.sbt b/test-project-docker/project/plugins.sbt index 1b4debd1d..1741fca94 100644 --- a/test-project-docker/project/plugins.sbt +++ b/test-project-docker/project/plugins.sbt @@ -1,6 +1,5 @@ -lazy val root = Project("plugins", file(".")).dependsOn(plugin) - -lazy val plugin = file("../").getCanonicalFile.toURI +lazy val packager = ProjectRef(file("../.."), "sbt-native-packager") +dependsOn(packager) // needs to be added for the docker spotify client libraryDependencies += "com.spotify" % "docker-client" % "3.5.13" diff --git a/test-project-docker/project/project/plugins.sbt b/test-project-docker/project/project/plugins.sbt new file mode 100644 index 000000000..f79b7cb26 --- /dev/null +++ b/test-project-docker/project/project/plugins.sbt @@ -0,0 +1,5 @@ +// Workaround to fix 'undefined setting error' : +// [error] Runtime reference to undefined setting: +// [error] test-project-simple-build/sbt:scalafmtOnCompile from */*:onLoad ((com.lucidchart.sbt.scalafmt.ScalafmtSbtPlugin.globalSettings) ScalafmtSbtPlugin.scala:16) + +addSbtPlugin("com.lucidchart" % "sbt-scalafmt" % "1.10") \ No newline at end of file diff --git a/test-project-jdkpackager/project/build.properties b/test-project-jdkpackager/project/build.properties index 64abd373f..7b6213bdc 100644 --- a/test-project-jdkpackager/project/build.properties +++ b/test-project-jdkpackager/project/build.properties @@ -1 +1 @@ -sbt.version=0.13.6 +sbt.version=1.0.1 diff --git a/test-project-jdkpackager/project/plugins.sbt b/test-project-jdkpackager/project/plugins.sbt index cbf68ea18..f7551a06f 100644 --- a/test-project-jdkpackager/project/plugins.sbt +++ b/test-project-jdkpackager/project/plugins.sbt @@ -1,3 +1,2 @@ -lazy val root = Project("plugins", file(".")) dependsOn (packager) - -lazy val packager = file("..").getAbsoluteFile.toURI +lazy val packager = ProjectRef(file("../.."), "sbt-native-packager") +dependsOn(packager) diff --git a/test-project-jdkpackager/project/project/plugins.sbt b/test-project-jdkpackager/project/project/plugins.sbt new file mode 100644 index 000000000..f79b7cb26 --- /dev/null +++ b/test-project-jdkpackager/project/project/plugins.sbt @@ -0,0 +1,5 @@ +// Workaround to fix 'undefined setting error' : +// [error] Runtime reference to undefined setting: +// [error] test-project-simple-build/sbt:scalafmtOnCompile from */*:onLoad ((com.lucidchart.sbt.scalafmt.ScalafmtSbtPlugin.globalSettings) ScalafmtSbtPlugin.scala:16) + +addSbtPlugin("com.lucidchart" % "sbt-scalafmt" % "1.10") \ No newline at end of file diff --git a/test-project-simple/project/build.properties b/test-project-simple/project/build.properties index 27e88aa11..7b6213bdc 100644 --- a/test-project-simple/project/build.properties +++ b/test-project-simple/project/build.properties @@ -1 +1 @@ -sbt.version=0.13.13 +sbt.version=1.0.1 diff --git a/test-project-simple/project/plugins.sbt b/test-project-simple/project/plugins.sbt index a15bcf930..253cf135c 100644 --- a/test-project-simple/project/plugins.sbt +++ b/test-project-simple/project/plugins.sbt @@ -1,5 +1,4 @@ -lazy val root = Project("plugins", file(".")) dependsOn (packager) - -lazy val packager = file("..").getAbsoluteFile.toURI +lazy val packager = ProjectRef(file("../.."), "sbt-native-packager") +dependsOn(packager) libraryDependencies += "org.vafer" % "jdeb" % "1.3" artifacts (Artifact("jdeb", "jar", "jar")) diff --git a/test-project-simple/project/project/plugins.sbt b/test-project-simple/project/project/plugins.sbt new file mode 100644 index 000000000..f79b7cb26 --- /dev/null +++ b/test-project-simple/project/project/plugins.sbt @@ -0,0 +1,5 @@ +// Workaround to fix 'undefined setting error' : +// [error] Runtime reference to undefined setting: +// [error] test-project-simple-build/sbt:scalafmtOnCompile from */*:onLoad ((com.lucidchart.sbt.scalafmt.ScalafmtSbtPlugin.globalSettings) ScalafmtSbtPlugin.scala:16) + +addSbtPlugin("com.lucidchart" % "sbt-scalafmt" % "1.10") \ No newline at end of file diff --git a/test-project-windows/build.sbt b/test-project-windows/build.sbt index 1fb9a5f19..1b180929e 100644 --- a/test-project-windows/build.sbt +++ b/test-project-windows/build.sbt @@ -4,26 +4,19 @@ libraryDependencies ++= Seq("com.typesafe" % "config" % "1.2.1") mainClass in Compile := Some("ExampleApp") -enablePlugins(JavaServerAppPackaging, WindowsPlugin, SystemdPlugin, UniversalPlugin) +enablePlugins(JavaAppPackaging) -// import com.typesafe.sbt.packager.Keys._ -// import com.typesafe.sbt.packager.windows.WindowsPlugin maintainer := "some-company " - packageSummary := "some application" +packageDescription := """ Some useful description here """ +version := "0.0.0.0" wixProductId := "ce07be71-510d-414a-92d4-dff47631848b" - wixProductUpgradeId := "4552fb0e-e257-4dbd-9ecb-dba9dbacf425" - -lightOptions := Seq("-ext", "WixUiExtension") - wixMajorVersion := 3 +lightOptions := Seq("-ext", "WixUiExtension") -version := "0.0.0.0" - -packageDescription := """ Some useful description here """ // these settings are conflicting javaOptions in Universal ++= Seq("-J-Xmx64m", "-J-Xms64m", "-jvm-debug 12345") diff --git a/test-project-windows/project/build.properties b/test-project-windows/project/build.properties index 748703f77..7b6213bdc 100644 --- a/test-project-windows/project/build.properties +++ b/test-project-windows/project/build.properties @@ -1 +1 @@ -sbt.version=0.13.7 +sbt.version=1.0.1 diff --git a/test-project-windows/project/plugins.sbt b/test-project-windows/project/plugins.sbt index a15bcf930..f7551a06f 100644 --- a/test-project-windows/project/plugins.sbt +++ b/test-project-windows/project/plugins.sbt @@ -1,5 +1,2 @@ -lazy val root = Project("plugins", file(".")) dependsOn (packager) - -lazy val packager = file("..").getAbsoluteFile.toURI - -libraryDependencies += "org.vafer" % "jdeb" % "1.3" artifacts (Artifact("jdeb", "jar", "jar")) +lazy val packager = ProjectRef(file("../.."), "sbt-native-packager") +dependsOn(packager) diff --git a/test-project-windows/project/project/plugins.sbt b/test-project-windows/project/project/plugins.sbt new file mode 100644 index 000000000..f79b7cb26 --- /dev/null +++ b/test-project-windows/project/project/plugins.sbt @@ -0,0 +1,5 @@ +// Workaround to fix 'undefined setting error' : +// [error] Runtime reference to undefined setting: +// [error] test-project-simple-build/sbt:scalafmtOnCompile from */*:onLoad ((com.lucidchart.sbt.scalafmt.ScalafmtSbtPlugin.globalSettings) ScalafmtSbtPlugin.scala:16) + +addSbtPlugin("com.lucidchart" % "sbt-scalafmt" % "1.10") \ No newline at end of file