Skip to content

Commit 41552bf

Browse files
authored
all: generate automatic module name in the manifest (grpc#10413)
1 parent 08a44b9 commit 41552bf

File tree

23 files changed

+130
-0
lines changed

23 files changed

+130
-0
lines changed

alts/build.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ tasks.named("javadoc").configure {
6565
tasks.named("jar").configure {
6666
// Must use a different archiveClassifier to avoid conflicting with shadowJar
6767
archiveClassifier = 'original'
68+
manifest {
69+
attributes('Automatic-Module-Name': 'io.grpc.alts')
70+
}
6871
}
6972

7073
// We want to use grpc-netty-shaded instead of grpc-netty. But we also want our

api/build.gradle

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ compileContextJava {
2121
targetCompatibility = 1.7
2222
}
2323

24+
tasks.named("jar").configure {
25+
manifest {
26+
attributes('Automatic-Module-Name': 'io.grpc')
27+
}
28+
}
2429

2530
dependencies {
2631
compileOnly sourceSets.context.output

auth/build.gradle

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ plugins {
77
}
88

99
description = "gRPC: Auth"
10+
11+
tasks.named("jar").configure {
12+
manifest {
13+
attributes('Automatic-Module-Name': 'io.grpc.auth')
14+
}
15+
}
16+
1017
dependencies {
1118
api project(':grpc-api'),
1219
libraries.google.auth.credentials

benchmarks/build.gradle

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ configurations {
1818
alpnagent
1919
}
2020

21+
tasks.named("jar").configure {
22+
manifest {
23+
attributes('Automatic-Module-Name': 'io.grpc.benchmarks')
24+
}
25+
}
26+
2127
dependencies {
2228
implementation project(':grpc-core'),
2329
project(':grpc-netty'),

census/build.gradle

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ plugins {
77

88
description = 'gRPC: Census'
99

10+
tasks.named("jar").configure {
11+
manifest {
12+
attributes('Automatic-Module-Name': 'io.grpc.census')
13+
}
14+
}
15+
1016
dependencies {
1117
api project(':grpc-api')
1218
// force dependent jars to depend on latest grpc-context

core/build.gradle

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ tasks.named("javadoc").configure {
5656
exclude 'io/grpc/perfmark/**'
5757
}
5858

59+
tasks.named("jar").configure {
60+
manifest {
61+
attributes('Automatic-Module-Name': 'io.grpc.internal')
62+
}
63+
}
64+
5965
animalsniffer {
6066
// Don't check sourceSets.jmh
6167
sourceSets = [

gcp-observability/build.gradle

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ tasks.named("compileJava").configure {
1919
"|")
2020
}
2121

22+
tasks.named("jar").configure {
23+
manifest {
24+
attributes('Automatic-Module-Name': 'io.grpc.gcp.observability')
25+
}
26+
}
27+
2228
dependencies {
2329
annotationProcessor libraries.auto.value
2430
api project(':grpc-api')

googleapis/build.gradle

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ plugins {
77

88
description = 'gRPC: googleapis'
99

10+
tasks.named("jar").configure {
11+
manifest {
12+
attributes('Automatic-Module-Name': 'io.grpc.googleapis')
13+
}
14+
}
15+
1016
dependencies {
1117
api project(':grpc-api')
1218
implementation project(path: ':grpc-alts', configuration: 'shadow'),

grpclb/build.gradle

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ plugins {
99

1010
description = "gRPC: GRPCLB LoadBalancer plugin"
1111

12+
tasks.named("jar").configure {
13+
manifest {
14+
attributes('Automatic-Module-Name': 'io.grpc.grpclb')
15+
}
16+
}
17+
1218
dependencies {
1319
implementation project(':grpc-core'),
1420
project(':grpc-protobuf'),

inprocess/build.gradle

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ plugins {
77

88
description = 'gRPC: Inprocess'
99

10+
tasks.named("jar").configure {
11+
manifest {
12+
attributes('Automatic-Module-Name': 'io.grpc.inprocess')
13+
}
14+
}
15+
1016
dependencies {
1117
api project(':grpc-core')
1218

0 commit comments

Comments
 (0)