Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removes Scalajs & Scala 2.11 support #309

Merged
merged 7 commits into from
Dec 18, 2019
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 13 additions & 44 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,7 @@
language: scala

dist: trusty

scala:
- 2.11.12
- 2.12.8

env:
- SCALAENV=jvm
- SCALAENV=js
- SCALAENV=all
- G4SBUILD=docs

matrix:
exclude:
- scala: 2.11.12
env: G4SBUILD=docs
- env: SCALAENV=all

jdk:
- oraclejdk11
- oraclejdk11

before_install:
- if [ "$TRAVIS_BRANCH" = "master" -a "$TRAVIS_PULL_REQUEST" = "false" ]; then
Expand All @@ -28,36 +10,24 @@ before_install:
- export PATH=${PATH}:./vendor/bundle

install:
- rvm use 2.3.8 --install --fuzzy
- gem update --system
- gem install sass
- gem install ruby_dep -v 1.3.1
- gem install jekyll -v 3.4.3
- gem install jekyll-redirect-from
- nvm install 6
- nvm use 6
- node --version

before_script:
- sudo chmod +x /usr/local/bin/sbt
# Disabled due to unrelated conflicts running the build in travis
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

# - rvm use 2.6.0 --install --fuzzy
# - gem update --system
# - gem install sass
# - gem install jekyll -v 4.0.0

script:
- if [ "$SCALAENV" = "jvm" ]; then
sbt ++$TRAVIS_SCALA_VERSION $SBT_JAVA_OPT validateJVM;
elif [ "$SCALAENV" = "js" ]; then
sbt ++$TRAVIS_SCALA_VERSION $SBT_JAVA_OPT compile;
sbt ++$TRAVIS_SCALA_VERSION $SBT_JAVA_OPT validateJS;
elif [ "$G4SBUILD" = "docs" ]; then
sbt ++$TRAVIS_SCALA_VERSION $SBT_JAVA_OPT docs/tut;
else
echo "You might not be invited to the party";
fi
stages:
- test
- deploy

after_success:
- bash <(curl -s https://codecov.io/bash)

jobs:
include:
- script:
- sbt ++$TRAVIS_SCALA_VERSION $SBT_JAVA_OPT validate;
- sbt ++$TRAVIS_SCALA_VERSION $SBT_JAVA_OPT docs/tut;
- stage: deploy
script:
- if [ "$TRAVIS_BRANCH" = "master" -a "$TRAVIS_PULL_REQUEST" = "false" ]; then
Expand All @@ -73,8 +43,7 @@ jobs:
sbt docs/publishMicrosite;
fi
fi
scala: 2.12.8
env: SCALAENV=all
scala: 2.12.10

before_cache:
- du -h -d 1 $HOME/.ivy2/cache
Expand Down
14 changes: 0 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,8 @@ Github4s

## Installation

Github4s is compatible with both Scala JVM and Scala.js. It supports 2.10, 2.11 and 2.12.

To get started with SBT, simply add the following to your build.sbt file.

For Scala.jvm:

[comment]: # (Start Replace)

```scala
Expand All @@ -26,16 +22,6 @@ libraryDependencies += "com.47deg" %% "github4s" % "0.20.1"

[comment]: # (End Replace)

For Scala.js:

[comment]: # (Start Replace)

```scala
libraryDependencies += "com.47deg" %%% "github4s" % "0.20.1"
```

[comment]: # (End Replace)

## Github4s in the wild

If you wish to add your library here please consider a PR to include it in the list below.
Expand Down
42 changes: 5 additions & 37 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import sbtorgpolicies.runnable.syntax._
// shadow sbt-scalajs' crossProject and CrossType from Scala.js 0.6.x
import sbtcrossproject.CrossPlugin.autoImport.{crossProject, CrossType}

pgpPassphrase := Some(getEnvVar("PGP_PASSPHRASE").getOrElse("").toCharArray)
pgpPublicRing := file(s"$gpgFolder/pubring.gpg")
Expand All @@ -13,7 +11,7 @@ lazy val root = (project in file("."))
.settings(noPublishSettings: _*)

lazy val github4s =
(crossProject(JSPlatform, JVMPlatform) in file("github4s"))
(project in file("github4s"))
.settings(moduleName := "github4s")
.enablePlugins(BuildInfoPlugin)
.settings(
Expand All @@ -23,48 +21,19 @@ lazy val github4s =
"token" -> sys.env.getOrElse("GITHUB4S_ACCESS_TOKEN", "")),
buildInfoPackage := "github4s"
)
.settings(commonCrossDeps: _*)
.settings(standardCommonDeps: _*)
.jvmSettings(jvmDeps: _*)
.jsSettings(jsDeps: _*)
.jsSettings(sharedJsSettings: _*)
.jsSettings(testSettings: _*)

lazy val github4sJVM = github4s.jvm
lazy val github4sJS = github4s.js

lazy val scalaz = (project in file("scalaz"))
.settings(moduleName := "github4s-scalaz")
.settings(scalazDependencies: _*)
.dependsOn(github4sJVM)
.settings(coreDeps: _*)

lazy val catsEffect =
(crossProject(JSPlatform, JVMPlatform) in file("cats-effect"))
(project in file("cats-effect"))
.settings(moduleName := "github4s-cats-effect")
.settings(catsEffectDependencies: _*)
.jsSettings(sharedJsSettings: _*)
.jsSettings(testSettings: _*)
.dependsOn(github4s)

lazy val catsEffectJVM = catsEffect.jvm
lazy val catsEffectJS = catsEffect.js

/////////////////////
//// ALL MODULES ////
/////////////////////

lazy val jvmModules: Seq[ProjectReference] = Seq(
github4sJVM,
scalaz,
catsEffectJVM
)

lazy val jsModules: Seq[ProjectReference] = Seq(
github4sJS,
catsEffectJS
)

lazy val allModules: Seq[ProjectReference] = jvmModules ++ jsModules
lazy val allModules: Seq[ProjectReference] = Seq(github4s, catsEffect)

lazy val allModulesDeps: Seq[ClasspathDependency] =
allModules.map(ClasspathDependency(_, None))
Expand All @@ -86,8 +55,7 @@ lazy val docs = (project in file("docs"))
//////////

addCommandAlias("validateDocs", ";project docs;tut;project root")
addCommandAlias("validateJVM", (toCompileTestList(jvmModules) ++ List("project root")).asCmd)
addCommandAlias("validateJS", (toCompileTestList(jsModules) ++ List("project root")).asCmd)
addCommandAlias("validateJVM", (toCompileTestList(allModules) ++ List("project root")).asCmd)
addCommandAlias(
"validate",
";clean;compile;coverage;validateJVM;coverageReport;coverageAggregate;coverageOff")

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

3 changes: 0 additions & 3 deletions docs/src/main/tut/activity.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ import github4s.Github
import github4s.Github._
import github4s.jvm.Implicits._
import scalaj.http.HttpResponse
// if you're using ScalaJS, replace occurrences of HttpResponse by SimpleHttpResponse
//import github4s.js.Implicits._
//import fr.hmil.roshttp.response.SimpleHttpResponse

val accessToken = sys.env.get("GITHUB4S_ACCESS_TOKEN")
```
Expand Down
Loading