Skip to content

Commit

Permalink
backport new publishing scripts based on sbt-ci-release
Browse files Browse the repository at this point in the history
  • Loading branch information
lrytz committed Feb 26, 2020
1 parent d709919 commit ee68234
Show file tree
Hide file tree
Showing 13 changed files with 98 additions and 284 deletions.
50 changes: 18 additions & 32 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,48 +1,34 @@
dist: trusty
version: ~> 1.0 # needed for imports

import: scala/scala-dev:travis/default.yml

language: scala
jdk:
- oraclejdk8
- openjdk11

scala:
- 2.11.12
- 2.12.8
- 2.13.0
- 2.12.10
- 2.13.1

env:
global:
# PGP_PASSPHRASE
- secure: "SkBtn/6OjEldoikn0MFuyeLT/pau27kwKSDYTVQeJ4BKDzdWLwLE5Q3RukLGttIfNdhOvRoocpQSW9GkZfibTHmwrRnAokucfZCqTsKbwoOp1xIoOh5GrrVrB6gcP7WBTKinqFdBgSvLOrP7GviImz4ZuB9wq1r+mToGG4pDrXc="
# SONA_USER
- secure: "JSv/Er6q1XtTpRH1bpU63YBf7ufwg0vW+Kv/udQBtr8YX/P3gRYC1x6hW4uwftaKMYh7wXDkfNy51SRpH3kUptdJvjPUifVElyPiYlsumetmD+rZJmxX6agx+U5pdjIXPqPoton9MdSVHNTROeTu339bDak0Z+N5ht5wRfjP7F4="
# SONA_PASS
- secure: "OIVtcj7AHZr8Grpf03ZmZsygcADewiYIvSnRwLYCx+5AqOzs39EZ68DsIOxi7wEXVUbVj5RvLXpKzLX3iN+UszLOQRoFPFQyyn+3Y50f8T2aRxdZtInzXn0sCVTj4Hhd/zbKl1W+2Nh3Sqazab7tFoQVzEyYqhcPeiNRMF7h+aY="
matrix:
# The empty SCALAJS_VERSION will only compile for the JVM
- SCALAJS_VERSION=
- SCALAJS_VERSION=0.6.28
- SCALAJS_VERSION=1.0.0
- ADOPTOPENJDK=8 SCALAJS_VERSION=
- ADOPTOPENJDK=8 SCALAJS_VERSION=0.6.32
- ADOPTOPENJDK=8 SCALAJS_VERSION=1.0.0
- ADOPTOPENJDK=11 SCALAJS_VERSION=

matrix:
include:
- env: SCALANATIVE_VERSION=0.3.9
jdk: oraclejdk8
- env: SCALANATIVE_VERSION=0.4.0-M2
jdk: oraclejdk8
- scala: 2.11.12
env: ADOPTOPENJDK=8 SCALANATIVE_VERSION=0.3.9
- scala: 2.11.12
env: ADOPTOPENJDK=8 SCALANATIVE_VERSION=0.4.0-M2

script: admin/build.sh
install:
- git fetch --tags # get all tags for sbt-dynver

script: ./build.sh

notifications:
email:
- adriaan.moors@lightbend.com
- seth.tisue@lightbend.com
- antoine@gourlay.fr

before_cache:
- find $HOME/.sbt -name "*.lock" | xargs rm
- find $HOME/.ivy2/cache -name "ivydata-*.properties" | xargs rm
cache:
directories:
- $HOME/.ivy2/cache
- $HOME/.sbt/boot
- $HOME/.sbt/launchers
72 changes: 0 additions & 72 deletions admin/README.md

This file was deleted.

62 changes: 0 additions & 62 deletions admin/build.sh

This file was deleted.

11 changes: 0 additions & 11 deletions admin/encryptEnvVars.sh

This file was deleted.

41 changes: 0 additions & 41 deletions admin/genKeyPair.sh

This file was deleted.

1 change: 0 additions & 1 deletion admin/gpg.sbt

This file was deleted.

9 changes: 0 additions & 9 deletions admin/publish-settings.sbt

This file was deleted.

18 changes: 0 additions & 18 deletions admin/pubring.asc

This file was deleted.

Binary file removed admin/secring.asc.enc
Binary file not shown.
46 changes: 17 additions & 29 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,23 +1,15 @@
import ScalaModulePlugin._
import sbtcrossproject.crossProject
import sbtcrossproject.CrossPlugin.autoImport.crossProject

crossScalaVersions in ThisBuild := List("2.12.8", "2.11.12", "2.13.0")

lazy val root = project.in(file("."))
.aggregate(`scala-parser-combinatorsJS`, `scala-parser-combinatorsJVM`, `scala-parser-combinatorsNative`)
.settings(disablePublishing)

lazy val `scala-parser-combinators` = crossProject(JSPlatform, JVMPlatform, NativePlatform).
withoutSuffixFor(JVMPlatform).in(file(".")).
settings(scalaModuleSettings: _*).
jvmSettings(scalaModuleSettingsJVM).
settings(
lazy val parserCombinators = crossProject(JVMPlatform, JSPlatform, NativePlatform)
.withoutSuffixFor(JVMPlatform).in(file("."))
.settings(ScalaModulePlugin.scalaModuleSettings)
.jvmSettings(ScalaModulePlugin.scalaModuleSettingsJVM)
.settings(
name := "scala-parser-combinators",
version := "1.1.2-SNAPSHOT",
mimaPreviousVersion := Some("1.1.0").filter(_ => System.getenv("SCALAJS_VERSION") != "1.0.0"),
scalaModuleMimaPreviousVersion := Some("1.1.0").filter(_ => System.getenv("SCALAJS_VERSION") != "1.0.0"),

apiMappings += (scalaInstance.value.libraryJar ->
url(s"https://www.scala-lang.org/api/${scalaVersion.value}/")),
url(s"https://www.scala-lang.org/api/${scalaVersion.value}/")),

scalacOptions in (Compile, doc) ++= Seq(
"-diagrams",
Expand All @@ -38,18 +30,18 @@ lazy val `scala-parser-combinators` = crossProject(JSPlatform, JVMPlatform, Nati
}
}
}
).
jvmSettings(
)
.jvmSettings(
OsgiKeys.exportPackage := Seq(s"scala.util.parsing.*;version=${version.value}"),
libraryDependencies += "junit" % "junit" % "4.12" % "test",
libraryDependencies += "com.novocode" % "junit-interface" % "0.11" % "test"
).
jsSettings(
libraryDependencies += "junit" % "junit" % "4.13" % Test,
libraryDependencies += "com.novocode" % "junit-interface" % "0.11" % Test
)
.jsSettings(
// Scala.js cannot run forked tests
fork in Test := false
).
jsConfigure(_.enablePlugins(ScalaJSJUnitPlugin)).
nativeSettings(
)
.jsConfigure(_.enablePlugins(ScalaJSJUnitPlugin))
.nativeSettings(
skip in compile := System.getProperty("java.version").startsWith("1.6") || !scalaVersion.value.startsWith("2.11"),
test := {},
libraryDependencies := {
Expand All @@ -58,7 +50,3 @@ lazy val `scala-parser-combinators` = crossProject(JSPlatform, JVMPlatform, Nati
else libraryDependencies.value
}
)

lazy val `scala-parser-combinatorsJVM` = `scala-parser-combinators`.jvm
lazy val `scala-parser-combinatorsJS` = `scala-parser-combinators`.js
lazy val `scala-parser-combinatorsNative` = `scala-parser-combinators`.native
Loading

0 comments on commit ee68234

Please sign in to comment.