Skip to content

Commit 3d8ed7c

Browse files
committed
1 parent e911b9b commit 3d8ed7c

File tree

4 files changed

+21
-21
lines changed

4 files changed

+21
-21
lines changed

src/sbt-test/sbt-protobuf/basic/build.sbt

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ scalaVersion := "2.10.7"
44

55
crossScalaVersions += "2.11.12"
66

7-
libraryDependencies += "com.google.protobuf" % "protobuf-java" % (version in ProtobufConfig).value % ProtobufConfig.name
7+
libraryDependencies += "com.google.protobuf" % "protobuf-java" % (ProtobufConfig / version).value % ProtobufConfig.name
88

9-
excludeFilter in ProtobufConfig := "test1.proto"
9+
ProtobufConfig / excludeFilter := "test1.proto"
1010

11-
unmanagedResourceDirectories in Compile += (sourceDirectory in ProtobufConfig).value
11+
(Compile / unmanagedResourceDirectories) += (ProtobufConfig / sourceDirectory).value
1212

1313
TaskKey[Unit]("checkJar") := {
14-
val jar = (packageBin in Compile).value
14+
val jar = (Compile / packageBin).value
1515
IO.withTemporaryDirectory{ dir =>
1616
val files = IO.unzip(jar, dir, "*.proto")
1717
val expect = Set("test1.proto", "test2.proto").map(dir / _)
@@ -20,4 +20,4 @@ TaskKey[Unit]("checkJar") := {
2020
}
2121

2222
// https://github.com/sbt/sbt-protobuf/issues/37
23-
mainClass in compile := Some("whatever")
23+
compile / mainClass := Some("whatever")

src/sbt-test/sbt-protobuf/multi-project/build.sbt

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ val foo = project.settings(
88

99
val bar = project.settings(
1010
commonSettings,
11-
protobufIncludePaths in ProtobufConfig += (sourceDirectory in ProtobufConfig in foo).value
11+
(ProtobufConfig / protobufIncludePaths) += (foo / ProtobufConfig / sourceDirectory).value
1212
).dependsOn(foo).enablePlugins(ProtobufPlugin)

src/sbt-test/sbt-protobuf/protojar/build.sbt

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ version := "0.1.0-SNAPSHOT"
44

55
scalaVersion := "2.10.7"
66

7-
libraryDependencies += "com.google.protobuf" % "protobuf-java" % (version in ProtobufConfig).value % ProtobufConfig.name
7+
libraryDependencies += "com.google.protobuf" % "protobuf-java" % (ProtobufConfig / version).value % ProtobufConfig.name
88

9-
protobufRunProtoc in ProtobufConfig := { args =>
9+
ProtobufConfig / protobufRunProtoc := { args =>
1010
com.github.os72.protocjar.Protoc.runProtoc("-v390" +: args.toArray)
1111
}
1212

13-
addArtifact(artifact in (ProtobufConfig, protobufPackage), protobufPackage in ProtobufConfig)
13+
addArtifact(ProtobufConfig / protobufPackage / artifact, ProtobufConfig / protobufPackage)
1414

1515
TaskKey[Unit]("checkJar") := {
16-
val jar = (protobufPackage in ProtobufConfig).value
16+
val jar = (ProtobufConfig / protobufPackage).value
1717
IO.withTemporaryDirectory{ dir =>
1818
val files = IO.unzip(jar, dir)
1919
val expect = Set(dir / "test1.proto", dir / "META-INF" / "MANIFEST.MF")

src/sbt-test/sbt-protobuf/task-scoped/build.sbt

+11-11
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,25 @@ crossScalaVersions += "2.11.12"
66

77
enablePlugins(ProtobufPlugin, ProtobufTestPlugin)
88

9-
version in PBT.ProtobufConfig := (version in ProtobufConfig).value
9+
(PBT.ProtobufConfig / version) := (ProtobufConfig / version).value
1010

11-
libraryDependencies += "com.google.protobuf" % "protobuf-java" % (version in ProtobufConfig).value % ProtobufConfig.name
11+
libraryDependencies += "com.google.protobuf" % "protobuf-java" % (ProtobufConfig / version).value % ProtobufConfig.name
1212

13-
libraryDependencies += "com.google.protobuf" % "protobuf-java" % (version in PBT.ProtobufConfig).value % PBT.ProtobufConfig.name
13+
libraryDependencies += "com.google.protobuf" % "protobuf-java" % (PBT.ProtobufConfig / version).value % PBT.ProtobufConfig.name
1414

15-
PBT.protobufRunProtoc in PBT.ProtobufConfig := (protobufRunProtoc in ProtobufConfig).value
15+
(PBT.ProtobufConfig / PBT.protobufRunProtoc) := (ProtobufConfig / protobufRunProtoc).value
1616

17-
excludeFilter in ProtobufConfig := "test1.proto"
17+
ProtobufConfig / excludeFilter := "test1.proto"
1818

19-
excludeFilter in PBT.ProtobufConfig := "test3.proto"
19+
PBT.ProtobufConfig / excludeFilter := "test3.proto"
2020

21-
unmanagedResourceDirectories in Compile += (sourceDirectory in ProtobufConfig).value
21+
(Compile / unmanagedResourceDirectories) += (ProtobufConfig / sourceDirectory).value
2222

23-
unmanagedResourceDirectories in Test += (sourceDirectory in PBT.ProtobufConfig).value
23+
(Test / unmanagedResourceDirectories) += (PBT.ProtobufConfig / sourceDirectory).value
2424

2525
TaskKey[Unit]("checkJar") := {
26-
val compileJar = (packageBin in Compile).value
27-
val testJar = (packageBin in Test).value
26+
val compileJar = (Compile / packageBin).value
27+
val testJar = (Test / packageBin).value
2828

2929
IO.withTemporaryDirectory{ dir =>
3030
val files = IO.unzip(compileJar, dir, "*.proto")
@@ -37,4 +37,4 @@ TaskKey[Unit]("checkJar") := {
3737
}
3838

3939
// https://github.com/sbt/sbt-protobuf/issues/37
40-
mainClass in compile := Some("whatever")
40+
compile / mainClass := Some("whatever")

0 commit comments

Comments
 (0)