Make PROTO_LIBRARY multimodule
This is needed primarilly for testng and for getting rid of custom PROTO_POLICY support in favor of general multimodule one. By now in ya.make parsing.
This switches only definition. Internals still use .PROTO_POLICY property, not PEERDIR_TAGS variable as it will be eventually
@@ -1349,11 +1349,6 @@ module PY_PACKAGE: UNION {
.ALLOWED=GRPC
}
-### Definition of the project - proto library. More detailed documentation here.
-### https://wiki.yandex-team.ru/yatool/proto_library/
-module PROTO_LIBRARY: LIBRARY {
-}
-
PY_NAMESPACE_VALUE=
macro PY_NAMESPACE(Arg) {
SET(PY_NAMESPACE_VALUE $Arg)
@@ -1378,24 +1373,13 @@ module _JAVA_LIBRARY: BASE_UNIT {
NO_PLATFORM()
SET(MODULE_SUFFIX .jar)
+ SET(DONT_RESOLVE_INCLUDES yes)
}
JAVA_PROTOBUF=contrib/java/com/google/protobuf/protobuf-java/3.5.1
JAVA_GRPC_STUB=contrib/java/io/grpc/grpc-stub/1.12.0
JAVA_GRPC_PROTOBUF=contrib/java/io/grpc/grpc-protobuf/1.12.0
-module JAVA_PROTO_LIBRARY: _JAVA_LIBRARY {
- .EXTS=.jsrc
- .ALLOWED=GRPC
- PEERDIR($JAVA_PROTOBUF)
- PEERDIR(contrib/java/javax/annotation/javax.annotation-api/1.3.1)
- when ($GRPC_FLAG == "yes") {
- PEERDIR+=$JAVA_GRPC_STUB $JAVA_GRPC_PROTOBUF
- }
- .IGNORED=GENERATE_ENUM_SERIALIZATION GENERATE_ENUM_SERIALIZATION_WITH_HEADER
-}
-
-
module PY_LIBRARY: _LIBRARY {
.PROTO_POLICY=PY_PROTO
PYTHON_ADDINCL()
@@ -3013,3 +2997,26 @@ macro MAPKIT_ENABLE_WHOLE_ARCHIVE() {
ANDROID_SDK_ROOT=${ANDROID_SDK_RESOURCE_GLOBAL}/android_sdk
+### Definition of the project - proto library. More detailed documentation here.
+### https://wiki.yandex-team.ru/yatool/proto_library/
+multimodule PROTO_LIBRARY {
+ module CPP : LIBRARY {
+ }
+
+ module JAVA: _JAVA_LIBRARY {
+ .EXTS=.jsrc
+ .ALLOWED=GRPC
+ PEERDIR($JAVA_PROTOBUF)
+ PEERDIR(contrib/java/javax/annotation/javax.annotation-api/1.3.1)
+ when ($GRPC_FLAG == "yes") {
+ PEERDIR+=$JAVA_GRPC_STUB $JAVA_GRPC_PROTOBUF
+ }
+ .IGNORED=GENERATE_ENUM_SERIALIZATION GENERATE_ENUM_SERIALIZATION_WITH_HEADER
+ }
+
+ module PYTHON: PY_LIBRARY {
+ .ALIASES=SRCS=PY_SRCS
+ PEERDIR_TAGS=PYTHON
+ }
+
+}
