Skip to content

Commit

Permalink
Fix 'protobuf-javalite' vs 'protobuf-java'
Browse files Browse the repository at this point in the history
Signed-off-by: Jendrik Johannes <[email protected]>
  • Loading branch information
jjohannes committed Feb 20, 2024
1 parent a3ef3cf commit 8dcdd0c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ extraJavaModuleInfo {
requireAllDefinedDependencies()
requires("java.logging")
}
module("com.google.protobuf:protobuf-javalite", "com.google.protobuf") {
exportAllPackages()
requireAllDefinedDependencies()
requires("java.logging")
}
module("io.grpc:grpc-netty-shaded", "grpc.netty.shaded")
module("io.grpc:grpc-protobuf-lite", "grpc.protobuf.lite")
module("io.grpc:grpc-protobuf", "grpc.protobuf")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,15 @@ protobuf.generateProtoTasks {
}
}

val protobufVariant = if (publishFull) "protobuf-java" else "protobuf-javalite"
extraJavaModuleInfo.module("com.google.protobuf:$protobufVariant", "com.google.protobuf") {
exportAllPackages()
requireAllDefinedDependencies()
requires("java.logging")
if (publishFull) {
extraJavaModuleInfo {
module("com.google.protobuf:protobuf-javalite", "com.google.protobuf.UNUSED")
module("com.google.protobuf:protobuf-java", "com.google.protobuf") {
exportAllPackages()
requireAllDefinedDependencies()
requires("java.logging")
}
}
}

publishing.publications.named<MavenPublication>("mavenJava") {
Expand Down

0 comments on commit 8dcdd0c

Please sign in to comment.