Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
21 changes: 15 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,27 @@ jobs:
strategy:
matrix:
scala:
- 2.13.6
- 2.12.14
- 2.13.16
- 2.12.20
- 3.3.5

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: coursier/cache-action@v6

- name: scala
uses: olafurpg/setup-scala@v11
- name: setup Java 17
uses: actions/setup-java@v4
with:
java-version: openjdk@1.11
java-version: '17'
distribution: 'oracle'
cache: 'sbt'

- name: setup SBT
uses: sbt/setup-sbt@v1

- name: check code
run: sbt clean check

- name: build ${{ matrix.scala }}
run: sbt ++${{ matrix.scala }} clean coverage test
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Publish new Release
name: Publish Release

on:
release:
types: [published]
branches: [master]
push:
tags:
- 'v*'

jobs:
release:
uses: evolution-gaming/scala-github-actions/.github/workflows/release.yml@v1
uses: evolution-gaming/scala-github-actions/.github/workflows/release.yml@v3
secrets: inherit
33 changes: 24 additions & 9 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,46 @@ name := "hostname"

organization := "com.evolutiongaming"

homepage := Some(new URL("http://github.com/evolution-gaming/hostname"))
homepage := Some(new URL("https://github.com/evolution-gaming/hostname"))

startYear := Some(2018)

organizationName := "Evolution"

organizationHomepage := Some(url("http://evolution.com"))
organizationHomepage := Some(url("https://evolution.com"))

publishTo := Some(Resolver.evolutionReleases)

versionPolicyIntention := Compatibility.BinaryCompatible

scalaVersion := crossScalaVersions.value.head

crossScalaVersions := Seq("2.13.6", "2.12.14")
crossScalaVersions := Seq("2.13.16", "2.12.20", "3.3.5")

scalacOptions ++= crossSettings(
scalaVersion.value,
if3 = Seq(),
if2 = Seq(
"-Xsource:3",
)
)

Compile / doc / scalacOptions ++= Seq("-groups", "-implicits", "-no-link-warnings")

libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest" % "3.2.9" % Test,
"org.scalatest" %% "scalatest-funsuite" % "3.2.9" % Test
"org.scalatest" %% "scalatest" % "3.2.19" % Test,
"org.scalatest" %% "scalatest-funsuite" % "3.2.19" % Test
)

licenses := Seq(("MIT", url("https://opensource.org/licenses/MIT")))

releaseCrossBuild := true

//addCommandAlias("check", "all versionPolicyCheck Compile/doc")
addCommandAlias("check", "show version")
addCommandAlias("check", "versionPolicyCheck; +Compile/doc")
addCommandAlias("build", "+all compile test")

def crossSettings[T](scalaVersion: String, if3: Seq[T], if2: Seq[T]): Seq[T] = {
CrossVersion.partialVersion(scalaVersion) match {
case Some((3, _)) => if3
case Some((2, 12 | 13)) => if2
case _ => Nil
}
}
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.5.5
sbt.version=1.10.11
13 changes: 5 additions & 8 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.8.2")

addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.3.1")

addSbtPlugin("com.github.sbt" % "sbt-release" % "1.1.0")

addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.3.1")
addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.3.15")
addSbtPlugin("com.evolution" % "sbt-scalac-opts-plugin" % "0.0.9")

addSbtPlugin("com.evolution" % "sbt-artifactory-plugin" % "0.0.2")
addSbtPlugin("com.evolution" % "sbt-artifactory-plugin" % "0.0.2")
addSbtPlugin("ch.epfl.scala" % "sbt-version-policy" % "3.2.1")
addSbtPlugin("com.github.sbt" % "sbt-dynver" % "5.1.0")
4 changes: 2 additions & 2 deletions src/main/scala/com/evolutiongaming/hostname/HostName.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package com.evolutiongaming.hostname
import java.net.InetAddress
import java.util.concurrent.Executors

import scala.concurrent.duration._
import scala.concurrent.duration.*
import scala.concurrent.{Await, ExecutionContext, Future}
import scala.sys.process._
import scala.sys.process.*
import scala.util.Properties
import scala.util.control.NonFatal

Expand Down
1 change: 0 additions & 1 deletion version.sbt

This file was deleted.

Loading