From 78af1570d864d5afebc635d042f96965790e86b5 Mon Sep 17 00:00:00 2001 From: Patrik Nordwall Date: Fri, 22 Sep 2023 12:39:52 +0200 Subject: [PATCH] chore: Drop Scala 2.12 * build plugins are still on 2.12 --- .github/workflows/build-test.yml | 6 +++--- .github/workflows/nightly.yml | 4 ---- build.sbt | 7 ++++--- docs/release-train-issue-template.md | 2 +- docs/src/main/paradox/client/walkthrough.md | 6 +++--- docs/src/main/paradox/server/grpc-web.md | 2 +- docs/src/main/paradox/server/walkthrough.md | 6 +++--- gradle-plugin/src/test/groovy/helper/BaseSpec.groovy | 2 +- plugin-tester-java/pom.xml | 6 +++--- plugin-tester-scala/pom.xml | 12 ++++++------ project/Dependencies.scala | 2 +- .../sbt-test/gen-java/01-gen-basic-java/build.sbt | 4 +--- .../src/sbt-test/gen-java/01-gen-basic-java/test | 10 +++++----- .../sbt-test/gen-java/02-server-reflection/build.sbt | 4 +--- .../src/sbt-test/gen-java/02-server-reflection/test | 10 +++++----- .../sbt-test/gen-java/03-no-java-package/build.sbt | 4 +--- .../src/sbt-test/gen-java/03-no-java-package/test | 2 +- .../sbt-test/gen-java/04-crash-on-keywords/build.sbt | 4 +--- .../build.sbt | 4 +--- .../05-duplicate-messages-different-packages/test | 2 +- .../sbt-test/gen-scala-server/00-interop/build.sbt | 2 ++ .../src/main/scala/akka/grpc/TestServiceImpl.scala | 4 ++-- .../gen-scala-server/01-gen-basic-server/build.sbt | 2 ++ .../gen-scala-server/01-gen-basic-server/test | 10 +++++----- .../gen-scala-server/02-multiple-services/build.sbt | 2 ++ .../gen-scala-server/03-test-config/build.sbt | 2 ++ .../sbt-test/gen-scala-server/03-test-config/test | 12 ++++++------ .../gen-scala-server/04-server-reflection/build.sbt | 2 ++ .../main/scala/example/myapp/helloworld/Main.scala | 4 ++-- .../gen-scala-server/04-server-reflection/test | 8 ++++---- .../gen-scala-server/05-no-java-package/build.sbt | 2 ++ .../gen-scala-server/05-no-java-package/test | 8 ++++---- .../06-compatibility-plugins/build.sbt | 2 ++ .../gen-scala-server/06-compatibility-plugins/test | 8 ++++---- .../07-gen-basic-server-with-akka-27/build.sbt | 2 ++ .../09-scalapb-customizations/build.sbt | 2 ++ .../gen-scala-server/09-scalapb-customizations/test | 6 +++--- .../gen-scala-server/10-scalapb-validate/build.sbt | 2 ++ .../build.sbt | 2 ++ .../11-duplicate-messages-different-packages/test | 8 ++++---- 40 files changed, 99 insertions(+), 90 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 5384e3ac9..ba2593f39 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -69,7 +69,7 @@ jobs: strategy: fail-fast: false matrix: - scalaVersion: [2.12, 2.13, 3.3] + scalaVersion: [2.13, 3.3] steps: - name: Checkout uses: actions/checkout@v3.1.0 @@ -98,9 +98,9 @@ jobs: matrix: include: - test-set: gen-scala-server - scala-version: 2.12 + scala-version: 2.13 - test-set: gen-java - scala-version: 2.12 + scala-version: 2.13 - test-set: scala-2_13 scala-version: 2.13 - test-set: scala3 diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index d065a947f..e4663780c 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -18,10 +18,6 @@ jobs: matrix: include: # leaving out combinations covered in `build-test.yml` - - { scalaVersion: "2.12", jdkVersion: "1.8.0", jvmName: "temurin:1.8.0", extraOpts: '' } - # { scalaVersion: "2.12", jdkVersion: "1.11.0", jvmName: "temurin:1.11.0", extraOpts: '-J-XX:+UnlockExperimentalVMOptions -J-XX:+UseJVMCICompiler' } - - { scalaVersion: "2.12", jdkVersion: "1.17.0", jvmName: "temurin:1.17.0", extraOpts: '' } - - { scalaVersion: "2.13", jdkVersion: "1.8.0", jvmName: "temurin:1.8.0", extraOpts: '' } # { scalaVersion: "2.13", jdkVersion: "1.11.0", jvmName: "temurin:1.11.0", extraOpts: '-J-XX:+UnlockExperimentalVMOptions -J-XX:+UseJVMCICompiler' } - { scalaVersion: "2.13", jdkVersion: "1.17.0", jvmName: "temurin:1.17.0", extraOpts: '' } diff --git a/build.sbt b/build.sbt index a6ffb774c..effbc27ef 100644 --- a/build.sbt +++ b/build.sbt @@ -39,7 +39,7 @@ lazy val codegen = Project(id = akkaGrpcCodegenId, base = file("codegen")) (assembly / assemblyOption) := (assembly / assemblyOption).value.withPrependShellScript( Some(sbtassembly.AssemblyPlugin.defaultUniversalScript(shebang = true))), crossScalaVersions := Dependencies.Versions.CrossScalaForPlugin, - scalaVersion := scala212) + scalaVersion := Dependencies.Versions.CrossScalaForPlugin.head) .settings(addArtifact((Compile / assembly / artifact), assembly)) .settings(addArtifact(Artifact(akkaGrpcCodegenId, "bat", "bat", "bat"), mkBatAssemblyTask)) @@ -48,6 +48,7 @@ lazy val runtime = Project(id = akkaGrpcRuntimeName, base = file("runtime")) .settings(VersionGenerator.settings) .settings( crossScalaVersions := Dependencies.Versions.CrossScalaForLib, + scalaVersion := Dependencies.Versions.CrossScalaForLib.head, mimaFailOnNoPrevious := true, mimaPreviousArtifacts := (if (scalaVersion.value.startsWith("2")) @@ -218,7 +219,7 @@ lazy val pluginTesterScala = Project(id = "akka-grpc-plugin-tester-scala", base (publish / skip) := true, fork := true, crossScalaVersions := Dependencies.Versions.CrossScalaForLib, - scalaVersion := scala212, + scalaVersion := Dependencies.Versions.CrossScalaForLib.head, ReflectiveCodeGen.codeGeneratorSettings ++= Seq("flat_package", "server_power_apis")) .pluginTestingSettings @@ -230,7 +231,7 @@ lazy val pluginTesterJava = Project(id = "akka-grpc-plugin-tester-java", base = fork := true, ReflectiveCodeGen.generatedLanguages := Seq("Java"), crossScalaVersions := Dependencies.Versions.CrossScalaForLib, - scalaVersion := scala212, + scalaVersion := Dependencies.Versions.CrossScalaForLib.head, ReflectiveCodeGen.codeGeneratorSettings ++= Seq("server_power_apis")) .pluginTestingSettings diff --git a/docs/release-train-issue-template.md b/docs/release-train-issue-template.md index d081c7d98..b049f5717 100644 --- a/docs/release-train-issue-template.md +++ b/docs/release-train-issue-template.md @@ -28,7 +28,7 @@ Variables to be expanded in this template: - [ ] Check [API](https://doc.akka.io/api/akka-grpc/$VERSION$/) documentation - [ ] Check [reference](https://doc.akka.io/docs/akka-grpc/$VERSION$/) documentation. Check that the reference docs were deployed and show a version warning (see section below on how to fix the version warning). -- [ ] Check the release on [Maven central](https://repo1.maven.org/maven2/com/lightbend/akka/grpc/akka-grpc-scalapb-protoc-plugin_2.12/$VERSION$/) +- [ ] Check the release on [Maven central](https://repo1.maven.org/maven2/com/lightbend/akka/grpc/akka-grpc-scalapb-protoc-plugin_2.13/$VERSION$/) ### When everything is on maven central - [ ] Log into `gustav.akka.io` as `akkarepo` diff --git a/docs/src/main/paradox/client/walkthrough.md b/docs/src/main/paradox/client/walkthrough.md index f16e75ecc..406f52678 100644 --- a/docs/src/main/paradox/client/walkthrough.md +++ b/docs/src/main/paradox/client/walkthrough.md @@ -58,7 +58,7 @@ Maven com.lightbend.akka.grpc - akka-grpc-runtime_2.12 + akka-grpc-runtime_2.13 ${akka.grpc.version} @@ -113,10 +113,10 @@ For example, this is the definition of a Hello World service: From this definition, Akka gRPC generates interfaces that look like this: Scala -: @@snip [helloworld.proto](/plugin-tester-scala/target/scala-2.12/src_managed/main/example/myapp/helloworld/grpc/GreeterService.scala) +: @@snip [helloworld.proto](/plugin-tester-scala/target/scala-2.13/src_managed/main/example/myapp/helloworld/grpc/GreeterService.scala) Java -: @@snip [helloworld.proto](/plugin-tester-java/target/scala-2.12/src_managed/main/example/myapp/helloworld/grpc/GreeterService.java) +: @@snip [helloworld.proto](/plugin-tester-java/target/scala-2.13/src_managed/main/example/myapp/helloworld/grpc/GreeterService.java) and model @scala[case ]classes for `HelloRequest` and `HelloResponse`. diff --git a/docs/src/main/paradox/server/grpc-web.md b/docs/src/main/paradox/server/grpc-web.md index c810c2114..defedcddb 100644 --- a/docs/src/main/paradox/server/grpc-web.md +++ b/docs/src/main/paradox/server/grpc-web.md @@ -48,7 +48,7 @@ Additionally, add the dependency as below. @@dependency[sbt,Maven,Gradle] { group="ch.megard" - artifact="akka-http-cors_2.12" + artifact="akka-http-cors_2.13" version="0.4.2" } diff --git a/docs/src/main/paradox/server/walkthrough.md b/docs/src/main/paradox/server/walkthrough.md index 66dd331c9..488944f66 100644 --- a/docs/src/main/paradox/server/walkthrough.md +++ b/docs/src/main/paradox/server/walkthrough.md @@ -64,7 +64,7 @@ Maven com.lightbend.akka.grpc - akka-grpc-runtime_2.12 + akka-grpc-runtime_2.13 ${akka.grpc.version} @@ -129,10 +129,10 @@ mvn akka-grpc:generate From the above definition, Akka gRPC generates interfaces that look like this: Scala -: @@snip [helloworld.proto](/plugin-tester-scala/target/scala-2.12/src_managed/main/example/myapp/helloworld/grpc/GreeterService.scala) +: @@snip [helloworld.proto](/plugin-tester-scala/target/scala-2.13/src_managed/main/example/myapp/helloworld/grpc/GreeterService.scala) Java -: @@snip [helloworld.proto](/plugin-tester-java/target/scala-2.12/src_managed/main/example/myapp/helloworld/grpc/GreeterService.java) +: @@snip [helloworld.proto](/plugin-tester-java/target/scala-2.13/src_managed/main/example/myapp/helloworld/grpc/GreeterService.java) and model @scala[case ]classes for `HelloRequest` and `HelloResponse`. diff --git a/gradle-plugin/src/test/groovy/helper/BaseSpec.groovy b/gradle-plugin/src/test/groovy/helper/BaseSpec.groovy index 4e5e4e1fb..4f2218d34 100644 --- a/gradle-plugin/src/test/groovy/helper/BaseSpec.groovy +++ b/gradle-plugin/src/test/groovy/helper/BaseSpec.groovy @@ -30,7 +30,7 @@ plugins { id '$PLUGIN_CODE' } project.dependencies { - implementation "com.typesafe.scala-logging:scala-logging_2.12:3.9.2" + implementation "com.typesafe.scala-logging:scala-logging_2.13:3.9.2" } """ } diff --git a/plugin-tester-java/pom.xml b/plugin-tester-java/pom.xml index 0c10df623..e29b59d4e 100644 --- a/plugin-tester-java/pom.xml +++ b/plugin-tester-java/pom.xml @@ -27,17 +27,17 @@ com.lightbend.akka.grpc - akka-grpc-runtime_2.12 + akka-grpc-runtime_2.13 ${akka.grpc.project.version} com.typesafe.akka - akka-pki_2.12 + akka-pki_2.13 ${akka.version} ch.megard - akka-http-cors_2.12 + akka-http-cors_2.13 ${akka.http.cors.version} diff --git a/plugin-tester-scala/pom.xml b/plugin-tester-scala/pom.xml index f51c3cbb9..4a85419ed 100644 --- a/plugin-tester-scala/pom.xml +++ b/plugin-tester-scala/pom.xml @@ -22,37 +22,37 @@ com.lightbend.akka.grpc - akka-grpc-runtime_2.12 + akka-grpc-runtime_2.13 ${akka.grpc.project.version} ch.megard - akka-http-cors_2.12 + akka-http-cors_2.13 ${akka.http.cors.version} com.typesafe.akka - akka-stream-testkit_2.12 + akka-stream-testkit_2.13 ${akka.version} test com.typesafe.akka - akka-actor-testkit-typed_2.12 + akka-actor-testkit-typed_2.13 ${akka.version} test com.typesafe.akka - akka-pki_2.12 + akka-pki_2.13 ${akka.version} org.scalatest - scalatest_2.12 + scalatest_2.13 3.0.5 test diff --git a/project/Dependencies.scala b/project/Dependencies.scala index b58bced6e..95bd17250 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -11,7 +11,7 @@ object Dependencies { val scala3 = "3.3.1" // the order in the list is important because the head will be considered the default. - val CrossScalaForLib = Seq(scala212, scala213, scala3) + val CrossScalaForLib = Seq(scala213, scala3) val CrossScalaForPlugin = Seq(scala212) // We don't force Akka updates because downstream projects can upgrade diff --git a/sbt-plugin/src/sbt-test/gen-java/01-gen-basic-java/build.sbt b/sbt-plugin/src/sbt-test/gen-java/01-gen-basic-java/build.sbt index 9b8eaf9dd..bdbfcc16d 100644 --- a/sbt-plugin/src/sbt-test/gen-java/01-gen-basic-java/build.sbt +++ b/sbt-plugin/src/sbt-test/gen-java/01-gen-basic-java/build.sbt @@ -1,6 +1,4 @@ -// Can be removed when we move to 2.12.14 -// https://github.com/akka/akka-grpc/pull/1279 -scalaVersion := "2.12.18" +scalaVersion := "2.13.11" resolvers += Resolver.sonatypeRepo("staging") diff --git a/sbt-plugin/src/sbt-test/gen-java/01-gen-basic-java/test b/sbt-plugin/src/sbt-test/gen-java/01-gen-basic-java/test index f70bee3e2..938e5cb9f 100644 --- a/sbt-plugin/src/sbt-test/gen-java/01-gen-basic-java/test +++ b/sbt-plugin/src/sbt-test/gen-java/01-gen-basic-java/test @@ -1,9 +1,9 @@ > compile -$ exists target/scala-2.12/akka-grpc -$ exists target/scala-2.12/akka-grpc/main/example/myapp/helloworld/grpc/HelloRequest.java -$ exists target/scala-2.12/akka-grpc/main/example/myapp/helloworld/grpc/HelloReply.java -$ exists target/scala-2.12/akka-grpc/main/example/myapp/helloworld/grpc/GreeterService.java -$ exists target/scala-2.12/akka-grpc/main/example/myapp/helloworld/grpc/GreeterServiceClient.java +$ exists target/scala-2.13/akka-grpc +$ exists target/scala-2.13/akka-grpc/main/example/myapp/helloworld/grpc/HelloRequest.java +$ exists target/scala-2.13/akka-grpc/main/example/myapp/helloworld/grpc/HelloReply.java +$ exists target/scala-2.13/akka-grpc/main/example/myapp/helloworld/grpc/GreeterService.java +$ exists target/scala-2.13/akka-grpc/main/example/myapp/helloworld/grpc/GreeterServiceClient.java > doc diff --git a/sbt-plugin/src/sbt-test/gen-java/02-server-reflection/build.sbt b/sbt-plugin/src/sbt-test/gen-java/02-server-reflection/build.sbt index 23befabe4..fa485943b 100644 --- a/sbt-plugin/src/sbt-test/gen-java/02-server-reflection/build.sbt +++ b/sbt-plugin/src/sbt-test/gen-java/02-server-reflection/build.sbt @@ -1,6 +1,4 @@ -// Can be removed when we move to 2.12.14 -// https://github.com/akka/akka-grpc/pull/1279 -scalaVersion := "2.12.18" +scalaVersion := "2.13.11" resolvers += Resolver.sonatypeRepo("staging") diff --git a/sbt-plugin/src/sbt-test/gen-java/02-server-reflection/test b/sbt-plugin/src/sbt-test/gen-java/02-server-reflection/test index 726f5d1d3..380d3181f 100644 --- a/sbt-plugin/src/sbt-test/gen-java/02-server-reflection/test +++ b/sbt-plugin/src/sbt-test/gen-java/02-server-reflection/test @@ -1,7 +1,7 @@ > compile -$ exists target/scala-2.12/akka-grpc -$ exists target/scala-2.12/akka-grpc/main/example/myapp/helloworld/grpc/HelloRequest.java -$ exists target/scala-2.12/akka-grpc/main/example/myapp/helloworld/grpc/HelloReply.java -$ exists target/scala-2.12/akka-grpc/main/example/myapp/helloworld/grpc/GreeterService.java -$ exists target/scala-2.12/akka-grpc/main/example/myapp/helloworld/grpc/GreeterServiceClient.java +$ exists target/scala-2.13/akka-grpc +$ exists target/scala-2.13/akka-grpc/main/example/myapp/helloworld/grpc/HelloRequest.java +$ exists target/scala-2.13/akka-grpc/main/example/myapp/helloworld/grpc/HelloReply.java +$ exists target/scala-2.13/akka-grpc/main/example/myapp/helloworld/grpc/GreeterService.java +$ exists target/scala-2.13/akka-grpc/main/example/myapp/helloworld/grpc/GreeterServiceClient.java diff --git a/sbt-plugin/src/sbt-test/gen-java/03-no-java-package/build.sbt b/sbt-plugin/src/sbt-test/gen-java/03-no-java-package/build.sbt index 23befabe4..fa485943b 100644 --- a/sbt-plugin/src/sbt-test/gen-java/03-no-java-package/build.sbt +++ b/sbt-plugin/src/sbt-test/gen-java/03-no-java-package/build.sbt @@ -1,6 +1,4 @@ -// Can be removed when we move to 2.12.14 -// https://github.com/akka/akka-grpc/pull/1279 -scalaVersion := "2.12.18" +scalaVersion := "2.13.11" resolvers += Resolver.sonatypeRepo("staging") diff --git a/sbt-plugin/src/sbt-test/gen-java/03-no-java-package/test b/sbt-plugin/src/sbt-test/gen-java/03-no-java-package/test index 684a4e051..3a4e276a4 100644 --- a/sbt-plugin/src/sbt-test/gen-java/03-no-java-package/test +++ b/sbt-plugin/src/sbt-test/gen-java/03-no-java-package/test @@ -1,3 +1,3 @@ > compile -$ exists target/scala-2.12/akka-grpc/main/helloworld/Helloworld.java +$ exists target/scala-2.13/akka-grpc/main/helloworld/Helloworld.java diff --git a/sbt-plugin/src/sbt-test/gen-java/04-crash-on-keywords/build.sbt b/sbt-plugin/src/sbt-test/gen-java/04-crash-on-keywords/build.sbt index 9b8eaf9dd..bdbfcc16d 100644 --- a/sbt-plugin/src/sbt-test/gen-java/04-crash-on-keywords/build.sbt +++ b/sbt-plugin/src/sbt-test/gen-java/04-crash-on-keywords/build.sbt @@ -1,6 +1,4 @@ -// Can be removed when we move to 2.12.14 -// https://github.com/akka/akka-grpc/pull/1279 -scalaVersion := "2.12.18" +scalaVersion := "2.13.11" resolvers += Resolver.sonatypeRepo("staging") diff --git a/sbt-plugin/src/sbt-test/gen-java/05-duplicate-messages-different-packages/build.sbt b/sbt-plugin/src/sbt-test/gen-java/05-duplicate-messages-different-packages/build.sbt index 23befabe4..fa485943b 100644 --- a/sbt-plugin/src/sbt-test/gen-java/05-duplicate-messages-different-packages/build.sbt +++ b/sbt-plugin/src/sbt-test/gen-java/05-duplicate-messages-different-packages/build.sbt @@ -1,6 +1,4 @@ -// Can be removed when we move to 2.12.14 -// https://github.com/akka/akka-grpc/pull/1279 -scalaVersion := "2.12.18" +scalaVersion := "2.13.11" resolvers += Resolver.sonatypeRepo("staging") diff --git a/sbt-plugin/src/sbt-test/gen-java/05-duplicate-messages-different-packages/test b/sbt-plugin/src/sbt-test/gen-java/05-duplicate-messages-different-packages/test index 684a4e051..3a4e276a4 100644 --- a/sbt-plugin/src/sbt-test/gen-java/05-duplicate-messages-different-packages/test +++ b/sbt-plugin/src/sbt-test/gen-java/05-duplicate-messages-different-packages/test @@ -1,3 +1,3 @@ > compile -$ exists target/scala-2.12/akka-grpc/main/helloworld/Helloworld.java +$ exists target/scala-2.13/akka-grpc/main/helloworld/Helloworld.java diff --git a/sbt-plugin/src/sbt-test/gen-scala-server/00-interop/build.sbt b/sbt-plugin/src/sbt-test/gen-scala-server/00-interop/build.sbt index 482be5654..f1538ed1b 100644 --- a/sbt-plugin/src/sbt-test/gen-scala-server/00-interop/build.sbt +++ b/sbt-plugin/src/sbt-test/gen-scala-server/00-interop/build.sbt @@ -1,3 +1,5 @@ +scalaVersion := "2.13.11" + resolvers += Resolver.sonatypeRepo("staging") organization := "com.lightbend.akka.grpc" diff --git a/sbt-plugin/src/sbt-test/gen-scala-server/00-interop/src/main/scala/akka/grpc/TestServiceImpl.scala b/sbt-plugin/src/sbt-test/gen-scala-server/00-interop/src/main/scala/akka/grpc/TestServiceImpl.scala index 3bc51aa75..9be39411f 100644 --- a/sbt-plugin/src/sbt-test/gen-scala-server/00-interop/src/main/scala/akka/grpc/TestServiceImpl.scala +++ b/sbt-plugin/src/sbt-test/gen-scala-server/00-interop/src/main/scala/akka/grpc/TestServiceImpl.scala @@ -68,7 +68,7 @@ class TestServiceImpl(implicit sys: ActorSystem) extends TestService { Status.fromCodeValue(reqStatus.code).withDescription(reqStatus.message))) req }).mapConcat( - _.responseParameters.to[immutable.Seq]).via(parametersToResponseFlow) + _.responseParameters.toList).via(parametersToResponseFlow) override def halfDuplexCall(in: Source[StreamingOutputCallRequest, NotUsed]): Source[StreamingOutputCallResponse, NotUsed] = ??? @@ -82,7 +82,7 @@ class TestServiceImpl(implicit sys: ActorSystem) extends TestService { } override def streamingOutputCall(in: StreamingOutputCallRequest): Source[StreamingOutputCallResponse, NotUsed] = - Source(in.responseParameters.to[immutable.Seq]).via(parametersToResponseFlow) + Source(in.responseParameters.toList).via(parametersToResponseFlow) override def unimplementedCall(in: Empty): Future[Empty] = ??? } diff --git a/sbt-plugin/src/sbt-test/gen-scala-server/01-gen-basic-server/build.sbt b/sbt-plugin/src/sbt-test/gen-scala-server/01-gen-basic-server/build.sbt index f33a48dd8..3ca9a4b5c 100644 --- a/sbt-plugin/src/sbt-test/gen-scala-server/01-gen-basic-server/build.sbt +++ b/sbt-plugin/src/sbt-test/gen-scala-server/01-gen-basic-server/build.sbt @@ -1,3 +1,5 @@ +scalaVersion := "2.13.11" + resolvers += Resolver.sonatypeRepo("staging") scalacOptions += "-Xfatal-warnings" diff --git a/sbt-plugin/src/sbt-test/gen-scala-server/01-gen-basic-server/test b/sbt-plugin/src/sbt-test/gen-scala-server/01-gen-basic-server/test index d3dfa17f8..d8a6e7641 100644 --- a/sbt-plugin/src/sbt-test/gen-scala-server/01-gen-basic-server/test +++ b/sbt-plugin/src/sbt-test/gen-scala-server/01-gen-basic-server/test @@ -1,13 +1,13 @@ > compile -$ exists target/scala-2.12/akka-grpc -$ exists target/scala-2.12/akka-grpc/main/example/myapp/helloworld/grpc/HelloRequest.scala -$ exists target/scala-2.12/akka-grpc/main/example/myapp/helloworld/grpc/HelloworldProto.scala -$ exists target/scala-2.12/akka-grpc/main/example/myapp/helloworld/grpc/GreeterService.scala +$ exists target/scala-2.13/akka-grpc +$ exists target/scala-2.13/akka-grpc/main/example/myapp/helloworld/grpc/HelloRequest.scala +$ exists target/scala-2.13/akka-grpc/main/example/myapp/helloworld/grpc/HelloworldProto.scala +$ exists target/scala-2.13/akka-grpc/main/example/myapp/helloworld/grpc/GreeterService.scala # This will for example detect when we publish generated code that is # already in scalapb-runtime > assembly # catch scaladoc errors -> doc \ No newline at end of file +> doc diff --git a/sbt-plugin/src/sbt-test/gen-scala-server/02-multiple-services/build.sbt b/sbt-plugin/src/sbt-test/gen-scala-server/02-multiple-services/build.sbt index 3fad284f3..ddcdca6f8 100644 --- a/sbt-plugin/src/sbt-test/gen-scala-server/02-multiple-services/build.sbt +++ b/sbt-plugin/src/sbt-test/gen-scala-server/02-multiple-services/build.sbt @@ -1,3 +1,5 @@ +scalaVersion := "2.13.11" + resolvers += Resolver.sonatypeRepo("staging") enablePlugins(AkkaGrpcPlugin) diff --git a/sbt-plugin/src/sbt-test/gen-scala-server/03-test-config/build.sbt b/sbt-plugin/src/sbt-test/gen-scala-server/03-test-config/build.sbt index e53fb3774..ec4e12cf7 100644 --- a/sbt-plugin/src/sbt-test/gen-scala-server/03-test-config/build.sbt +++ b/sbt-plugin/src/sbt-test/gen-scala-server/03-test-config/build.sbt @@ -1,3 +1,5 @@ +scalaVersion := "2.13.11" + resolvers += Resolver.sonatypeRepo("staging") enablePlugins(AkkaGrpcPlugin) diff --git a/sbt-plugin/src/sbt-test/gen-scala-server/03-test-config/test b/sbt-plugin/src/sbt-test/gen-scala-server/03-test-config/test index 15ae88fab..99e81b02e 100644 --- a/sbt-plugin/src/sbt-test/gen-scala-server/03-test-config/test +++ b/sbt-plugin/src/sbt-test/gen-scala-server/03-test-config/test @@ -1,15 +1,15 @@ > test:compile # the Scala server was generated in Compile -$ exists target/scala-2.12/akka-grpc/main/example/myapp/helloworld/grpc/GreeterServiceHandler.scala +$ exists target/scala-2.13/akka-grpc/main/example/myapp/helloworld/grpc/GreeterServiceHandler.scala # only the Scala client was generated in Test --$ exists target/scala-2.12/akka-grpc/test/example/myapp/helloworld/grpc/GreeterServiceHandler.scala -$ exists target/scala-2.12/akka-grpc/test/example/myapp/helloworld/grpc/GreeterServiceClient.scala +-$ exists target/scala-2.13/akka-grpc/test/example/myapp/helloworld/grpc/GreeterServiceHandler.scala +$ exists target/scala-2.13/akka-grpc/test/example/myapp/helloworld/grpc/GreeterServiceClient.scala > it:protocGenerate # only the Java server was generated in IntegrationTest --$ exists target/scala-2.12/akka-grpc/it/example/myapp/helloworld/grpc/GreeterServiceHandler.scala --$ exists target/scala-2.12/akka-grpc/it/example/myapp/helloworld/grpc/GreeterServiceClient.scala -$ exists target/scala-2.12/akka-grpc/it/example/myapp/helloworld/grpc/GreeterServiceHandlerFactory.java +-$ exists target/scala-2.13/akka-grpc/it/example/myapp/helloworld/grpc/GreeterServiceHandler.scala +-$ exists target/scala-2.13/akka-grpc/it/example/myapp/helloworld/grpc/GreeterServiceClient.scala +$ exists target/scala-2.13/akka-grpc/it/example/myapp/helloworld/grpc/GreeterServiceHandlerFactory.java diff --git a/sbt-plugin/src/sbt-test/gen-scala-server/04-server-reflection/build.sbt b/sbt-plugin/src/sbt-test/gen-scala-server/04-server-reflection/build.sbt index 3fad284f3..ddcdca6f8 100644 --- a/sbt-plugin/src/sbt-test/gen-scala-server/04-server-reflection/build.sbt +++ b/sbt-plugin/src/sbt-test/gen-scala-server/04-server-reflection/build.sbt @@ -1,3 +1,5 @@ +scalaVersion := "2.13.11" + resolvers += Resolver.sonatypeRepo("staging") enablePlugins(AkkaGrpcPlugin) diff --git a/sbt-plugin/src/sbt-test/gen-scala-server/04-server-reflection/src/main/scala/example/myapp/helloworld/Main.scala b/sbt-plugin/src/sbt-test/gen-scala-server/04-server-reflection/src/main/scala/example/myapp/helloworld/Main.scala index 77de80208..fc11c6f15 100644 --- a/sbt-plugin/src/sbt-test/gen-scala-server/04-server-reflection/src/main/scala/example/myapp/helloworld/Main.scala +++ b/sbt-plugin/src/sbt-test/gen-scala-server/04-server-reflection/src/main/scala/example/myapp/helloworld/Main.scala @@ -64,7 +64,7 @@ object Main extends App { ServiceHandler.concatOrNotFound( greeterPartial, echoPartial, - reflection), + reflection) //#server-reflection-manual-concat -} \ No newline at end of file +} diff --git a/sbt-plugin/src/sbt-test/gen-scala-server/04-server-reflection/test b/sbt-plugin/src/sbt-test/gen-scala-server/04-server-reflection/test index f58f726f7..914455d11 100644 --- a/sbt-plugin/src/sbt-test/gen-scala-server/04-server-reflection/test +++ b/sbt-plugin/src/sbt-test/gen-scala-server/04-server-reflection/test @@ -1,6 +1,6 @@ > compile -$ exists target/scala-2.12/akka-grpc/main -$ exists target/scala-2.12/akka-grpc/main/example/myapp/helloworld/grpc/HelloRequest.scala -$ exists target/scala-2.12/akka-grpc/main/example/myapp/helloworld/grpc/HelloworldProto.scala -$ exists target/scala-2.12/akka-grpc/main/example/myapp/helloworld/grpc/GreeterService.scala +$ exists target/scala-2.13/akka-grpc/main +$ exists target/scala-2.13/akka-grpc/main/example/myapp/helloworld/grpc/HelloRequest.scala +$ exists target/scala-2.13/akka-grpc/main/example/myapp/helloworld/grpc/HelloworldProto.scala +$ exists target/scala-2.13/akka-grpc/main/example/myapp/helloworld/grpc/GreeterService.scala diff --git a/sbt-plugin/src/sbt-test/gen-scala-server/05-no-java-package/build.sbt b/sbt-plugin/src/sbt-test/gen-scala-server/05-no-java-package/build.sbt index 3fad284f3..ddcdca6f8 100644 --- a/sbt-plugin/src/sbt-test/gen-scala-server/05-no-java-package/build.sbt +++ b/sbt-plugin/src/sbt-test/gen-scala-server/05-no-java-package/build.sbt @@ -1,3 +1,5 @@ +scalaVersion := "2.13.11" + resolvers += Resolver.sonatypeRepo("staging") enablePlugins(AkkaGrpcPlugin) diff --git a/sbt-plugin/src/sbt-test/gen-scala-server/05-no-java-package/test b/sbt-plugin/src/sbt-test/gen-scala-server/05-no-java-package/test index 1e26bedaa..69278573a 100644 --- a/sbt-plugin/src/sbt-test/gen-scala-server/05-no-java-package/test +++ b/sbt-plugin/src/sbt-test/gen-scala-server/05-no-java-package/test @@ -1,6 +1,6 @@ > compile -$ exists target/scala-2.12/akka-grpc -$ exists target/scala-2.12/akka-grpc/main/helloworld/HelloRequest.scala -$ exists target/scala-2.12/akka-grpc/main/helloworld/HelloworldProto.scala -$ exists target/scala-2.12/akka-grpc/main/helloworld/GreeterService.scala +$ exists target/scala-2.13/akka-grpc +$ exists target/scala-2.13/akka-grpc/main/helloworld/HelloRequest.scala +$ exists target/scala-2.13/akka-grpc/main/helloworld/HelloworldProto.scala +$ exists target/scala-2.13/akka-grpc/main/helloworld/GreeterService.scala diff --git a/sbt-plugin/src/sbt-test/gen-scala-server/06-compatibility-plugins/build.sbt b/sbt-plugin/src/sbt-test/gen-scala-server/06-compatibility-plugins/build.sbt index 6d4e6a634..13145edb1 100644 --- a/sbt-plugin/src/sbt-test/gen-scala-server/06-compatibility-plugins/build.sbt +++ b/sbt-plugin/src/sbt-test/gen-scala-server/06-compatibility-plugins/build.sbt @@ -1,3 +1,5 @@ +scalaVersion := "2.13.11" + resolvers += Resolver.sonatypeRepo("staging") // Disable for now because of: https://github.com/protocolbuffers/protobuf-javascript/issues/127 diff --git a/sbt-plugin/src/sbt-test/gen-scala-server/06-compatibility-plugins/test b/sbt-plugin/src/sbt-test/gen-scala-server/06-compatibility-plugins/test index a79f8489a..a4fb2e416 100644 --- a/sbt-plugin/src/sbt-test/gen-scala-server/06-compatibility-plugins/test +++ b/sbt-plugin/src/sbt-test/gen-scala-server/06-compatibility-plugins/test @@ -1,10 +1,10 @@ > compile # Disabled for now because of: https://github.com/protocolbuffers/protobuf-javascript/issues/127 -# $ exists target/scala-2.12/resource_managed/main/js/hellorequest.js -$ exists target/scala-2.12/akka-grpc/main/example/myapp/helloworld/grpc/HelloRequest.scala +# $ exists target/scala-2.13/resource_managed/main/js/hellorequest.js +$ exists target/scala-2.13/akka-grpc/main/example/myapp/helloworld/grpc/HelloRequest.scala > test:compile # Disabled for now because of: https://github.com/protocolbuffers/protobuf-javascript/issues/127 -# $ exists target/scala-2.12/resource_managed/test/js/echomessage.js -$ exists target/scala-2.12/akka-grpc/test/example/myapp/echo/grpc/EchoMessage.scala +# $ exists target/scala-2.13/resource_managed/test/js/echomessage.js +$ exists target/scala-2.13/akka-grpc/test/example/myapp/echo/grpc/EchoMessage.scala diff --git a/sbt-plugin/src/sbt-test/gen-scala-server/07-gen-basic-server-with-akka-27/build.sbt b/sbt-plugin/src/sbt-test/gen-scala-server/07-gen-basic-server-with-akka-27/build.sbt index f7a92ff20..92d42cff3 100644 --- a/sbt-plugin/src/sbt-test/gen-scala-server/07-gen-basic-server-with-akka-27/build.sbt +++ b/sbt-plugin/src/sbt-test/gen-scala-server/07-gen-basic-server-with-akka-27/build.sbt @@ -1,3 +1,5 @@ +scalaVersion := "2.13.11" + resolvers += Resolver.sonatypeRepo("staging") enablePlugins(AkkaGrpcPlugin) diff --git a/sbt-plugin/src/sbt-test/gen-scala-server/09-scalapb-customizations/build.sbt b/sbt-plugin/src/sbt-test/gen-scala-server/09-scalapb-customizations/build.sbt index d1d0628a6..f65d0119b 100644 --- a/sbt-plugin/src/sbt-test/gen-scala-server/09-scalapb-customizations/build.sbt +++ b/sbt-plugin/src/sbt-test/gen-scala-server/09-scalapb-customizations/build.sbt @@ -1,3 +1,5 @@ +scalaVersion := "2.13.11" + resolvers += Resolver.sonatypeRepo("staging") enablePlugins(AkkaGrpcPlugin) diff --git a/sbt-plugin/src/sbt-test/gen-scala-server/09-scalapb-customizations/test b/sbt-plugin/src/sbt-test/gen-scala-server/09-scalapb-customizations/test index 9eca4921f..fbadb31d8 100644 --- a/sbt-plugin/src/sbt-test/gen-scala-server/09-scalapb-customizations/test +++ b/sbt-plugin/src/sbt-test/gen-scala-server/09-scalapb-customizations/test @@ -1,5 +1,5 @@ > protocGenerate -$ exists target/scala-2.12/akka-grpc/main/example/myapp/helloworld/grpc/HelloRequest.scala -$ exists target/scala-2.12/akka-grpc/main/example/myapp/helloworld/grpc/HelloworldProto.scala -$ exists target/scala-2.12/akka-grpc/main/example/myapp/helloworld/grpc/GreeterService.scala +$ exists target/scala-2.13/akka-grpc/main/example/myapp/helloworld/grpc/HelloRequest.scala +$ exists target/scala-2.13/akka-grpc/main/example/myapp/helloworld/grpc/HelloworldProto.scala +$ exists target/scala-2.13/akka-grpc/main/example/myapp/helloworld/grpc/GreeterService.scala > compile diff --git a/sbt-plugin/src/sbt-test/gen-scala-server/10-scalapb-validate/build.sbt b/sbt-plugin/src/sbt-test/gen-scala-server/10-scalapb-validate/build.sbt index e4b71d555..dbae7496a 100644 --- a/sbt-plugin/src/sbt-test/gen-scala-server/10-scalapb-validate/build.sbt +++ b/sbt-plugin/src/sbt-test/gen-scala-server/10-scalapb-validate/build.sbt @@ -1,3 +1,5 @@ +scalaVersion := "2.13.11" + resolvers += Resolver.sonatypeRepo("staging") //#setup diff --git a/sbt-plugin/src/sbt-test/gen-scala-server/11-duplicate-messages-different-packages/build.sbt b/sbt-plugin/src/sbt-test/gen-scala-server/11-duplicate-messages-different-packages/build.sbt index 3fad284f3..ddcdca6f8 100644 --- a/sbt-plugin/src/sbt-test/gen-scala-server/11-duplicate-messages-different-packages/build.sbt +++ b/sbt-plugin/src/sbt-test/gen-scala-server/11-duplicate-messages-different-packages/build.sbt @@ -1,3 +1,5 @@ +scalaVersion := "2.13.11" + resolvers += Resolver.sonatypeRepo("staging") enablePlugins(AkkaGrpcPlugin) diff --git a/sbt-plugin/src/sbt-test/gen-scala-server/11-duplicate-messages-different-packages/test b/sbt-plugin/src/sbt-test/gen-scala-server/11-duplicate-messages-different-packages/test index 1e26bedaa..69278573a 100644 --- a/sbt-plugin/src/sbt-test/gen-scala-server/11-duplicate-messages-different-packages/test +++ b/sbt-plugin/src/sbt-test/gen-scala-server/11-duplicate-messages-different-packages/test @@ -1,6 +1,6 @@ > compile -$ exists target/scala-2.12/akka-grpc -$ exists target/scala-2.12/akka-grpc/main/helloworld/HelloRequest.scala -$ exists target/scala-2.12/akka-grpc/main/helloworld/HelloworldProto.scala -$ exists target/scala-2.12/akka-grpc/main/helloworld/GreeterService.scala +$ exists target/scala-2.13/akka-grpc +$ exists target/scala-2.13/akka-grpc/main/helloworld/HelloRequest.scala +$ exists target/scala-2.13/akka-grpc/main/helloworld/HelloworldProto.scala +$ exists target/scala-2.13/akka-grpc/main/helloworld/GreeterService.scala