From 23e179689aaa8b1bf09c680bf3b5750ae109353e Mon Sep 17 00:00:00 2001 From: Adriaan Moors Date: Tue, 3 Dec 2013 22:31:21 -0800 Subject: [PATCH 01/19] Only test on Java 6. See java7 branch. --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d6a34d03..f9e67e0d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,6 @@ scala: - 2.11.0-SNAPSHOT jdk: - openjdk6 - - openjdk7 notifications: email: - adriaan.moors@typesafe.com From 276ccdedafc3ac6e2a04eb1dc6cfafefb9fad871 Mon Sep 17 00:00:00 2001 From: Adriaan Moors Date: Wed, 4 Dec 2013 18:50:54 -0800 Subject: [PATCH 02/19] Remove redundant mappings setting. --- standard.sbt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/standard.sbt b/standard.sbt index 11509aba..636958d1 100644 --- a/standard.sbt +++ b/standard.sbt @@ -22,10 +22,6 @@ resourceGenerators in Compile <+= Def.task { Seq(file) } -mappings in (Compile, packageBin) += { - (baseDirectory.value / s"${name.value}.properties") -> s"${name.value}.properties" -} - // maven publishing publishTo := { From d18f424bdb17245543989d908a5355f575cb7a83 Mon Sep 17 00:00:00 2001 From: Adriaan Moors Date: Wed, 4 Dec 2013 18:51:38 -0800 Subject: [PATCH 03/19] OSGify. Note the importance of having osgiSettings in the main build. --- build.sbt | 5 +++++ standard.sbt | 14 ++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/build.sbt b/build.sbt index 79775d95..f92b1949 100644 --- a/build.sbt +++ b/build.sbt @@ -9,3 +9,8 @@ version := "1.0.0-SNAPSHOT" scalaVersion := "2.11.0-M7" snapshotScalaBinaryVersion := "2.11.0-M7" + +// important!! must come here (why?) +osgiSettings + +OsgiKeys.exportPackage := Seq(s"scala.swing.*;version=${version.value}") diff --git a/standard.sbt b/standard.sbt index 636958d1..55a3fb4f 100644 --- a/standard.sbt +++ b/standard.sbt @@ -67,3 +67,17 @@ pomExtra := ( ) + +val osgiVersion = version(_.replace('-', '.')) + +OsgiKeys.bundleSymbolicName := s"${organization.value}.${name.value}" + +OsgiKeys.bundleVersion := osgiVersion.value + +// Sources should also have a nice MANIFEST file +packageOptions in packageSrc := Seq(Package.ManifestAttributes( + ("Bundle-SymbolicName", s"${organization.value}.${name.value}.source"), + ("Bundle-Name", s"${name.value} sources"), + ("Bundle-Version", osgiVersion.value), + ("Eclipse-SourceBundle", s"""${organization.value}.${name.value};version="${osgiVersion.value}";roots:="."""") + )) \ No newline at end of file From 2d358e1aac5a2a5cddcccbdcb3f9284ae284a99c Mon Sep 17 00:00:00 2001 From: Adriaan Moors Date: Thu, 5 Dec 2013 11:27:37 -0800 Subject: [PATCH 04/19] add build.properties, remove from .gitignore --- .gitignore | 16 ---------------- project/build.properties | 1 + 2 files changed, 1 insertion(+), 16 deletions(-) create mode 100644 project/build.properties diff --git a/.gitignore b/.gitignore index f236bdfa..0a313b82 100644 --- a/.gitignore +++ b/.gitignore @@ -6,23 +6,10 @@ # If it is the latter, you can augment this list with # entries in .git/info/excludes # -# see also test/files/.gitignore -# *.jar *~ -build.properties - -# target directories for ant build -/build/ -/dists/ - -# other -/out/ -/bin/ -/sandbox/ - # eclipse, intellij /.classpath /.project @@ -36,9 +23,6 @@ build.properties # bak files produced by ./cleanup-commit *.bak -# Standard symbolic link to build/quick/bin -qbin - # Mac specific, but that is common enough a dev platform to warrant inclusion. .DS_Store diff --git a/project/build.properties b/project/build.properties new file mode 100644 index 00000000..a66ffdc3 --- /dev/null +++ b/project/build.properties @@ -0,0 +1 @@ +sbt.version=0.13.1-RC5 \ No newline at end of file From dbcc00e1d3fdc963e3ebac625ce24583f5e36fa6 Mon Sep 17 00:00:00 2001 From: Roberto Tyley Date: Fri, 29 Nov 2013 14:26:56 +0000 Subject: [PATCH 05/19] SI-8019 Make Publisher check PartialFunction is defined for Event Reactions are PartialFunctions, so if events come through indiscriminately that the listener is not defined for, errors occur. Eg: -- Exception in thread "AWT-EventQueue-0" scala.MatchError: FocusGained(scala.swing wrapper scala.swing.TextField -- A Coursera thread with people affected by this issue: https://class.coursera.org/reactive-001/forum/thread?thread_id=1315 --- src/main/scala/scala/swing/Publisher.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scala/scala/swing/Publisher.scala b/src/main/scala/scala/swing/Publisher.scala index 96207de8..578ef71e 100644 --- a/src/main/scala/scala/swing/Publisher.scala +++ b/src/main/scala/scala/swing/Publisher.scala @@ -44,7 +44,7 @@ trait Publisher extends Reactor { /** * Notify all registered reactions. */ - def publish(e: Event) { for (l <- listeners) l(e) } + def publish(e: Event) { for (l <- listeners) if (l.isDefinedAt(e)) l(e) } listenTo(this) } From 3689632590d0b8504ee9fe4e51f65f9132aa7ba8 Mon Sep 17 00:00:00 2001 From: Adriaan Moors Date: Fri, 24 Jan 2014 17:42:11 -0800 Subject: [PATCH 06/19] Switch to scala-module-plugin, sbt 0.13.1 --- build.sbt | 14 +++---- project/build.properties | 2 +- project/keys.scala | 11 ------ project/plugins.sbt | 2 +- standard.sbt | 83 ---------------------------------------- 5 files changed, 8 insertions(+), 104 deletions(-) delete mode 100644 project/keys.scala delete mode 100644 standard.sbt diff --git a/build.sbt b/build.sbt index f92b1949..b9114fe9 100644 --- a/build.sbt +++ b/build.sbt @@ -1,16 +1,14 @@ -import VersionKeys._ +scalaModuleSettings -organization := "org.scala-lang.modules" +name := "scala-swing" -name := "scala-swing" +version := "1.0.0-SNAPSHOT" -version := "1.0.0-SNAPSHOT" +scalaVersion := "2.11.0-M8" -scalaVersion := "2.11.0-M7" - -snapshotScalaBinaryVersion := "2.11.0-M7" +snapshotScalaBinaryVersion := "2.11.0-M8" // important!! must come here (why?) -osgiSettings +scalaModuleOsgiSettings OsgiKeys.exportPackage := Seq(s"scala.swing.*;version=${version.value}") diff --git a/project/build.properties b/project/build.properties index a66ffdc3..638d14ee 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=0.13.1-RC5 \ No newline at end of file +sbt.version=0.13.1 \ No newline at end of file diff --git a/project/keys.scala b/project/keys.scala deleted file mode 100644 index bdca0dda..00000000 --- a/project/keys.scala +++ /dev/null @@ -1,11 +0,0 @@ -object VersionKeys { - import sbt.settingKey - - val snapshotScalaBinaryVersion = settingKey[String]("The Scala binary version to use when building against Scala SNAPSHOT.") - - def deriveBinaryVersion(sv: String, snapshotScalaBinaryVersion: String) = sv match { - case snap_211 if snap_211.startsWith("2.11") && - snap_211.contains("-SNAPSHOT") => snapshotScalaBinaryVersion - case sv => sbt.CrossVersion.binaryScalaVersion(sv) - } -} diff --git a/project/plugins.sbt b/project/plugins.sbt index c2f7976c..d59d681b 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1 +1 @@ -addSbtPlugin("com.typesafe.sbt" % "sbt-osgi" % "0.6.0") \ No newline at end of file +addSbtPlugin("org.scala-lang.modules" % "scala-module-plugin" % "1.0.1") \ No newline at end of file diff --git a/standard.sbt b/standard.sbt deleted file mode 100644 index 55a3fb4f..00000000 --- a/standard.sbt +++ /dev/null @@ -1,83 +0,0 @@ -import VersionKeys._ - -// DOUBLETHINK YOUR WAY OUT OF EDITING BELOW (THERE IS NO BELOW) - -scalaBinaryVersion := deriveBinaryVersion(scalaVersion.value, snapshotScalaBinaryVersion.value) - -// so we don't have to wait for sonatype to synch to maven central when deploying a new module -resolvers += Resolver.sonatypeRepo("releases") - -// to allow compiling against snapshot versions of Scala -resolvers += Resolver.sonatypeRepo("snapshots") - - -// Generate $name.properties to store our version as well as the scala version used to build -resourceGenerators in Compile <+= Def.task { - val props = new java.util.Properties - props.put("version.number", version.value) - props.put("scala.version.number", scalaVersion.value) - props.put("scala.binary.version.number", scalaBinaryVersion.value) - val file = (resourceManaged in Compile).value / s"${name.value}.properties" - IO.write(props, null, file) - Seq(file) -} - - -// maven publishing -publishTo := { - val nexus = "https://oss.sonatype.org/" - if (version.value.trim.endsWith("SNAPSHOT")) - Some("snapshots" at nexus + "content/repositories/snapshots") - else - Some("releases" at nexus + "service/local/staging/deploy/maven2") -} - -publishMavenStyle := true - -publishArtifact in Test := false - -pomIncludeRepository := { _ => false } - -pomExtra := ( - http://www.scala-lang.org/ - 2002 - - - repo - BSD 3-Clause - https://github.com/scala/{name.value}/blob/master/LICENSE.md - - - - scm:git:git://github.com/scala/{name.value}.git - https://github.com/scala/{name.value} - - - JIRA - https://issues.scala-lang.org/ - - - - epfl - EPFL - - - Typesafe - Typesafe, Inc. - - -) - -val osgiVersion = version(_.replace('-', '.')) - -OsgiKeys.bundleSymbolicName := s"${organization.value}.${name.value}" - -OsgiKeys.bundleVersion := osgiVersion.value - -// Sources should also have a nice MANIFEST file -packageOptions in packageSrc := Seq(Package.ManifestAttributes( - ("Bundle-SymbolicName", s"${organization.value}.${name.value}.source"), - ("Bundle-Name", s"${name.value} sources"), - ("Bundle-Version", osgiVersion.value), - ("Eclipse-SourceBundle", s"""${organization.value}.${name.value};version="${osgiVersion.value}";roots:="."""") - )) \ No newline at end of file From 312cfce76d2083de4ec60518d9a7fb669c1a3118 Mon Sep 17 00:00:00 2001 From: Adriaan Moors Date: Mon, 17 Mar 2014 16:18:09 -0700 Subject: [PATCH 07/19] Check binary compatibility with MiMa --- build.sbt | 14 +++++++++++++- project/plugins.sbt | 5 ++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index b9114fe9..98a87a8f 100644 --- a/build.sbt +++ b/build.sbt @@ -1,3 +1,5 @@ +import com.typesafe.tools.mima.plugin.{MimaPlugin, MimaKeys} + scalaModuleSettings name := "scala-swing" @@ -11,4 +13,14 @@ snapshotScalaBinaryVersion := "2.11.0-M8" // important!! must come here (why?) scalaModuleOsgiSettings -OsgiKeys.exportPackage := Seq(s"scala.swing.*;version=${version.value}") +OsgiKeys.exportPackage := Seq(s"scala.swing.*;version=${version.value}") + +MimaPlugin.mimaDefaultSettings + +MimaKeys.previousArtifact := Some(organization.value % s"${name.value}_2.11.0-RC1" % "1.0.0") + +// run mima during tests +test in Test := { + MimaKeys.reportBinaryIssues.value + (test in Test).value +} diff --git a/project/plugins.sbt b/project/plugins.sbt index d59d681b..707aba66 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1 +1,4 @@ -addSbtPlugin("org.scala-lang.modules" % "scala-module-plugin" % "1.0.1") \ No newline at end of file +addSbtPlugin("org.scala-lang.modules" % "scala-module-plugin" % "1.0.1") + +addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.1.6") + From f2a13d60d286bec13e499323668ad8e908cc09cd Mon Sep 17 00:00:00 2001 From: Adriaan Moors Date: Mon, 17 Mar 2014 16:20:38 -0700 Subject: [PATCH 08/19] Bump versions. --- build.sbt | 6 +++--- project/plugins.sbt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build.sbt b/build.sbt index 98a87a8f..fd8793ff 100644 --- a/build.sbt +++ b/build.sbt @@ -4,11 +4,11 @@ scalaModuleSettings name := "scala-swing" -version := "1.0.0-SNAPSHOT" +version := "1.0.1-SNAPSHOT" -scalaVersion := "2.11.0-M8" +scalaVersion := "2.11.0-RC1" -snapshotScalaBinaryVersion := "2.11.0-M8" +snapshotScalaBinaryVersion := "2.11.0-RC1" // important!! must come here (why?) scalaModuleOsgiSettings diff --git a/project/plugins.sbt b/project/plugins.sbt index 707aba66..8beda005 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,4 +1,4 @@ -addSbtPlugin("org.scala-lang.modules" % "scala-module-plugin" % "1.0.1") +addSbtPlugin("org.scala-lang.modules" % "scala-module-plugin" % "1.0.2") addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.1.6") From 42b475ce4e4442e7cfa0eb497b5513acf5b5967a Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Wed, 7 May 2014 10:43:44 +0200 Subject: [PATCH 09/19] Version bumps - Update project version to 1.0.2-SNAPSHOT, give that 1.0.1 is already released - Use _2.11 as the snapshot binary version for 2.12.0-SNAPSHOT PR validation. - Use 1.0.1 as the MiMa baseline - Use Scala 2.11.0 for Travis CI builds --- .travis.yml | 2 +- build.sbt | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index f9e67e0d..fcabc279 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ language: scala script: - sbt ++$TRAVIS_SCALA_VERSION clean update compile test scala: - - 2.11.0-SNAPSHOT + - 2.11.0 jdk: - openjdk6 notifications: diff --git a/build.sbt b/build.sbt index fd8793ff..c3f9fe5e 100644 --- a/build.sbt +++ b/build.sbt @@ -4,11 +4,11 @@ scalaModuleSettings name := "scala-swing" -version := "1.0.1-SNAPSHOT" +version := "1.0.2-SNAPSHOT" -scalaVersion := "2.11.0-RC1" +scalaVersion := "2.11.0" -snapshotScalaBinaryVersion := "2.11.0-RC1" +snapshotScalaBinaryVersion := "2.11" // important!! must come here (why?) scalaModuleOsgiSettings @@ -17,7 +17,7 @@ OsgiKeys.exportPackage := Seq(s"scala.swing.*;version=${version.value}") MimaPlugin.mimaDefaultSettings -MimaKeys.previousArtifact := Some(organization.value % s"${name.value}_2.11.0-RC1" % "1.0.0") +MimaKeys.previousArtifact := Some(organization.value % s"${name.value}_2.11" % "1.0.1") // run mima during tests test in Test := { From 8a32fc9fe9cf16ea19d13de296e6d4ae09b5be96 Mon Sep 17 00:00:00 2001 From: andy1138 Date: Mon, 21 Jul 2014 21:06:33 +0100 Subject: [PATCH 10/19] Adds scaladoc notes to read me --- README.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 774f865f..3cb0f387 100644 --- a/README.md +++ b/README.md @@ -27,8 +27,20 @@ The library comprises three main packages: - `scala.swing`: All widget classes and traits. - `scala.swing.event`: The event hierarchy. - `scala.swing.test`: A set of demos. - -Notes: +
+ +ScalaDocs +=== + +Documentation for scala-swing included in 2.11.1 is can be found [here](http://www.scala-lang.org/api/2.11.1/scala-swing/#scala.swing.package) + +Other version can be found at [http://www.scala-lang.org/documentation/api.html](http://www.scala-lang.org/documentation/api.html) + + +

+ +_Notes:_ - Visual appearance of combo boxes using the GTK LaF is broken on JDKs < 1.7b30. This is a Java Swing problem. + From e90328cbda993c5015536095418943a9e3897c7e Mon Sep 17 00:00:00 2001 From: andy1138 Date: Tue, 22 Jul 2014 10:39:15 +0100 Subject: [PATCH 11/19] adds 'current work' --- README.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3cb0f387..16aeb321 100644 --- a/README.md +++ b/README.md @@ -31,16 +31,27 @@ The library comprises three main packages:
ScalaDocs -=== +--- Documentation for scala-swing included in 2.11.1 is can be found [here](http://www.scala-lang.org/api/2.11.1/scala-swing/#scala.swing.package) Other version can be found at [http://www.scala-lang.org/documentation/api.html](http://www.scala-lang.org/documentation/api.html) +

+ +Current Work +--- + +Current changes are being made on the **java7** branch. This is to mainly because of the EOL of java6 and the generification that happened between jdk6 and jdk7 requiring a difference in the source code. This class files are targeted at java6 and will run with all versions upwards.

_Notes:_ - Visual appearance of combo boxes using the GTK LaF is broken on JDKs < 1.7b30. This is a Java Swing problem. +- The generification added to some java7 swing components make the course code incompatible between java6 and java7. This is not an issue with the generated .class files because of _Type Erasure_ will work across all versions of java from java6 upwards. See [Issue SI-3634](https://issues.scala-lang.org/browse/SI-3634) + + + + From 64b40bfb9104afa2905b3a181fbb3a24f1af2f06 Mon Sep 17 00:00:00 2001 From: andy1138 Date: Tue, 22 Jul 2014 10:39:55 +0100 Subject: [PATCH 12/19] Corrects path to demos --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 16aeb321..cafd3152 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ The library comprises three main packages: - `scala.swing`: All widget classes and traits. - `scala.swing.event`: The event hierarchy. -- `scala.swing.test`: A set of demos. +- `examples.swing`: A set of demos. ( in ./docs )
From 4552a5e6e20465cb5da8fcb6e75e078c258c35b0 Mon Sep 17 00:00:00 2001 From: Andy Hicks Date: Tue, 22 Jul 2014 10:44:24 +0100 Subject: [PATCH 13/19] bit of readme.md layout cleanup --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index cafd3152..eaccda53 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,6 @@ The library comprises three main packages: - `scala.swing.event`: The event hierarchy. - `examples.swing`: A set of demos. ( in ./docs ) -
ScalaDocs --- @@ -37,14 +36,13 @@ Documentation for scala-swing included in 2.11.1 is can be found [here](http://w Other version can be found at [http://www.scala-lang.org/documentation/api.html](http://www.scala-lang.org/documentation/api.html) -

Current Work --- Current changes are being made on the **java7** branch. This is to mainly because of the EOL of java6 and the generification that happened between jdk6 and jdk7 requiring a difference in the source code. This class files are targeted at java6 and will run with all versions upwards. -

+
_Notes:_ From a6a8e1d77e6b568d32ca8723bd3471fb214c2d74 Mon Sep 17 00:00:00 2001 From: Adriaan Moors Date: Thu, 4 Dec 2014 10:39:21 -0800 Subject: [PATCH 14/19] Support for tag-driven publishing on Travis. Modify travis build to derive the project version from TRAVIS_TAG (when set). as well as to have sbt run the `publish-signed` task if the environment is right. The tag must match the semver regex `^v[0-9]+\.[0-9]+\.[0-9]+(-[A-Za-z0-9-]+)?`, and the jdk we're running on must match PUBLISH_JDK (set in .travis.yml). For every repo, you must create the following files (not included here) according to the instructions in admin/gpg.sbt: - admin/pubring.asc (commit) - admin/secring.asc (DO NOT COMMIT) - sensitive.sbt (DO NOT COMMIT) - passphrase for secring.asc - api token for staging to sonatype Generate these using `admin/encryptAll.sh`: - admin/secring.asc.enc (commit) - sensitive.sbt.enc (commit) Note that `encryptAll.sh` spits out a "- secure .... " line, that you need to add to `.travis.yml`'s `env` section, so that travis can supply the SECRET env variable, which is used to decrypt the sensitive files above. --- .travis.yml | 11 ++++++++++- admin/build.sh | 19 +++++++++++++++++++ admin/decrypt.sh | 2 ++ admin/encrypt.sh | 2 ++ admin/encryptAll.sh | 19 +++++++++++++++++++ admin/gpg.sbt | 26 ++++++++++++++++++++++++++ 6 files changed, 78 insertions(+), 1 deletion(-) create mode 100755 admin/build.sh create mode 100755 admin/decrypt.sh create mode 100755 admin/encrypt.sh create mode 100755 admin/encryptAll.sh create mode 100644 admin/gpg.sbt diff --git a/.travis.yml b/.travis.yml index fcabc279..5be5d7f1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,15 @@ language: scala + +env: + global: + - PUBLISH_JDK=openjdk6 # admin/build.sh only publishes when running on this jdk +# Don't commit sensitive files, instead commit a version encrypted with $SECRET, +# this environment variable is encrypted with this repo's private key and stored below: +# (See http://docs.travis-ci.com/user/environment-variables/#Secure-Variables.) +# - secure: + script: - - sbt ++$TRAVIS_SCALA_VERSION clean update compile test + - admin/build.sh scala: - 2.11.0 jdk: diff --git a/admin/build.sh b/admin/build.sh new file mode 100755 index 00000000..3c7f4b6c --- /dev/null +++ b/admin/build.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# prep environment for publish to sonatype staging if the HEAD commit is tagged + +# git on travis does not fetch tags, but we have TRAVIS_TAG +# headTag=$(git describe --exact-match ||:) + +if [ "$TRAVIS_JDK_VERSION" == "$PUBLISH_JDK" ] && [[ "$TRAVIS_TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-[A-Za-z0-9-]+)? ]]; then + echo "Going to release from tag $TRAVIS_TAG!" + myVer=$(echo $TRAVIS_TAG | sed -e s/^v//) + publishVersion='set every version := "'$myVer'"' + extraTarget="publish-signed" + + cat admin/gpg.sbt >> project/plugins.sbt + admin/decrypt.sh sensitive.sbt + (cd admin/ && ./decrypt.sh secring.asc) +fi + +sbt ++$TRAVIS_SCALA_VERSION "$publishVersion" clean update compile test $extraTarget \ No newline at end of file diff --git a/admin/decrypt.sh b/admin/decrypt.sh new file mode 100755 index 00000000..3c3c602f --- /dev/null +++ b/admin/decrypt.sh @@ -0,0 +1,2 @@ +#!/bin/bash +openssl aes-256-cbc -pass "pass:$SECRET" -in $1.enc -out $1 -d -a \ No newline at end of file diff --git a/admin/encrypt.sh b/admin/encrypt.sh new file mode 100755 index 00000000..4bf6c932 --- /dev/null +++ b/admin/encrypt.sh @@ -0,0 +1,2 @@ +#!/bin/bash +openssl aes-256-cbc -pass "pass:$SECRET" -in $1 -out $1.enc -a \ No newline at end of file diff --git a/admin/encryptAll.sh b/admin/encryptAll.sh new file mode 100755 index 00000000..de7016b7 --- /dev/null +++ b/admin/encryptAll.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# Based on https://gist.github.com/kzap/5819745: + +echo "This will encrypt the cleartext sensitive.sbt and admin/secring.asc, while making the encrypted versions available for decryption on Travis." +echo "Update your .travis.yml as directed, and delete the cleartext versions." +echo "Press enter to continue." +read + +# 1. create a secret, put it in an environment variable while encrypting files -- UNSET IT AFTER +export SECRET=$(cat /dev/urandom | head -c 10000 | openssl sha1) + +# 2. add the "secure: ..." line under the env section -- generate it with `` (install the travis gem first) +travis encrypt SECRET=$SECRET + +admin/encrypt.sh admin/secring.asc +admin/encrypt.sh sensitive.sbt + +echo "Remember to rm sensitive.sbt admin/secring.asc -- once you do, they cannot be recovered (except on Travis)!" \ No newline at end of file diff --git a/admin/gpg.sbt b/admin/gpg.sbt new file mode 100644 index 00000000..01157e6e --- /dev/null +++ b/admin/gpg.sbt @@ -0,0 +1,26 @@ + +addSbtPlugin("com.typesafe.sbt" % "sbt-pgp" % "0.8.3") // only added when publishing: + +// There's a companion sensitive.sbt, which was created like this: +// +// 1. in an sbt shell that has the sbt-pgp plugin, create pgp key in admin/: +// +// sbt +// set pgpReadOnly := false +// set pgpPublicRing := file("admin/pubring.asc") +// set pgpSecretRing := file("admin/secring.asc") +// pgp-cmd gen-key // use $passPhrase +// Please enter the name associated with the key: $repoName +// Please enter the email associated with the key: scala-internals@googlegroups.com +// Please enter the passphrase for the key: $passphrase +// +// 2. create sensitive.sbt with contents: +// +// pgpPassphrase := Some($passPhrase.toArray) +// +// pgpPublicRing := file("admin/pubring.asc") +// +// pgpSecretRing := file("admin/secring.asc") +// +// credentials += Credentials("Sonatype Nexus Repository Manager", "oss.sonatype.org", $sonaUser, $sonaPass) + From 2b61b76851f8c0253035a529901dac8ac645e7d8 Mon Sep 17 00:00:00 2001 From: Adriaan Moors Date: Thu, 4 Dec 2014 13:53:52 -0800 Subject: [PATCH 15/19] Secure config for publishing to sonatype --- .travis.yml | 2 +- admin/pubring.asc | 18 ++++++++++++++++++ admin/secring.asc.enc | 40 ++++++++++++++++++++++++++++++++++++++++ sensitive.sbt.enc | 7 +++++++ 4 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 admin/pubring.asc create mode 100644 admin/secring.asc.enc create mode 100644 sensitive.sbt.enc diff --git a/.travis.yml b/.travis.yml index 5be5d7f1..b083c91c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,7 @@ env: # Don't commit sensitive files, instead commit a version encrypted with $SECRET, # this environment variable is encrypted with this repo's private key and stored below: # (See http://docs.travis-ci.com/user/environment-variables/#Secure-Variables.) -# - secure: + - secure: "g/d6gjq6g+t5ieI6DwOiL5k8XJ/ethlZ1ZZDA/uvOsCfkIu0MBL2cYGmwQ0gcBNBQ/02wZjXnTIgMhFhYLcgHtnicAjy+53fhjCYcTM6A61DCPhJ6txOjEEPrpnlqbvKauw0WuVGT8Kd52bhaMXPCE2GOWgPe+bJfDUTHSm86dw=" script: - admin/build.sh diff --git a/admin/pubring.asc b/admin/pubring.asc new file mode 100644 index 00000000..177bbf5c --- /dev/null +++ b/admin/pubring.asc @@ -0,0 +1,18 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: BCPG v1.49 + +mQENBFSA12QBCACmD7LIMlzS+Qf/dyyQQn2wjgrk9kCazfVP6pb++wizYq4AkN6Q +cFti0YCSB+EzS+dqFO4wSIprenB/jfuLEnjfDSupjFLgTmjo8Komkk/9ynHSowJl +ofkDPS/qgcr1mAmuc72CrIqKfc3Dojscug3ChmY3tbezAgPmGV/tu8V/uAAsnVOE +AsmCOimTcWjA6bgvEkPyyzHp5uinU29tuFAxIAm2pJ+EmNebRnVF3lG+GotP2Ojy +wsfS8iMmV2g4KQd4WmFes9F2R/lkApGgnDTimk9Rj/QswhPuVeiHPS1OBjWPqoEw +N9lL1lyiOYoX+MHryTlJE7lZqDHwhUAiQxatABEBAAG0LnNjYWxhLXN3aW5nIDxz +Y2FsYS1pbnRlcm5hbHNAZ29vZ2xlZ3JvdXBzLmNvbT6JARwEEwECAAYFAlSA12QA +CgkQwdZV2OHM6Ia6aAf+P0WUtZ+0SXbUzVqF05PT/mfNzsEx9vfKap4hRacVZqWR +aQk6Y5FlX5p+oSRVcXEei+KcbRFdVB6KYueuwYOFZd+6fO8xbNTImgzz0DJ/Uh6A +10Es3PeT/GLvlrbSxO/Cf1WSO8f6+CPPmtNKAAl1m6dvTTbAikcbiWzeO4QQuVsS +nM1H6rTGUKeLmhxSwyI+jvI62bJF9Kiusa0+beIwok0CW+gOwhg45WG1FP9tv+Dl +H/61TUg3ev5vW4CFuErx5hUjIJgjoDW42xE12R9MhvCkxCUT5D/05RhfQ/G+kJYa +iBEK413XaGDgDgMoXlaQxzZQ0u9v/PNg+0jqDQUzGA== +=3ZlV +-----END PGP PUBLIC KEY BLOCK----- diff --git a/admin/secring.asc.enc b/admin/secring.asc.enc new file mode 100644 index 00000000..3c7d82bb --- /dev/null +++ b/admin/secring.asc.enc @@ -0,0 +1,40 @@ +U2FsdGVkX1+O9u2xp4J6vefMlYeBkHwqMcGvhZirV2fyxfIqmy/uEc1RDysgx5Uf +UDNZFktgofTBNYn8WaXg60DHqupSD+HOO2wCyYF3SuntvYQ1/sUFZDrw+RthU+B+ +kMj6/mcYq7aISn5Y/zQu+6pvxF7P1srxSkZRBY/qmJsclTy5pZ2BoDMAaOPAHPlf ++aGfJalkx3aOIB46znJeKfKKcyjeq1AGp93jWA39xjemsEflrnhrBAUs4/DzTVhc +GH/dMw9V2HsM04v1huABwN0Qi3BVy6eLD0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ikz4LuSq4rbTkqZPvfP+BXl4gR6QBxwGRCkfBlx +8QQQfb6td17noNiY3+LHRxamiNVbC5UQkChrysYG0ZG6v4aVDPLV4+KDHj6Kq89J +AhiifxrEE3x455AiETaLcQ== diff --git a/sensitive.sbt.enc b/sensitive.sbt.enc new file mode 100644 index 00000000..cae9230f --- /dev/null +++ b/sensitive.sbt.enc @@ -0,0 +1,7 @@ +U2FsdGVkX1+DOObIhXyopFDucfOJpqONi2L0QPFbK21VMfImp5HjvaQJPu/dQAg7 +oKQE17ac5CdUEqd2Tvh7kwGxoAb2huyZYEVeHR/kgkCoQnSzi2C1yYcVKf8xVKgc +0UrsRCSayX7mTII72mE0qM3XjB7TJxPhCnEdb+Cdg7TwuGd9U4uIiKHV+BLy7+Y4 +JwHmgYiRdZCaZ124iQNhAIzzpVp3dKrl2qqVKF3WUqjA3L/EjyebF4O/FNGdaops +yff7sSc+ELw0BiKrHHFug802Ii/36CtKhcTGseWSlmqhEu86QBhxHTblUKySaZj/ +cq/oRW3Lz5/pBuLJs6kNAyQmM5bs5UADvv935cTokW0DCCu7RMbesUs/CJqTE2uU +NkfppKMwKjFl9PjintVUOw== From 38bba36592d0860e76a7257615bf0151d89c900b Mon Sep 17 00:00:00 2001 From: Lukas Rytz Date: Thu, 30 Apr 2015 12:44:54 +0200 Subject: [PATCH 16/19] Update the scala-modules plugin to 1.0.3 --- build.sbt | 14 ++------------ project/build.properties | 2 +- project/plugins.sbt | 5 +---- 3 files changed, 4 insertions(+), 17 deletions(-) diff --git a/build.sbt b/build.sbt index c3f9fe5e..356652d8 100644 --- a/build.sbt +++ b/build.sbt @@ -6,21 +6,11 @@ name := "scala-swing" version := "1.0.2-SNAPSHOT" -scalaVersion := "2.11.0" - -snapshotScalaBinaryVersion := "2.11" +scalaVersion := "2.11.6" // important!! must come here (why?) scalaModuleOsgiSettings OsgiKeys.exportPackage := Seq(s"scala.swing.*;version=${version.value}") -MimaPlugin.mimaDefaultSettings - -MimaKeys.previousArtifact := Some(organization.value % s"${name.value}_2.11" % "1.0.1") - -// run mima during tests -test in Test := { - MimaKeys.reportBinaryIssues.value - (test in Test).value -} +mimaPreviousVersion := Some("1.0.1") diff --git a/project/build.properties b/project/build.properties index 638d14ee..a6e117b6 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=0.13.1 \ No newline at end of file +sbt.version=0.13.8 diff --git a/project/plugins.sbt b/project/plugins.sbt index 8beda005..25f33731 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,4 +1 @@ -addSbtPlugin("org.scala-lang.modules" % "scala-module-plugin" % "1.0.2") - -addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.1.6") - +addSbtPlugin("org.scala-lang.modules" % "scala-module-plugin" % "1.0.3") From 485d72825a37978a8b5daeda25c5b91406bbc58b Mon Sep 17 00:00:00 2001 From: Lukas Rytz Date: Thu, 30 Apr 2015 12:46:12 +0200 Subject: [PATCH 17/19] update version number for v1.0.2 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 356652d8..deba0fe1 100644 --- a/build.sbt +++ b/build.sbt @@ -4,7 +4,7 @@ scalaModuleSettings name := "scala-swing" -version := "1.0.2-SNAPSHOT" +version := "1.0.3-SNAPSHOT" scalaVersion := "2.11.6" From 0fc44e2958f7fbb54412b847562c61bb69ae9d89 Mon Sep 17 00:00:00 2001 From: Lukas Rytz Date: Tue, 5 May 2015 10:45:17 +0200 Subject: [PATCH 18/19] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index eaccda53..88d55585 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -scala-swing (unsupported) [](https://travis-ci.org/scala/scala-swing) +scala-swing (unsupported) [](https://travis-ci.org/scala/scala-swing) [](http://search.maven.org/#search%7Cga%7C1%7Cg%3Aorg.scala-lang.modules%20a%3Ascala-swing_2.11) [](http://search.maven.org/#search%7Cga%7C1%7Cg%3Aorg.scala-lang.modules%20a%3Ascala-swing_2.12*) ========= We welcome contributions, but do not actively maintain this library. From 49b29fbc2e1feff6c432a48dcccdeff832a4a42b Mon Sep 17 00:00:00 2001 From: Lukas Rytz Date: Tue, 12 May 2015 10:43:30 +0200 Subject: [PATCH 19/19] Disable MiMa, minor cleanups in build.sbt --- build.sbt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/build.sbt b/build.sbt index 89cde608..2741cfdf 100644 --- a/build.sbt +++ b/build.sbt @@ -2,9 +2,9 @@ import com.typesafe.tools.mima.plugin.{MimaPlugin, MimaKeys} scalaModuleSettings -name := "scala-swing" +name := "scala-swing" -version := "2.0.0-SNAPSHOT" +version := "2.0.0-SNAPSHOT" scalaVersion := "2.11.1" @@ -13,9 +13,9 @@ scalacOptions ++= Seq("-deprecation", "-feature", "-target:jvm-1.6") // important!! must come here (why?) scalaModuleOsgiSettings -OsgiKeys.exportPackage := Seq(s"scala.swing.*;version=${version.value}") +OsgiKeys.exportPackage := Seq(s"scala.swing.*;version=${version.value}") -mimaPreviousVersion := Some("1.0.1") +mimaPreviousVersion := None // set the prompt (for this build) to include the project id. shellPrompt in ThisBuild := { state => Project.extract(state).currentRef.project + "> " } @@ -25,7 +25,7 @@ lazy val swing = project.in( file(".") ) lazy val examples = project.in( file("examples") ) .dependsOn(swing) .settings( - scalaVersion := "2.11.1", + scalaVersion := (scalaVersion in swing).value, fork in run := true, fork := true ) @@ -33,7 +33,7 @@ lazy val examples = project.in( file("examples") ) lazy val uitest = project.in( file("uitest") ) .dependsOn(swing) .settings( - scalaVersion := "2.11.1", + scalaVersion := (scalaVersion in swing).value, fork in run := true, fork := true )