-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
1,662 additions
and
418 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
|
||
tag_version=$1 | ||
|
||
mkdir ~/.bintray/ | ||
FILE=$HOME/.bintray/.credentials | ||
cat <<EOF >$FILE | ||
realm = Bintray API Realm | ||
host = api.bintray.com | ||
user = $BINTRAY_SNOWPLOW_MAVEN_USER | ||
password = $BINTRAY_SNOWPLOW_MAVEN_API_KEY | ||
EOF | ||
|
||
cd $TRAVIS_BUILD_DIR | ||
pwd | ||
|
||
project_version=$(sbt version -Dsbt.log.noformat=true | perl -ne 'print $1 if /(\d+\.\d+\.\d+[^\r\n]*)/') | ||
if [ "${project_version}" == "${tag_version}" ]; then | ||
sbt +publish | ||
sbt +bintraySyncMavenCentral | ||
else | ||
echo "Tag version '${tag_version}' doesn't match version in scala project ('${project_version}'). Aborting!" | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* Copyright (c) 2016-2017 Snowplow Analytics Ltd. All rights reserved. | ||
* | ||
* This program is licensed to you under the Apache License Version 2.0, | ||
* and you may not use this file except in compliance with the Apache License Version 2.0. | ||
* You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the Apache License Version 2.0 is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. | ||
*/ | ||
|
||
lazy val root = project.in(file(".")) | ||
.settings(Seq[Setting[_]]( | ||
name := "snowplow-scala-analytics-sdk", | ||
organization := "com.snowplowanalytics", | ||
version := "0.2.0", | ||
description := "Scala analytics SDK for Snowplow", | ||
scalaVersion := "2.10.6", | ||
crossScalaVersions := Seq("2.10.6", "2.11.5") | ||
)) | ||
.settings(BuildSettings.buildSettings) | ||
.settings(BuildSettings.publishSettings) | ||
.settings(Seq( | ||
shellPrompt := { _ => name.value + " > " } | ||
)) | ||
.settings( | ||
libraryDependencies ++= Seq( | ||
// Scala | ||
Dependencies.json4sJackson, | ||
Dependencies.s3, | ||
Dependencies.dynamodb, | ||
// Scala (test only) | ||
Dependencies.scalaCheck, | ||
Dependencies.specs2, | ||
Dependencies.specs2Scalacheck | ||
) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (c) 2016 Snowplow Analytics Ltd. All rights reserved. | ||
* Copyright (c) 2016-2017 Snowplow Analytics Ltd. All rights reserved. | ||
* | ||
* This program is licensed to you under the Apache License Version 2.0, | ||
* and you may not use this file except in compliance with the Apache License Version 2.0. | ||
|
@@ -10,35 +10,52 @@ | |
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. | ||
*/ | ||
|
||
// SBT | ||
import sbt._ | ||
import Keys._ | ||
|
||
// Bintray plugin | ||
import bintray.BintrayPlugin._ | ||
import bintray.BintrayKeys._ | ||
|
||
object BuildSettings { | ||
|
||
// Basic settings for our app | ||
lazy val basicSettings = Seq[Setting[_]]( | ||
organization := "com.snowplowanalytics", | ||
version := "0.1.1", | ||
description := "Scala analytics SDK for Snowplow", | ||
scalaVersion := "2.10.6", | ||
crossScalaVersions := Seq("2.10.6", "2.11.5"), | ||
scalacOptions := Seq("-deprecation", "-encoding", "utf8"), | ||
resolvers ++= Dependencies.resolutionRepos | ||
lazy val buildSettings = Seq( | ||
scalacOptions := Seq( | ||
"-deprecation", | ||
"-encoding", "UTF-8", | ||
"-feature", | ||
"-unchecked", | ||
"-Ywarn-dead-code", | ||
"-Ywarn-inaccessible", | ||
"-Ywarn-nullary-override", | ||
"-Ywarn-nullary-unit", | ||
"-Ywarn-numeric-widen", | ||
"-Ywarn-value-discard" | ||
) | ||
) | ||
|
||
// Publish settings | ||
// TODO: update with ivy credentials etc when we start using Nexus | ||
lazy val publishSettings = Seq[Setting[_]]( | ||
// Enables publishing to maven repo | ||
lazy val publishSettings = bintraySettings ++ Seq( | ||
publishMavenStyle := true, | ||
|
||
publishTo <<= version { version => | ||
val basePath = "target/repo/%s".format { | ||
if (version.trim.endsWith("SNAPSHOT")) "snapshots/" else "releases/" | ||
} | ||
Some(Resolver.file("Local Maven repository", file(basePath)) transactional()) | ||
} | ||
publishArtifact := true, | ||
publishArtifact in Test := false, | ||
licenses += ("Apache-2.0", url("http://www.apache.org/licenses/LICENSE-2.0.html")), | ||
bintrayOrganization := Some("snowplow"), | ||
bintrayRepository := "snowplow-maven", | ||
pomIncludeRepository := { _ => false }, | ||
homepage := Some(url("http://snowplowanalytics.com")), | ||
scmInfo := Some(ScmInfo(url("https://github.com/snowplow/scala-scala-analytics-sdk"), | ||
"scm:[email protected]:snowplow/snowplow-scala-analytics-sdk.git")), | ||
pomExtra := ( | ||
<developers> | ||
<developer> | ||
<name>Snowplow Analytics Ltd</name> | ||
<email>support@snowplowanalytics.com</email> | ||
<organization>Snowplow Analytics Ltd</organization> | ||
<organizationUrl>http://snowplowanalytics.com</organizationUrl> | ||
</developer> | ||
</developers>) | ||
) | ||
|
||
lazy val buildSettings = basicSettings ++ publishSettings | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.