Skip to content

Commit bc99586

Browse files
committed
Shade Netty into r2.
1 parent 6823381 commit bc99586

File tree

105 files changed

+574
-515
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+574
-515
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ and what APIs have changed, if applicable.
1414

1515
## [Unreleased]
1616

17+
## [29.38.0] - 2022-07-26
18+
- Introduce restli-netty, a shaded Netty dependency for use with r2.
19+
-
1720
## [29.37.3] - 2022-07-18
1821
- Add connection warm up support when a failout has been initiated
1922

@@ -5273,7 +5276,8 @@ patch operations can re-use these classes for generating patch messages.
52735276

52745277
## [0.14.1]
52755278

5276-
[Unreleased]: https://github.com/linkedin/rest.li/compare/v29.37.3...master
5279+
[Unreleased]: https://github.com/linkedin/rest.li/compare/v29.38.0...master
5280+
[29.38.0]: https://github.com/linkedin/rest.li/compare/v29.37.3...v29.38.0
52775281
[29.37.3]: https://github.com/linkedin/rest.li/compare/v29.37.2...v29.37.3
52785282
[29.37.2]: https://github.com/linkedin/rest.li/compare/v29.37.1...v29.37.2
52795283
[29.37.1]: https://github.com/linkedin/rest.li/compare/v29.37.0...v29.37.1

build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@
1616

1717
buildscript {
1818
repositories {
19+
gradlePluginPortal()
1920
jcenter()
2021
}
2122
dependencies {
23+
classpath 'com.github.jengelman.gradle.plugins:shadow:5.2.0'
2224
classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:4.21.0'
2325
classpath 'org.jacoco:org.jacoco.core:0.8.7'
2426
}

build_script/publications.gradle

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,21 @@ def manipulatePomXml = {
6161
publishing {
6262
publications {
6363
// Define the "release" publication
64-
release(MavenPublication) {
65-
from components.java
64+
release(MavenPublication) { publication ->
65+
if (project.name == 'restli-netty') {
66+
apply plugin: 'com.github.johnrengelman.shadow'
67+
project.shadow.component(publication)
68+
} else {
69+
from components.java
70+
}
6671

6772
afterEvaluate {
6873
// Add all extra archives (sources, javadoc, any custom archives e.g. all)
6974
project.configurations.archives.allArtifacts.forEach {
70-
if (it.classifier) {
75+
// Skip 'slim' identifier, otherwise this logic attemps to publish the disabled slim jar for restli-netty.
76+
// This requirement is related to the workaround for IDEA-163411 in the restli-netty project. When that bug
77+
// is resolved this can be simplified.
78+
if (it.classifier && it.classifier != 'slim') {
7179
artifact it
7280
}
7381
}

d2-int-test/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ dependencies {
1212
compile externalDependency.commonsHttpClient
1313
compile externalDependency.zookeeper
1414
compile externalDependency.jdkTools
15-
compile externalDependency.netty
1615
testCompile externalDependency.testng
1716
testCompile externalDependency.commonsIo
1817
testCompile project(path: ':d2', configuration: 'testArtifacts')

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version=29.37.3
1+
version=29.38.0
22
group=com.linkedin.pegasus
33
org.gradle.configureondemand=true
44
org.gradle.parallel=true

multipart-mime/build.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ dependencies {
44
compile externalDependency.javaxActivation
55
compile externalDependency.commonsLang
66
testCompile project(':r2-int-test')
7+
testCompile project(':r2-netty')
8+
testCompile project(':r2-sample')
9+
testCompile project(':test-util')
710
testCompile externalDependency.testng
811
testCompile externalDependency.mail
912
testCompile externalDependency.easymock

r2-int-test/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ dependencies {
66
testCompile externalDependency.testng
77
testCompile externalDependency.junit
88
compile externalDependency.commonsLang
9+
implementation project(path: ':restli-netty', configuration: 'shadow')
910
}
1011

1112
tasks.withType(Test) {

r2-int-test/src/test/java/test/r2/integ/clientserver/TestHttpsEarlyHandshake.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@
2525
import com.linkedin.r2.transport.http.client.common.ChannelPoolManagerFactoryImpl;
2626
import com.linkedin.r2.transport.http.client.common.ChannelPoolManagerKey;
2727
import com.linkedin.r2.transport.http.client.common.ChannelPoolManagerKeyBuilder;
28-
import io.netty.channel.Channel;
29-
import io.netty.channel.EventLoopGroup;
30-
import io.netty.channel.nio.NioEventLoopGroup;
31-
import io.netty.handler.ssl.SslHandler;
32-
import io.netty.util.concurrent.Future;
28+
import com.linkedin.pegasus.io.netty.channel.Channel;
29+
import com.linkedin.pegasus.io.netty.channel.EventLoopGroup;
30+
import com.linkedin.pegasus.io.netty.channel.nio.NioEventLoopGroup;
31+
import com.linkedin.pegasus.io.netty.handler.ssl.SslHandler;
32+
import com.linkedin.pegasus.io.netty.util.concurrent.Future;
3333
import java.net.InetAddress;
3434
import java.net.InetSocketAddress;
3535
import java.net.SocketAddress;

r2-int-test/src/test/java/test/r2/integ/clientserver/providers/client/AbstractClientProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import com.linkedin.r2.transport.common.Client;
2525
import com.linkedin.r2.transport.http.client.HttpClientFactory;
2626
import com.linkedin.r2.util.NamedThreadFactory;
27-
import io.netty.channel.nio.NioEventLoopGroup;
27+
import com.linkedin.pegasus.io.netty.channel.nio.NioEventLoopGroup;
2828
import java.util.ArrayList;
2929
import java.util.List;
3030
import java.util.Map;

r2-netty/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ dependencies {
44
compile project(':r2-core')
55
compile project(':r2-disruptor')
66
compile project(':r2-filter-compression')
7+
implementation project(path: ':restli-netty', configuration: 'shadow')
78

89
compile externalDependency.commonsLang
9-
compile externalDependency.netty
1010

1111
testCompile project(path: ':r2-core', configuration: 'testArtifacts')
1212
testCompile externalDependency.mockito

0 commit comments

Comments
 (0)