Skip to content

Commit 7e2d161

Browse files
committed
Shade Netty into r2.
1 parent 1480c5b commit 7e2d161

File tree

105 files changed

+570
-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

+570
-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+
## [30.0.0] - 2022-03-24
18+
- Introduce restli-netty, a shaded Netty dependency for use with r2.
19+
1720
## [29.33.1] - 2022-04-12
1821
- Fix an Avro translation bug where optional fields in a partial default record are not treated properly.
1922

@@ -5215,7 +5218,8 @@ patch operations can re-use these classes for generating patch messages.
52155218

52165219
## [0.14.1]
52175220

5218-
[Unreleased]: https://github.com/linkedin/rest.li/compare/v29.33.1...master
5221+
[Unreleased]: https://github.com/linkedin/rest.li/compare/v30.0.0...master
5222+
[30.0.0]: https://github.com/linkedin/rest.li/compare/v29.33.1...v30.0.0
52195223
[29.33.1]: https://github.com/linkedin/rest.li/compare/v29.33.0...v29.33.1
52205224
[29.33.0]: https://github.com/linkedin/rest.li/compare/v29.32.5...v29.33.0
52215225
[29.32.5]: https://github.com/linkedin/rest.li/compare/v29.32.4...v29.32.5

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: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,19 @@ 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+
if (it.classifier && it.classifier != 'slim') {
7177
artifact it
7278
}
7379
}

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.33.1
1+
version=30.0.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)