Skip to content

Commit c7fe661

Browse files
author
Joachim Hofer
committed
Prepare for signed publishing via sbt-pgp.
Add project url, scm information and developers to generated pom. Split up build files.
1 parent 76304c4 commit c7fe661

File tree

6 files changed

+66
-19
lines changed

6 files changed

+66
-19
lines changed

.travis.yml

+10
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
11
language: scala
2+
23
scala:
34
- 2.10.4
45
- 2.11.2
6+
57
jdk:
68
- oraclejdk7
9+
10+
# (as soon as we have the encrypted keyrings)
11+
#
12+
# before_install:
13+
# - openssl aes-256-cbc -pass pass:$PGP_ENCRYPTION_PASSWORD -in secring.gpg.enc -out local.secring.gpg -d
14+
# - openssl aes-256-cbc -pass pass:$PGP_ENCRYPTION_PASSWORD -in pubring.gpg.enc -out local.pubring.gpg -d
15+
716
after_success:
817
- ./publishViaTravis.sh
18+
919
env:
1020
global:
1121
- secure: Crf4hu2G53xisZChdK0Tam/FSBX/UpbPwGi0sJq5rPSlUt3jEp/AUFnlYiKD1oWtteWHvTgdh1IRqfZfLG0G49hT9+V0knvCTAtY6tPGI+0I/L/WctINIRxMec7JdArKhwxLBJGfYN2U1XM5lGWn6ge/X+CVOFuygk8GN/+688Q=

build.sbt

-19
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
1-
import bintray.BintrayCredentials.api
2-
import bintray.Keys._
3-
41
organization := "io.reactivex"
52

63
name := "rxscala"
74

8-
version := sys.env.getOrElse("TRAVIS_TAG", "x.y-SNAPSHOT")
9-
105
lazy val root = project in file(".")
116

127
lazy val examples = project in file("examples") dependsOn root
@@ -22,17 +17,3 @@ libraryDependencies ++= Seq(
2217
"org.mockito" % "mockito-core" % "1.9.5" % "test",
2318
"junit" % "junit-dep" % "4.11" % "test",
2419
"org.scalatest" %% "scalatest" % "2.2.2" % "test")
25-
26-
bintraySettings
27-
28-
repository in bintray := "RxJava"
29-
30-
name in bintray := "RxScala"
31-
32-
licenses += ("Apache-2.0", url("https://www.apache.org/licenses/LICENSE-2.0.html"))
33-
34-
bintrayOrganization in bintray := Some("reactivex")
35-
36-
lazy val storeBintrayCredentials = taskKey[Unit]("store bintray credentials")
37-
38-
storeBintrayCredentials := IO.write(credentialsFile.value, api.template(sys env "bintrayUser", sys env "bintrayKey"))

project/gpg.sbt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
addSbtPlugin("com.typesafe.sbt" % "sbt-pgp" % "0.8.3")

publish.sbt

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
import bintray.BintrayCredentials.api
2+
import bintray.Keys._
3+
4+
pgpSecretRing := file("local.secring.gpg")
5+
6+
pgpPublicRing := file("local.pubring.gpg")
7+
8+
pgpPassphrase := sys.env get "PGP_PASSPHRASE" map (_ toCharArray)
9+
10+
bintraySettings
11+
12+
repository in bintray := "RxJava"
13+
14+
name in bintray := "RxScala"
15+
16+
licenses += ("The Apache Software License, Version 2.0", url("https://www.apache.org/licenses/LICENSE-2.0.txt"))
17+
18+
bintrayOrganization in bintray := Some("reactivex")
19+
20+
lazy val storeBintrayCredentials = taskKey[Unit]("store bintray credentials")
21+
22+
storeBintrayCredentials := IO.write(credentialsFile.value, api.template(sys env "bintrayUser", sys env "bintrayKey"))
23+
24+
pomExtra := (
25+
<url>https://github.com/ReactiveX/RxScala</url>
26+
<scm>
27+
<url>git@github.com:ReactiveX/RxScala.git</url>
28+
<connection>scm:git:git@github.com:ReactiveX/RxScala.git</connection>
29+
</scm>
30+
<developers>
31+
<developer>
32+
<id>benjchristensen</id>
33+
<name>Ben Christensen</name>
34+
<email>benjchristensen@netflix.com</email>
35+
</developer>
36+
<developer>
37+
<id>jmhofer</id>
38+
<name>Joachim Hofer</name>
39+
<email>jmhofer.github@johoop.de</email>
40+
</developer>
41+
<developer>
42+
<id>samuelgruetter</id>
43+
<name>Samuel Grütter</name>
44+
</developer>
45+
<developer>
46+
<id>zsxwing</id>
47+
<name>Shixiong Zhu</name>
48+
</developer>
49+
</developers>
50+
)

publishViaTravis.sh

+4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ if [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then
88

99
sbt storeBintrayCredentials
1010

11+
# (as soon as we have the keyrings)
12+
# sbt ++$TRAVIS_SCALA_VERSION publishSigned
13+
# RETVAL=$?
14+
1115
sbt ++$TRAVIS_SCALA_VERSION publish
1216
RETVAL=$?
1317

version.sbt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
version := sys.env getOrElse ("TRAVIS_TAG", "x.y-SNAPSHOT")

0 commit comments

Comments
 (0)