Skip to content

Commit f12b134

Browse files
Setup publishing to maven central for scalafix rules (fix scala#73)
1 parent 0f5ceb3 commit f12b134

File tree

5 files changed

+31
-11
lines changed

5 files changed

+31
-11
lines changed

.travis.yml

+14-7
Original file line numberDiff line numberDiff line change
@@ -54,17 +54,24 @@ matrix:
5454
# | oraclejdk8 | 2.13.0-M4 | jvm | | |
5555
# | oraclejdk8 | 2.13.0-M4 | js | 0.6.23 | |
5656
# | oraclejdk8 | 2.12.6 | jvm | | true |
57-
57+
5858
before_script: ./checkCLA.sh
5959
script:
6060
- java -version
6161
- admin/build.sh
6262

63-
before_cache:
64-
- find $HOME/.sbt -name "*.lock" | xargs rm
65-
- find $HOME/.ivy2/cache -name "ivydata-*.properties" | xargs rm
6663
cache:
6764
directories:
68-
- $HOME/.ivy2/cache
69-
- $HOME/.sbt/boot
70-
- $HOME/.sbt/launchers
65+
- "$HOME/.sbt/0.13/dependency"
66+
- "$HOME/.sbt/boot/scala*"
67+
- "$HOME/.sbt/launchers"
68+
- "$HOME/.ivy2/cache"
69+
- "$HOME/.coursier"
70+
71+
before_cache:
72+
- du -h -d 1 $HOME/.ivy2/cache
73+
- du -h -d 2 $HOME/.sbt/
74+
- find $HOME/.sbt -name "*.lock" -type f -delete
75+
- find $HOME/.ivy2/cache -name "ivydata-*.properties" -type f -delete
76+
- find $HOME/.ivy2/cache -name "*scalafix*.xml" -type f -delete
77+
- rm -rf $HOME/.ivy2/local

admin/build.sh

+12-3
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,14 @@ RELEASE_COMBO=true
2020

2121
if [[ "$TEST_SCALAFIX" == "true" ]]; then
2222
sbt scalafixTests/test
23-
exit 0
2423
fi
2524

2625
if [ "$SCALAJS_VERSION" = "" ]; then
27-
projectPrefix="compat"
26+
if [[ "$TEST_SCALAFIX" == "true" ]]; then
27+
projectPrefix="scalafixRules"
28+
else
29+
projectPrefix="compat"
30+
fi
2831
else
2932
projectPrefix="compatJS"
3033
fi
@@ -52,4 +55,10 @@ if [[ "$TRAVIS_TAG" =~ $tagPat ]]; then
5255
fi
5356
fi
5457
55-
sbt -Dhttps.protocols=TLSv1.2 "++$TRAVIS_SCALA_VERSION" "$publishVersion" "$projectPrefix/clean" "$projectPrefix/test" "$projectPrefix/publishLocal" "$publishTask"
58+
sbt -Dhttps.protocols=TLSv1.2 \
59+
"++$TRAVIS_SCALA_VERSION" \
60+
"$publishVersion" \
61+
"$projectPrefix/clean" \
62+
"$projectPrefix/test" \
63+
"$projectPrefix/publishLocal" \
64+
"$publishTask"

build.sbt

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,13 @@ lazy val compatJS = compat.js
5151
lazy val scalafixRules = project
5252
.in(file("scalafix-rules"))
5353
.settings(scalaModuleSettings)
54+
.settings(scalaModuleSettingsJVM)
5455
.settings(
5556
name := "scala-collection-migrations",
5657
scalaVersion := scalafixScala212,
5758
libraryDependencies += "ch.epfl.scala" %% "scalafix-core" % scalafixVersion
5859
)
5960

60-
6161
// == Scalafix Test Setup ==
6262

6363
lazy val scalafixInput = project

project/plugins.sbt

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import coursier.util.Properties.{version => coursierVersion}
2+
13
if (System.getProperty("java.version").startsWith("1."))
24
Seq()
35
else
@@ -12,3 +14,4 @@ addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "0.4.0")
1214
addSbtPlugin("org.scala-lang.modules" % "sbt-scala-module" % "1.0.14")
1315
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.5.10")
1416
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.7.0")
17+
addSbtPlugin("io.get-coursier" % "sbt-coursier" % coursierVersion)

project/project/plugins.sbt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
addSbtPlugin("io.get-coursier" % "sbt-coursier" % "1.1.0-M4")

0 commit comments

Comments
 (0)