Skip to content

Commit

Permalink
Update project layout and switch to sbt-release early
Browse files Browse the repository at this point in the history
  • Loading branch information
JanBessai committed Feb 22, 2018
1 parent a273b28 commit ceb6924
Show file tree
Hide file tree
Showing 13 changed files with 55 additions and 65 deletions.
22 changes: 22 additions & 0 deletions .travis.yml
@@ -0,0 +1,22 @@
sudo: false
language: scala
stages:
- test
- name: deploy
if: branch = master AND NOT type IN (pull_request)

script: sbt +test

jobs:
include:
- stage: test
jdk: oraclejdk8
- stage: test
jdk: openjdk8
script: sbt clean coverage +test && sbt coverageReport coveralls
- stage: deploy
jdk: openjdk8
script: |
openssl aes-256-cbc -K $encrypted_3b6b964f9930_key -iv $encrypted_3b6b964f9930_iv -in travis/secrets.tar.enc -out travis/local.secrets.tar -d &&
tar xv -C travis -f travis/local.secrets.tar &&
sbt +releaseEarly
10 changes: 7 additions & 3 deletions README.md
@@ -1,4 +1,8 @@
# shapeless-feat
[![Maven Central](https://img.shields.io/maven-central/v/org.combinators/shapeless-feat_2.12.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.combinators%22%20AND%20%22shapeless-feat%22)
[![build status](https://travis-ci.org/combinators/cls-scala.svg?branch=master)](https://travis-ci.org/combinators/shapeless-feat)
[![Coverage Status](https://coveralls.io/repos/github/combinators/shapeless-feat/badge.svg?branch=master)](https://coveralls.io/github/combinators/shapeless-feat?branch=master)
[![Join the chat at https://gitter.im/combinators/cls-scala](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/combinators/cls-scala)
## Shapeless Generic Functional Enumeration of Algebraic Data Types for Scala

This project brings [testing-feat](http://hackage.haskell.org/package/testing-feat) from Haskell over to Scala. The generics approach used in feat fits well with [shapeless](https://github.com/milessabin/shapeless), hence the name and out of the box support for generic programming.
Expand All @@ -12,16 +16,16 @@ To obtain the latest version, clone the reopsitory and run sbt and publishLocal.

The current release is available at maven central, just add
```scala
libraryDependencies += "de.tu_dortmund.cs.ls14" %% "shapeless-feat" % "0.2.1"
libraryDependencies += "org.combinators" %% "shapeless-feat" % "0.2.1"
```
Currently, Scala 2.11 and 2.12 are supported in the released version.

## Examples
Can be found in the [examples project](https://github.com/JanBessai/shapeless-feat/tree/master/examples/src/main/scala) and the [tests](https://github.com/JanBessai/shapeless-feat/tree/master/core/src/test/scala/shapeless/feat).
Can be found in the [examples project](https://github.com/combinators/shapeless-feat/tree/master/examples/src/main/scala) and the [tests](https://github.com/combinators/shapeless-feat/tree/master/src/test/scala/shapeless/feat).

## Help and Contributions

There is no Gitter/IRC channel yet, but you might try [shapeless](https://gitter.im/milessabin/shapeless) and find a contributor there.
Try the Gitter channel of [cls-scala](https://gitter.im/combinators/cls-scala).

### Contributers
- Jan Bessai
Expand Down
80 changes: 21 additions & 59 deletions build.sbt
@@ -1,44 +1,29 @@
/*
* Copyright (c) 2015 Jan Bessai
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import sbt.{Credentials, Developer, ScmInfo}

lazy val commonSettings = Seq(
organization := "de.tu_dortmund.cs.ls14",
releaseVersionBump := sbtrelease.Version.Bump.Minor,
releaseIgnoreUntrackedFiles := true,

scalaVersion := "2.12.4",
crossScalaVersions := Seq("2.11.12", scalaVersion.value),

resolvers ++= Seq(
Resolver.sonatypeRepo("releases"),
Resolver.sonatypeRepo("snapshots")
),

scalaVersion := "2.12.4",
crossScalaVersions := Seq("2.11.12", "2.12.4"),
releaseCrossBuild := true,
headerLicense := Some(HeaderLicense.ALv2("2018", "Jan Bessai")),

scalacOptions ++= Seq(
"-unchecked",
"-deprecation",
"-feature",
"-language:implicitConversions"
//,"-Xlog-implicits"
),
javaOptions in Test := Seq("-Xss16m"),
fork in Test := true
) ++ publishSettings

lazy val core = Project(id = "shapeless-feat", base = file("core")).
lazy val root = Project(id = "shapeless-feat", base = file(".")).
settings(commonSettings: _*).
settings(
moduleName := "shapeless-feat",
Expand All @@ -50,52 +35,29 @@ lazy val core = Project(id = "shapeless-feat", base = file("core")).
lazy val examples = Project(id = "shapeless-feat-examples", base = file("examples")).
settings(commonSettings: _*).
settings(noPublishSettings: _*).
dependsOn(core).
dependsOn(root).
settings(
moduleName := "shapeless-feat-examples"
)

lazy val root = (project in file(".")).
settings(commonSettings: _*).
settings(noPublishSettings: _*).
aggregate(core, examples).
settings(
moduleName := "shapeless-feat-root"
)

lazy val publishSettings = Seq(
publishMavenStyle := true,
publishArtifact in Test := false,
pomIncludeRepository := { _ => false },
releasePublishArtifactsAction := PgpKeys.publishSigned.value,
publishTo := { version { (v: String) =>
val nexus = "https://oss.sonatype.org/"
if (v.trim.endsWith("SNAPSHOT"))
Some("snapshots" at nexus + "content/repositories/snapshots")
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
}.value },
homepage := Some(url("https://www.github.com/JanBessai/shapeless-feat")),
licenses := Seq("Apache 2" -> url("http://www.apache.org/licenses/LICENSE-2.0.txt")),
scmInfo := Some(ScmInfo(url("https://github.com/JanBessai/shapeless-feat"), "scm:git:git@github.com:JanBessai/shapeless-feat.git")),
pomExtra := (
<developers>
<developer>
<id>JanBessai</id>
<name>Jan Bessai</name>
<url>http://janbessai.github.io/</url>
</developer>
</developers>
)
)
homepage := Some(url("https://www.github.com/JanBessai/shapeless-feat")),
licenses := Seq("Apache 2" -> url("http://www.apache.org/licenses/LICENSE-2.0.txt")),
scmInfo := Some(ScmInfo(url("https://github.com/JanBessai/shapeless-feat"), "scm:git:git@github.com:JanBessai/shapeless-feat.git")),
developers := List(
Developer("JanBessai", "Jan Bessai", "jan.bessai@tu-dortmund.de", url("http://janbessai.github.io"))
),

pgpPublicRing := file("travis/local.pubring.asc"),
pgpSecretRing := file("travis/local.secring.asc"),
)

lazy val noPublishSettings = Seq(
publish := (),
publishLocal := (),
publish := Seq.empty,
publishLocal := Seq.empty,
publishArtifact := false
)


)

credentials in ThisBuild ++= (for {
username <- Option(System.getenv().get("SONATYPE_USERNAME"))
Expand Down
7 changes: 5 additions & 2 deletions project/plugins.sbt
@@ -1,3 +1,6 @@
logLevel := Level.Warn
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.5.1")
addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.2.2")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.0")
addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.7")

addSbtPlugin("ch.epfl.scala" % "sbt-release-early" % "2.1.1")
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "4.0.0")
1 change: 0 additions & 1 deletion version.sbt

This file was deleted.

0 comments on commit ceb6924

Please sign in to comment.