Skip to content

Commit 5e24e78

Browse files
committed
Rebrand + move to the Maven Central + cross-build with Scala 2.13 release
1 parent ea396cb commit 5e24e78

File tree

15 files changed

+65
-87
lines changed

15 files changed

+65
-87
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright 2018 Sizmek, Inc.
189+
Copyright 2019 Andriy Plokhotnyuk, and respective contributors
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

README.md

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,18 @@ Currently, it doesn't support formatting string interpolator (`f""` literal), ho
1818

1919
## How to use
2020

21-
The library is published to JCenter, so please add a resolver for it in your `build.sbt` file or ensure that it is
22-
already added:
23-
24-
```sbt
25-
resolvers += Resolver.jcenterRepo
26-
```
27-
2821
Add the library to a dependency list:
2922

3023
```sbt
31-
libraryDependencies += "com.sizmek.fsi" %% "fsi-macros" % "0.5.0"
24+
libraryDependencies += "com.github.plokhotnyuk.fsi" %% "fsi-macros" % "0.5.0"
3225
```
3326

3427
Add import and replace prefix `s` by `fs` (or for a raw string interpolator `raw` by `fraw`):
3528

3629
```scala
37-
import com.sizmek.fsi._
30+
import com.github.plokhotnyuk.fsi._
3831

39-
val host = "sizmek.com"
32+
val host = "company.com"
4033
val path = "blog"
4134
fs"http://$host/$path"
4235
fraw"http://$host/$path"
@@ -80,20 +73,20 @@ the following code will be generated:
8073
{
8174
val fresh$macro$1: Int = f();
8275
val fresh$macro$2: Double = g();
83-
com.sizmek.fsi.`package`.stringBuilder().append('a').append(fresh$macro$1).append("bb").append(fresh$macro$2).toString();
76+
com.github.plokhotnyuk.fsi.`package`.stringBuilder().append('a').append(fresh$macro$1).append("bb").append(fresh$macro$2).toString();
8477
}: String
8578
```
8679

8780
You can check this by adding a compiler option: `scalacOptions += "-Ymacro-debug-lite"`.
8881

89-
In this code ```com.sizmek.fsi.`package`.stringBuilder()``` stands for getting a preallocated instance of
82+
In this code ```com.github.plokhotnyuk.fsi.`package`.stringBuilder()``` stands for getting a preallocated instance of
9083
`java.lang.StringBuilder` from the thread-local pool.
9184

9285
By default a buffer capacity of all created `java.lang.StringBuilder` instances is 16384 characters (32Kb). If limit
9386
is reached buffer size grows to ensure that whole string can fit in it. However next retrieval from the pool a new
9487
`java.lang.StringBuilder` instance will be allocated with the default size of the buffer and returned to avoid
9588
exhausting of Java heap. So if you want to work with longer strings without reallocations then set a greater value for
96-
the following JVM system property: `com.sizmek.fsi.buffer.size`.
89+
the following JVM system property: `com.github.plokhotnyuk.fsi.buffer.size`.
9790

9891
## How to contribute
9992

build.sbt

Lines changed: 30 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -29,27 +29,27 @@ def mimaSettings = mimaDefaultSettings ++ Seq(
2929
)
3030

3131
lazy val commonSettings = Seq(
32-
organization := "com.sizmek.fsi",
33-
organizationHomepage := Some(url("https://sizmek.com")),
34-
homepage := Some(url("https://github.com/Sizmek/fast-string-interpolator")),
32+
organization := "com.github.plokhotnyuk.fsi",
33+
organizationHomepage := Some(url("https://github.com/plokhotnyuk")),
34+
homepage := Some(url("https://github.com/plokhotnyuk/fast-string-interpolator")),
3535
licenses := Seq(("Apache-2.0", url("https://www.apache.org/licenses/LICENSE-2.0.html"))),
3636
startYear := Some(2018),
3737
developers := List(
3838
Developer(
3939
id = "plokhotnyuk",
4040
name = "Andriy Plokhotnyuk",
41-
email = "andriy.plokhotnyuk@sizmek.com",
42-
url = url("https://twitter.com/aplokhotnyuk")
41+
email = "plokhotnyuk@gmail.com",
42+
url = url("https://github.com/aplokhotnyuk")
4343
),
4444
Developer(
4545
id = "AnderEnder",
4646
name = "Andrii Radyk",
47-
email = "andrii.radyk@sizmek.com",
47+
email = "ander.ender@gmail.com",
4848
url = url("https://github.com/AnderEnder")
4949
),
5050
),
5151
scalaVersion := "2.12.8",
52-
resolvers += Resolver.jcenterRepo,
52+
resolvers += "Sonatype OSS Staging" at "https://oss.sonatype.org/content/repositories/staging",
5353
scalacOptions ++= Seq(
5454
"-deprecation",
5555
"-encoding", "UTF-8",
@@ -66,20 +66,16 @@ lazy val commonSettings = Seq(
6666

6767
lazy val noPublishSettings = Seq(
6868
skip in publish := true,
69-
publishArtifact := false,
70-
// Replace tasks to work around https://github.com/sbt/sbt-bintray/issues/93
71-
bintrayRelease := ((): Unit),
72-
bintrayEnsureBintrayPackageExists := ((): Unit),
73-
bintrayEnsureLicenses := ((): Unit),
69+
publishTo := Some(if (isSnapshot.value) Opts.resolver.sonatypeSnapshots else Opts.resolver.sonatypeStaging)
7470
)
7571

7672
lazy val publishSettings = Seq(
77-
bintrayOrganization := Some("sizmek"),
78-
bintrayRepository := "sizmek-maven",
73+
publishTo := Some(if (isSnapshot.value) Opts.resolver.sonatypeSnapshots else Opts.resolver.sonatypeStaging),
74+
sonatypeProfileName := "com.github.plokhotnyuk",
7975
scmInfo := Some(
8076
ScmInfo(
81-
url("https://github.com/Sizmek/fast-string-interpolator"),
82-
"scm:git@github.com:Sizmek/fast-string-interpolator.git"
77+
url("https://github.com/plokhotnyuk/fast-string-interpolator"),
78+
"scm:git@github.com:plokhotnyuk/fast-string-interpolator.git"
8379
)
8480
),
8581
publishConfiguration := {
@@ -88,12 +84,7 @@ lazy val publishSettings = Seq(
8884
publishConfiguration.value
8985
},
9086
publishMavenStyle := true,
91-
pomIncludeRepository := { _ => false },
92-
// FIXME: remove setting of overwrite flag when the following issue will be fixed: https://github.com/sbt/sbt/issues/3725
93-
publishConfiguration := publishConfiguration.value.withOverwrite(isSnapshot.value),
94-
publishSignedConfiguration := publishSignedConfiguration.value.withOverwrite(isSnapshot.value),
95-
publishLocalConfiguration := publishLocalConfiguration.value.withOverwrite(isSnapshot.value),
96-
publishLocalSignedConfiguration := publishLocalSignedConfiguration.value.withOverwrite(isSnapshot.value)
87+
pomIncludeRepository := { _ => false }
9788
)
9889

9990
lazy val `fast-string-interpolator` = project.in(file("."))
@@ -106,11 +97,14 @@ lazy val `fsi-macros` = project
10697
.settings(mimaSettings)
10798
.settings(publishSettings)
10899
.settings(
109-
crossScalaVersions := Seq("2.13.0-RC2", "2.13.0-RC1", "2.12.8", "2.11.12"),
110-
libraryDependencies ++= Seq(
111-
"org.scala-lang" % "scala-reflect" % scalaVersion.value,
112-
"org.scalatest" %% "scalatest" % (if (scalaVersion.value == "2.13.0-RC1") "3.0.8-RC3" else "3.0.8-RC5") % Test
113-
)
100+
crossScalaVersions := Seq("2.13.0", "2.12.8", "2.11.12"),
101+
libraryDependencies ++= Seq("org.scala-lang" % "scala-reflect" % scalaVersion.value),
102+
libraryDependencies ++=
103+
(if (scalaVersion.value == "2.13.0") {
104+
Seq("org.scalatest" % "scalatest_2.13.0-RC3" % "3.0.8-RC5" % Test)
105+
} else {
106+
Seq("org.scalatest" %% "scalatest" % "3.0.8-RC5" % Test)
107+
})
114108
)
115109

116110
lazy val `fsi-benchmark-core` = project
@@ -119,11 +113,14 @@ lazy val `fsi-benchmark-core` = project
119113
.settings(commonSettings)
120114
.settings(noPublishSettings)
121115
.settings(
122-
crossScalaVersions := Seq("2.13.0-RC2", "2.13.0-RC1", "2.12.8", "2.11.12"),
123-
libraryDependencies ++= Seq(
124-
"pl.project13.scala" % "sbt-jmh-extras" % "0.3.4",
125-
"org.scalatest" %% "scalatest" % (if (scalaVersion.value == "2.13.0-RC1") "3.0.8-RC3" else "3.0.8-RC5") % Test
126-
)
116+
crossScalaVersions := Seq("2.13.0", "2.12.8", "2.11.12"),
117+
libraryDependencies ++= Seq("pl.project13.scala" % "sbt-jmh-extras" % "0.3.4"),
118+
libraryDependencies ++=
119+
(if (scalaVersion.value == "2.13.0") {
120+
Seq("org.scalatest" % "scalatest_2.13.0-RC3" % "3.0.8-RC5" % Test)
121+
} else {
122+
Seq("org.scalatest" %% "scalatest" % "3.0.8-RC5" % Test)
123+
})
127124
)
128125

129126
lazy val `fsi-benchmark` = project
@@ -137,6 +134,6 @@ lazy val `fsi-benchmark` = project
137134
"com.dongxiguo" %% "fastring" % "1.0.0",
138135
"com.outr" %% "perfolation" % "1.1.2",
139136
"com.outr" %% "scribe-slf4j" % "2.7.7" % Test,
140-
"org.scalatest" %% "scalatest" % (if (scalaVersion.value == "2.13.0-RC1") "3.0.8-RC3" else "3.0.8-RC5") % Test
137+
"org.scalatest" %% "scalatest" % "3.0.8-RC5" % Test
141138
)
142139
)

fsi-benchmark-core/src/main/scala/com/sizmek/fsi/benchmark_core/NestedConcatenationBenchmarkCore.scala renamed to fsi-benchmark-core/src/main/scala/com/github/plokhotnyuk/fsi/benchmark_core/NestedConcatenationBenchmarkCore.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
package com.sizmek.fsi.benchmark_core
1+
package com.github.plokhotnyuk.fsi.benchmark_core
22

33
import java.util.concurrent.TimeUnit
44

5-
import com.sizmek.fsi._
5+
import com.github.plokhotnyuk.fsi._
66
import org.openjdk.jmh.annotations.{Benchmark, _}
77

88
import scala.language.postfixOps

fsi-benchmark-core/src/main/scala/com/sizmek/fsi/benchmark_core/SimpleConcatenationBenchmarkCore.scala renamed to fsi-benchmark-core/src/main/scala/com/github/plokhotnyuk/fsi/benchmark_core/SimpleConcatenationBenchmarkCore.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
package com.sizmek.fsi.benchmark_core
1+
package com.github.plokhotnyuk.fsi.benchmark_core
22

33
import java.util.concurrent.TimeUnit
44

5-
import com.sizmek.fsi._
5+
import com.github.plokhotnyuk.fsi._
66
import org.openjdk.jmh.annotations.{Benchmark, _}
77

88
@State(Scope.Benchmark)
@@ -37,7 +37,7 @@ class SimpleConcatenationBenchmarkCore {
3737
double = 10000d
3838
char = 'x'
3939
boolean = false
40-
string = "Sizmek is the largest independent buy-side advertising platform"
40+
string = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
4141
}
4242

4343
@Benchmark

fsi-benchmark-core/src/test/scala/com/sizmek/fsi/benchmark_core/NestedConcatenationBenchmarkCoreSpec.scala renamed to fsi-benchmark-core/src/test/scala/com/github/plokhotnyuk/fsi/benchmark_core/NestedConcatenationBenchmarkCoreSpec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.sizmek.fsi.benchmark_core
1+
package com.github.plokhotnyuk.fsi.benchmark_core
22

33
import org.scalatest.{Matchers, WordSpec}
44

fsi-benchmark-core/src/test/scala/com/sizmek/fsi/benchmark_core/SimpleConcatenationBenchmarkCoreSpec.scala renamed to fsi-benchmark-core/src/test/scala/com/github/plokhotnyuk/fsi/benchmark_core/SimpleConcatenationBenchmarkCoreSpec.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
package com.sizmek.fsi.benchmark_core
1+
package com.github.plokhotnyuk.fsi.benchmark_core
22

33
import org.scalatest.{Matchers, WordSpec}
44

55
class SimpleConcatenationBenchmarkCoreSpec extends WordSpec with Matchers {
66
private val benchmark = new SimpleConcatenationBenchmarkCore
77
private val expected =
8-
"10000xxx10000xxx10000.0xxx10000.0xxxxxxxfalsexxxSizmek is the largest independent buy-side advertising platform"
8+
"10000xxx10000xxx10000.0xxx10000.0xxxxxxxfalsexxxLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
99

1010
"SimpleConcatenationBenchmarkCode" should {
1111
"build the same string value" in {

fsi-benchmark/src/main/scala/com/sizmek/fsi/benchmark/NestedConcatenationBenchmark.scala renamed to fsi-benchmark/src/main/scala/com/github/plokhotnyuk/fsi/benchmark/NestedConcatenationBenchmark.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
package com.sizmek.fsi.benchmark
1+
package com.github.plokhotnyuk.fsi.benchmark
22

33
import com.dongxiguo.fastring.Fastring.Implicits._
4-
import com.sizmek.fsi.benchmark_core.NestedConcatenationBenchmarkCore
4+
import com.github.plokhotnyuk.fsi.benchmark_core.NestedConcatenationBenchmarkCore
55
import org.openjdk.jmh.annotations.Benchmark
66
import perfolation._
77

fsi-benchmark/src/main/scala/com/sizmek/fsi/benchmark/SimpleConcatenationBenchmark.scala renamed to fsi-benchmark/src/main/scala/com/github/plokhotnyuk/fsi/benchmark/SimpleConcatenationBenchmark.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
package com.sizmek.fsi.benchmark
1+
package com.github.plokhotnyuk.fsi.benchmark
22

33
import com.dongxiguo.fastring.Fastring.Implicits._
4-
import com.sizmek.fsi.benchmark_core.SimpleConcatenationBenchmarkCore
4+
import com.github.plokhotnyuk.fsi.benchmark_core.SimpleConcatenationBenchmarkCore
55
import org.openjdk.jmh.annotations.Benchmark
66
import perfolation._
77

fsi-benchmark/src/test/scala/com/sizmek/fsi/benchmark/NestedConcatenationBenchmarkSpec.scala renamed to fsi-benchmark/src/test/scala/com/github/plokhotnyuk/fsi/benchmark/NestedConcatenationBenchmarkSpec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.sizmek.fsi.benchmark
1+
package com.github.plokhotnyuk.fsi.benchmark
22

33
import org.scalatest.{Matchers, WordSpec}
44

0 commit comments

Comments
 (0)