-
Notifications
You must be signed in to change notification settings - Fork 15.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Started moving Kotlin DSL generator to its own directory.
PiperOrigin-RevId: 663760495
- Loading branch information
1 parent
546c8e0
commit 48f2faa
Showing
8 changed files
with
53 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
cc_library( | ||
name = "kotlin", | ||
srcs = ["generator.cc"], | ||
hdrs = ["generator.h"], | ||
strip_include_prefix = "/src", | ||
visibility = [ | ||
"//pkg:__pkg__", | ||
"//src/google/protobuf/compiler:__pkg__", | ||
], | ||
deps = [ | ||
"//src/google/protobuf", | ||
"//src/google/protobuf:port", | ||
"//src/google/protobuf/compiler:code_generator", | ||
"//src/google/protobuf/compiler/java", | ||
"//src/google/protobuf/compiler/java:helpers", | ||
"//src/google/protobuf/io:printer", | ||
"@com_google_absl//absl/strings", | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
|
||
# Kotlin DSL Generator | ||
|
||
This code generator implements the Kotlin DSL. The Kotlin DSL sits on top of | ||
another proto implementation (written in Java or Kotlin) and adds convenient | ||
support for building proto messages using DSL syntax, as documented in | ||
[Kotlin Generated Code Guide](https://protobuf.dev/reference/kotlin/kotlin-generated/). | ||
|
||
This code generator is invoked by passing `--kotlin_out` to `protoc`. | ||
|
||
When using Kotlin on the JVM, you will also need to pass `--java_out` to | ||
generate the Java code that implements the generated classes themselves. | ||
|
||
When using Kotlin on other platforms (eg. Kotlin Native), there is currently no | ||
support for generating message classes, so it is not possible to use the Kotlin | ||
DSL at this time. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters