File tree 7 files changed +58
-2
lines changed
protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/impl
plugin-options/ignore-java-package
main/proto/toasttab/protokt/testing/rt
test/kotlin/com/toasttab/protokt/testing/rt
7 files changed +58
-2
lines changed Original file line number Diff line number Diff line change 1
1
distributionBase =GRADLE_USER_HOME
2
2
distributionPath =wrapper/dists
3
- distributionUrl =https\://services.gradle.org/distributions/gradle-6.3 -bin.zip
3
+ distributionUrl =https\://services.gradle.org/distributions/gradle-6.4 -bin.zip
4
4
zipStoreBase =GRADLE_USER_HOME
5
5
zipStorePath =wrapper/dists
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ internal object ServiceAnnotator {
38
38
if (ctx.pkg.default) {
39
39
s.name
40
40
} else {
41
- " ${ctx.pkg } .${s.name} "
41
+ " ${ctx.desc.packageName } .${s.name} "
42
42
}
43
43
44
44
private fun renderDescriptor (s : Service ) =
Original file line number Diff line number Diff line change @@ -30,3 +30,8 @@ sourceSets {
30
30
protokt {
31
31
respectJavaPackage = false
32
32
}
33
+
34
+ dependencies {
35
+ implementation(project(" :protokt-runtime-grpc" ))
36
+ implementation(libraries.grpcStub)
37
+ }
Original file line number Diff line number Diff line change @@ -18,7 +18,9 @@ pureKotlin()
18
18
19
19
dependencies {
20
20
implementation(kotlin(" reflect" ))
21
+ implementation(project(" :protokt-runtime-grpc" ))
21
22
implementation(project(" :testing:protobuf-java" ))
23
+ implementation(libraries.grpcStub)
22
24
23
25
testImplementation(libraries.jackson)
24
26
testImplementation(libraries.protobuf)
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright (c) 2020 Toast Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ * http://www.apache.org/licenses/LICENSE-2.0
8
+ *
9
+ * Unless required by applicable law or agreed to in writing, software
10
+ * distributed under the License is distributed on an "AS IS" BASIS,
11
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ * See the License for the specific language governing permissions and
13
+ * limitations under the License.
14
+ */
15
+
16
+ syntax = "proto3" ;
17
+
18
+ package toasttab.protokt.testing.rt ;
19
+
20
+ option java_package = "com.toasttab.protokt.testing.rt" ;
21
+
22
+ service TestService {}
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright (c) 2020 Toast Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ * http://www.apache.org/licenses/LICENSE-2.0
8
+ *
9
+ * Unless required by applicable law or agreed to in writing, software
10
+ * distributed under the License is distributed on an "AS IS" BASIS,
11
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ * See the License for the specific language governing permissions and
13
+ * limitations under the License.
14
+ */
15
+
16
+ package com.toasttab.protokt.testing.rt
17
+
18
+ import com.google.common.truth.Truth.assertThat
19
+ import org.junit.jupiter.api.Test
20
+
21
+ class ServicePackageTest {
22
+ @Test
23
+ fun `service has protobuf package` () {
24
+ assertThat(TestServiceGrpc .SERVICE_NAME .substringBeforeLast(" ." ))
25
+ .isEqualTo(" toasttab.protokt.testing.rt" )
26
+ }
27
+ }
You can’t perform that action at this time.
0 commit comments