Skip to content

Commit

Permalink
Merge pull request #113 from ing-bank/migrate-to-maven-central
Browse files Browse the repository at this point in the history
Migrate to maven central
  • Loading branch information
stswn authored Jun 7, 2021
2 parents 3e81eaa + cb56d3d commit a90fd06
Show file tree
Hide file tree
Showing 54 changed files with 152 additions and 139 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ Please view the [Releases](https://github.com/ing-bank/scruid/releases) page on

## Installation

The binaries are hosted on Bintray. We publish builds for Scala 2.11, 2.12 and 2.13.
The binaries are hosted on Maven Central. We publish builds for Scala 2.11, 2.12 and 2.13.

```sbt
libraryDependencies += "ing.wbaa.druid" %% "scruid" % "2.4.0"
libraryDependencies += "com.ing.wbaa.druid" %% "scruid" % "2.5.0"
```

## Example queries:
Expand Down
21 changes: 12 additions & 9 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,14 @@ def unusedWarnings(scalaVer: String): Seq[String] = {
}

lazy val commonSettings: Seq[Setting[_]] = Seq(
bintrayOrganization := Some("ing-bank"),
bintrayRepository := "maven-releases",
bintrayPackage := "scruid",
organization in ThisBuild := "ing.wbaa.druid",
organization in ThisBuild := "com.ing.wbaa.druid",
homepage in ThisBuild := Some(
url(s"https://github.com/${bintrayOrganization.value.get}/${name.value}/#readme")
url(s"https://github.com/ing-bank/${name.value}/#readme")
),
licenses in ThisBuild := Seq(
("Apache-2.0", url("https://www.apache.org/licenses/LICENSE-2.0.html"))
),
description in ThisBuild := "Scala library for composing Druid queries",
bintrayReleaseOnPublish in ThisBuild := false,
scalafmtOnCompile in ThisBuild := true,
developers in ThisBuild := List(
Developer("fokko", "Fokko Driesprong", "@fokkodriesprong", url("https://github.com/fokko")),
Expand All @@ -84,10 +80,17 @@ lazy val commonSettings: Seq[Setting[_]] = Seq(
),
scmInfo in ThisBuild := Some(
ScmInfo(
url(s"https://github.com/${bintrayOrganization.value.get}/${name.value}"),
s"[email protected]:${bintrayOrganization.value.get}/${name.value}.git"
url(s"https://github.com/ing-bank/${name.value}"),
s"[email protected]:ing-bank/${name.value}.git"
)
),
pomIncludeRepository in ThisBuild := { _ =>
false
},
publishMavenStyle in ThisBuild := true,
publishTo := sonatypePublishToBundle.value,
sonatypeProfileName := "com.ing",
sonatypeCredentialHost in ThisBuild := "s01.oss.sonatype.org",
crossScalaVersions in ThisBuild := Seq("2.11.12", "2.12.11", "2.13.2"),
scalaVersion in ThisBuild := "2.13.2",
scalacOptions ++= Seq(Opts.compile.deprecation, "-Xlint", "-feature"),
Expand All @@ -102,7 +105,7 @@ lazy val root = (project in file("."))
.settings(commonSettings)
.settings(
name := "scruid",
version := "2.4.0",
version in ThisBuild := "2.5.0",
libraryDependencies ++= Seq(
"com.typesafe" % "config" % typesafeConfigVersion,
"com.typesafe.scala-logging" %% "scala-logging" % typesafeLoggingVersion,
Expand Down
4 changes: 3 additions & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.1")

addSbtPlugin("com.codacy" % "sbt-codacy-coverage" % "3.0.3")

addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.5.6")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.7")

addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.0.1")

addSbtPlugin("com.lucidchart" % "sbt-scalafmt" % "1.16")

Expand Down
6 changes: 3 additions & 3 deletions src/main/resources/reference.conf
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ druid = {
health-endpoint = "/status/health"
health-endpoint = ${?DRUID_HEALTH_ENDPOINT}

//client-backend = "ing.wbaa.druid.client.DruidAdvancedHttpClient"
client-backend = "ing.wbaa.druid.client.DruidHttpClient"
//client-backend = "com.ing.wbaa.druid.client.DruidAdvancedHttpClient"
client-backend = "com.ing.wbaa.druid.client.DruidHttpClient"
client-backend = ${?DRUID_CLIENT_BACKEND}

// When it is required, Scruid also supports legacy mode in Scan Queries. By default, legacy mode is turned off.
Expand All @@ -56,7 +56,7 @@ druid = {
max-connection-lifetime = 15 min
}

request-interceptor = "ing.wbaa.druid.client.NoopRequestInterceptor"
request-interceptor = "com.ing.wbaa.druid.client.NoopRequestInterceptor"

request-interceptor-config = { }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package ing.wbaa.druid.client
package com.ing.wbaa.druid.client

import io.circe.java8.time._

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
* limitations under the License.
*/

package ing.wbaa.druid.sql
package com.ing.wbaa.druid.sql

import ing.wbaa.druid.{DruidConfig, SQLQuery, SQLQueryParameter}
import ing.wbaa.druid.definitions.QueryContext.{QueryContextParam, QueryContextValue}
import com.ing.wbaa.druid.{DruidConfig, SQLQuery, SQLQueryParameter}
import com.ing.wbaa.druid.definitions.QueryContext.{QueryContextParam, QueryContextValue}

trait SQLQueryFactory {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package ing.wbaa.druid.client
package com.ing.wbaa.druid.client

trait CirceDecoders {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
* limitations under the License.
*/

package ing.wbaa.druid.sql
package com.ing.wbaa.druid.sql

import ing.wbaa.druid.{DruidConfig, SQLQuery, SQLQueryParameter}
import ing.wbaa.druid.definitions.QueryContext.{QueryContextParam, QueryContextValue}
import com.ing.wbaa.druid.{DruidConfig, SQLQuery, SQLQueryParameter}
import com.ing.wbaa.druid.definitions.QueryContext.{QueryContextParam, QueryContextValue}

trait SQLQueryFactory {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package ing.wbaa.druid.client
package com.ing.wbaa.druid.client

trait CirceDecoders {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
* limitations under the License.
*/

package ing.wbaa.druid.sql
package com.ing.wbaa.druid.sql

import ing.wbaa.druid.{DruidConfig, SQLQuery, SQLQueryParameter}
import ing.wbaa.druid.definitions.QueryContext.{QueryContextParam, QueryContextValue}
import com.ing.wbaa.druid.{DruidConfig, SQLQuery, SQLQueryParameter}
import com.ing.wbaa.druid.definitions.QueryContext.{QueryContextParam, QueryContextValue}

trait SQLQueryFactory {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package ing.wbaa.druid
package com.ing.wbaa.druid

import java.net.URI
import java.time.ZoneId
Expand All @@ -27,8 +27,8 @@ import scala.language.implicitConversions
import scala.reflect.runtime.universe

import akka.actor.ActorSystem
import com.ing.wbaa.druid.client.{ DruidClient, DruidClientBuilder }
import com.typesafe.config.{ Config, ConfigException, ConfigFactory }
import ing.wbaa.druid.client.{ DruidClient, DruidClientBuilder }

/*
* Druid API Config Immutable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package ing.wbaa.druid
package com.ing.wbaa.druid

import java.time.ZonedDateTime

Expand All @@ -24,8 +24,8 @@ import scala.concurrent.{ ExecutionContext, Future }
import akka.NotUsed
import akka.stream.scaladsl.Source
import ca.mrvisser.sealerate
import ing.wbaa.druid.definitions._
import ing.wbaa.druid.definitions.QueryContext.{ QueryContextParam, QueryContextValue }
import com.ing.wbaa.druid.definitions._
import com.ing.wbaa.druid.definitions.QueryContext.{ QueryContextParam, QueryContextValue }
import io.circe._
import io.circe.generic.auto._
import io.circe.syntax._
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
* limitations under the License.
*/

package ing.wbaa.druid
package com.ing.wbaa.druid

import java.time._

import scala.collection.immutable.ListMap

// DO NOT REMOVE: required for scala 2.11
import cats.syntax.either._
import ing.wbaa.druid.client.CirceDecoders
import com.ing.wbaa.druid.client.CirceDecoders
import io.circe._
import io.circe.Decoder.Result
import io.circe.generic.semiauto.deriveDecoder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package ing.wbaa.druid
package com.ing.wbaa.druid

// DO NOT REMOVE: required for scala 2.11
import cats.syntax.either._
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
* limitations under the License.
*/

package ing.wbaa.druid
package com.ing.wbaa.druid

import ing.wbaa.druid.definitions.QueryContext.{ QueryContextParam, QueryContextValue }
import ing.wbaa.druid.sql.{ ParameterConversions, SQLQueryFactory }
import com.ing.wbaa.druid.definitions.QueryContext.{ QueryContextParam, QueryContextValue }
import com.ing.wbaa.druid.sql.{ ParameterConversions, SQLQueryFactory }

object SQL extends SQLQueryFactory with ParameterConversions {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ing.wbaa.druid.auth.basic
package com.ing.wbaa.druid.auth.basic

import akka.http.scaladsl.model.HttpRequest
import akka.http.scaladsl.model.headers.{ Authorization, BasicHttpCredentials }
import com.typesafe.config.{ Config, ConfigFactory, ConfigValueFactory }
import com.typesafe.scalalogging.LazyLogging
import ing.wbaa.druid.client.{
import com.ing.wbaa.druid.client.{
NoopRequestInterceptor,
RequestInterceptor,
RequestInterceptorBuilder
}
import com.typesafe.config.{ Config, ConfigFactory, ConfigValueFactory }
import com.typesafe.scalalogging.LazyLogging

/**
* Adds a basic authentication header with static credentials to every outgoing request. Does not
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package ing.wbaa.druid.client
package com.ing.wbaa.druid.client

import scala.concurrent.{ ExecutionContext, ExecutionContextExecutor, Future, Promise }
import scala.concurrent.duration._
Expand All @@ -32,9 +32,16 @@ import akka.http.scaladsl.settings.ConnectionPoolSettings
import akka.pattern.retry
import akka.stream._
import akka.stream.scaladsl._
import com.ing.wbaa.druid.{
BaseResult,
DruidConfig,
DruidQuery,
DruidResponse,
QueryHost,
QueryType
}
import com.ing.wbaa.druid.client.DruidAdvancedHttpClient.ConnectionFlow
import com.typesafe.config.{ Config, ConfigException, ConfigFactory, ConfigValueFactory }
import ing.wbaa.druid.{ BaseResult, DruidConfig, DruidQuery, DruidResponse, QueryHost, QueryType }
import ing.wbaa.druid.client.DruidAdvancedHttpClient.ConnectionFlow

class DruidAdvancedHttpClient private (
connectionFlow: DruidAdvancedHttpClient.ConnectionFlow,
Expand Down Expand Up @@ -128,7 +135,8 @@ class DruidAdvancedHttpClient private (

Source
.fromFuture(
createHttpRequest(query).map(request => requestInterceptor.interceptRequest(request) -> responsePromise)
createHttpRequest(query)
.map(request => requestInterceptor.interceptRequest(request) -> responsePromise)
)
.via(connectionFlow)
.flatMapConcat {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package ing.wbaa.druid.client
package com.ing.wbaa.druid.client

import scala.concurrent.{ ExecutionContextExecutor, Future }
import scala.concurrent.duration.FiniteDuration
Expand All @@ -26,8 +26,8 @@ import akka.actor.ActorSystem
import akka.http.scaladsl.model.{ HttpEntity, HttpResponse, StatusCodes }
import akka.stream.ActorMaterializer
import akka.stream.scaladsl._
import com.ing.wbaa.druid._
import com.typesafe.scalalogging.{ LazyLogging, Logger }
import ing.wbaa.druid._
import io.circe.Json
import io.circe.parser.decode
import org.mdedetrich.akka.http.support.CirceHttpSupport
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package ing.wbaa.druid.client
package com.ing.wbaa.druid.client

import scala.concurrent.{ ExecutionContextExecutor, Future }

Expand All @@ -27,7 +27,7 @@ import akka.http.scaladsl.model._
import akka.http.scaladsl.model.ContentTypes._
import akka.stream.ActorMaterializer
import akka.stream.scaladsl._
import ing.wbaa.druid._
import com.ing.wbaa.druid._

class DruidHttpClient private (connectionFlow: DruidHttpClient.ConnectionFlowType,
queryHost: QueryHost)(implicit system: ActorSystem)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ing.wbaa.druid.client
package com.ing.wbaa.druid.client

import scala.collection.immutable.Seq
import scala.util.Try
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ing.wbaa.druid.client
package com.ing.wbaa.druid.client

import scala.concurrent._

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package ing.wbaa.druid
package com.ing.wbaa.druid
package definitions

import ca.mrvisser.sealerate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ing.wbaa.druid
package com.ing.wbaa.druid
package definitions

import ca.mrvisser.sealerate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package ing.wbaa.druid
package com.ing.wbaa.druid
package definitions

import ca.mrvisser.sealerate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package ing.wbaa.druid
package com.ing.wbaa.druid
package definitions

import ca.mrvisser.sealerate
Expand Down
Loading

0 comments on commit a90fd06

Please sign in to comment.