Permalink
Browse files

Bump dependency for example projects and fix build.

RB=711485
G=si-dev
R=ssheng,gogenc,dhoa,kvidhani
A=kvidhani
  • Loading branch information...
1 parent 66bca9f commit af237a0b41dfb3e6ba6357319e4752022dd49410 @CrendKing CrendKing committed Apr 23, 2016
View
@@ -1,5 +1,7 @@
6.0.3
------
+(RB=711485)
+Fix build of the example projects.
6.0.2
------
View
@@ -125,7 +125,7 @@ idea {
}
task wrapper(type: Wrapper) {
- gradleVersion = '2.4'
+ gradleVersion = '2.12'
}
subprojects {
@@ -139,12 +139,6 @@ subprojects {
pluginsRuntime {
visible = false
}
- dataTemplateCompile {
- visible = false
- }
- restClientCompile {
- visible = false
- }
}
dependencies {
pluginsRuntime project(':gradle-plugins')
@@ -1,25 +1,25 @@
allprojects {
- apply plugin: 'idea'
- apply plugin: 'eclipse'
+ apply plugin: 'idea'
+ apply plugin: 'eclipse'
}
-final pegasusVersion = '1.20.0'
+final pegasusVersion = '5.0.19'
ext.spec = [
- 'product' : [
- 'pegasus' : [
- 'r2' : 'com.linkedin.pegasus:r2:' + pegasusVersion,
- 'd2' : 'com.linkedin.pegasus:d2:' + pegasusVersion
- ]
+ 'product' : [
+ 'pegasus' : [
+ 'r2' : 'com.linkedin.pegasus:r2:' + pegasusVersion,
+ 'd2' : 'com.linkedin.pegasus:d2:' + pegasusVersion
]
+ ]
]
ext.externalDependency = [
- 'logbackClassic': 'ch.qos.logback:logback-classic:1.0.13'
+ 'logbackClassic': 'ch.qos.logback:logback-classic:1.0.13'
]
subprojects {
- repositories {
- mavenLocal()
- mavenCentral()
- }
+ repositories {
+ mavenLocal()
+ mavenCentral()
+ }
}
@@ -1,25 +1,25 @@
allprojects {
- apply plugin: 'idea'
- apply plugin: 'eclipse'
+ apply plugin: 'idea'
+ apply plugin: 'eclipse'
}
-final pegasusVersion = '1.20.0'
+final pegasusVersion = '5.0.19'
ext.spec = [
- 'product' : [
- 'pegasus' : [
- 'r2' : 'com.linkedin.pegasus:r2:' + pegasusVersion,
- 'd2' : 'com.linkedin.pegasus:d2:' + pegasusVersion
- ]
+ 'product' : [
+ 'pegasus' : [
+ 'r2' : 'com.linkedin.pegasus:r2:' + pegasusVersion,
+ 'd2' : 'com.linkedin.pegasus:d2:' + pegasusVersion
]
+ ]
]
ext.externalDependency = [
- 'logbackClassic': 'ch.qos.logback:logback-classic:1.0.13'
+ 'logbackClassic': 'ch.qos.logback:logback-classic:1.0.13'
]
subprojects {
- repositories {
- mavenLocal()
- mavenCentral()
- }
+ repositories {
+ mavenLocal()
+ mavenCentral()
+ }
}
@@ -8,27 +8,28 @@ buildscript {
mavenCentral()
}
dependencies {
- classpath "com.linkedin.pegasus:gradle-plugins:1.13.4"
+ classpath 'com.linkedin.pegasus:gradle-plugins:5.0.19'
}
}
task wrapper(type: Wrapper) {
- gradleVersion = '1.12'
+ gradleVersion = '2.12'
}
-final pegasusVersion = "1.15.9"
+final pegasusVersion = '5.0.19'
ext.spec = [
- "product" : [
- "pegasus" : [
- "data" : "com.linkedin.pegasus:data:"+pegasusVersion,
- "generator" : "com.linkedin.pegasus:generator:"+pegasusVersion,
- "restliClient" : "com.linkedin.pegasus:restli-client:"+pegasusVersion,
- "restliServer" : "com.linkedin.pegasus:restli-server:"+pegasusVersion,
- "restliTools" : "com.linkedin.pegasus:restli-tools:"+pegasusVersion,
- "gradlePlugins" : "com.linkedin.pegasus:gradle-plugins:"+pegasusVersion,
- "restliNettyStandalone" : "com.linkedin.pegasus:restli-netty-standalone:"+pegasusVersion,
- "restliServerStandalone" : "com.linkedin.pegasus:restli-server-standalone:"+pegasusVersion,
- "restliGuiceBridge" : "com.linkedin.pegasus:restli-guice-bridge:"+pegasusVersion
+ 'product' : [
+ 'pegasus' : [
+ 'data' : 'com.linkedin.pegasus:data:'+pegasusVersion,
+ 'generator' : 'com.linkedin.pegasus:generator:'+pegasusVersion,
+ 'r2Netty' : 'com.linkedin.pegasus:r2-netty:'+pegasusVersion,
+ 'restliClient' : 'com.linkedin.pegasus:restli-client:'+pegasusVersion,
+ 'restliServer' : 'com.linkedin.pegasus:restli-server:'+pegasusVersion,
+ 'restliTools' : 'com.linkedin.pegasus:restli-tools:'+pegasusVersion,
+ 'gradlePlugins' : 'com.linkedin.pegasus:gradle-plugins:'+pegasusVersion,
+ 'restliNettyStandalone' : 'com.linkedin.pegasus:restli-netty-standalone:'+pegasusVersion,
+ 'restliServerStandalone' : 'com.linkedin.pegasus:restli-server-standalone:'+pegasusVersion,
+ 'restliGuiceBridge' : 'com.linkedin.pegasus:restli-guice-bridge:'+pegasusVersion
]
]
]
@@ -45,10 +46,6 @@ subprojects {
apply plugin: 'idea'
apply plugin: 'eclipse'
- if (project.plugins.hasPlugin('java')) {
- sourceCompatibility = JavaVersion.VERSION_1_6
- }
-
afterEvaluate {
// add the standard pegasus dependencies wherever the plugin is used
if (project.plugins.hasPlugin('pegasus')) {
@@ -64,4 +61,3 @@ subprojects {
mavenCentral()
}
}
-
@@ -2,6 +2,7 @@ apply plugin: 'java'
dependencies {
compile project(path: ':api', configuration: 'restClient')
+ compile spec.product.pegasus.r2Netty
}
task startFortunesClient(type: JavaExec) {
@@ -20,6 +20,7 @@
import com.linkedin.common.callback.Callback;
import com.linkedin.common.callback.FutureCallback;
import com.linkedin.common.util.None;
+import com.linkedin.r2.filter.CompressionConfig;
import com.linkedin.r2.filter.FilterChains;
import com.linkedin.r2.filter.compression.ClientCompressionFilter;
import com.linkedin.r2.filter.compression.EncodingType;
@@ -39,15 +40,21 @@
*/
public class RestLiFortunesClient
{
+ private static final int THRESHOLD = 4096;
+
/**
* This stand-alone app demos the client-side Pegasus API.
* To see the demo, run RestLiFortuneServer, then start the client
*/
public static void main(String[] args) throws Exception
{
// Create an HttpClient and wrap it in an abstraction layer
- final HttpClientFactory http = new HttpClientFactory(FilterChains.create(
- new ClientCompressionFilter(EncodingType.IDENTITY, new EncodingType[]{ EncodingType.SNAPPY}, Collections.singletonList("*"))
+ final HttpClientFactory http = new HttpClientFactory(FilterChains.createRestChain(
+ new ClientCompressionFilter(EncodingType.IDENTITY,
+ new CompressionConfig(THRESHOLD),
+ new EncodingType[] { EncodingType.SNAPPY },
+ new CompressionConfig(THRESHOLD),
+ Collections.singletonList("*"))
));
final Client r2Client = new TransportClientAdapter(
@@ -76,4 +83,3 @@ public static void main(String[] args) throws Exception
}
private static final FortunesBuilders _fortuneBuilder = new FortunesBuilders();
}
-
@@ -7,6 +7,7 @@ ext.apiProject = project(':api')
dependencies {
compile project(path: ':api', configuration: 'dataTemplate')
+ compile spec.product.pegasus.r2Netty
compile spec.product.pegasus.restliServer
compile spec.product.pegasus.restliGuiceBridge
compile externalDependency.logbackClassic
@@ -21,6 +21,7 @@
import com.google.inject.Injector;
import com.google.inject.servlet.GuiceServletContextListener;
import com.google.inject.servlet.ServletModule;
+import com.linkedin.r2.filter.CompressionConfig;
import com.linkedin.r2.filter.FilterChain;
import com.linkedin.r2.filter.FilterChains;
import com.linkedin.r2.filter.compression.EncodingType;
@@ -35,6 +36,8 @@
*/
public class FortunesGuiceServletConfig extends GuiceServletContextListener
{
+ private static final int THRESHOLD = 4096;
+
@Override
protected Injector getInjector()
{
@@ -48,8 +51,8 @@ protected void configure()
restLiConfig.setResourcePackageNames("com.example.fortune");
bind(RestLiConfig.class).toInstance(restLiConfig);
- FilterChain filterChain = FilterChains.create(
- new ServerCompressionFilter(new EncodingType[] { EncodingType.SNAPPY }),
+ FilterChain filterChain = FilterChains.createRestChain(
+ new ServerCompressionFilter(new EncodingType[] { EncodingType.SNAPPY }, new CompressionConfig(THRESHOLD)),
new SimpleLoggingFilter());
bind(FilterChain.class).toInstance(filterChain);
}
@@ -5,20 +5,21 @@ buildscript {
mavenCentral()
}
dependencies {
- classpath 'com.linkedin.pegasus:gradle-plugins:1.15.9'
+ classpath 'com.linkedin.pegasus:gradle-plugins:5.0.19'
}
}
task wrapper(type: Wrapper) {
- gradleVersion = '1.12'
+ gradleVersion = '2.12'
}
-final pegasusVersion = '1.15.9'
+final pegasusVersion = '5.0.19'
ext.spec = [
'product' : [
'pegasus' : [
'data' : 'com.linkedin.pegasus:data:' + pegasusVersion,
'generator' : 'com.linkedin.pegasus:generator:' + pegasusVersion,
+ 'r2Netty' : 'com.linkedin.pegasus:r2-netty:' + pegasusVersion,
'restliCommon' : 'com.linkedin.pegasus:restli-common:' + pegasusVersion,
'restliClient' : 'com.linkedin.pegasus:restli-client:' + pegasusVersion,
'restliServer' : 'com.linkedin.pegasus:restli-server:' + pegasusVersion,
@@ -39,18 +40,11 @@ subprojects {
apply plugin: 'maven'
afterEvaluate {
- if (project.plugins.hasPlugin('java')) {
- sourceCompatibility = JavaVersion.VERSION_1_6
- }
-
// add the standard pegasus dependencies wherever the plugin is used
if (project.plugins.hasPlugin('pegasus')) {
dependencies {
dataTemplateCompile spec.product.pegasus.data
restClientCompile spec.product.pegasus.restliClient
-
- // needed for Gradle 1.9+
- restClientCompile spec.product.pegasus.restliCommon
}
}
}
@@ -2,6 +2,7 @@ apply plugin: 'java'
dependencies {
compile project(path: ':api', configuration: 'restClient')
+ compile spec.product.pegasus.r2Netty
}
task startFortunesClient(type: JavaExec) {
@@ -8,27 +8,28 @@ buildscript {
mavenCentral()
}
dependencies {
- classpath "com.linkedin.pegasus:gradle-plugins:1.15.9"
+ classpath 'com.linkedin.pegasus:gradle-plugins:5.0.19'
}
}
task wrapper(type: Wrapper) {
- gradleVersion = '1.12'
+ gradleVersion = '2.12'
}
-final String pegasusVersion = "1.15.9"
+final String pegasusVersion = '5.0.19'
ext.spec = [
- "product" : [
- "pegasus" : [
- "data" : "com.linkedin.pegasus:data:"+pegasusVersion,
- "generator" : "com.linkedin.pegasus:generator:"+pegasusVersion,
- "restliClient" : "com.linkedin.pegasus:restli-client:"+pegasusVersion,
- "restliServer" : "com.linkedin.pegasus:restli-server:"+pegasusVersion,
- "restliTools" : "com.linkedin.pegasus:restli-tools:"+pegasusVersion,
- "gradlePlugins" : "com.linkedin.pegasus:gradle-plugins:"+pegasusVersion,
- "restliNettyStandalone" : "com.linkedin.pegasus:restli-netty-standalone:"+pegasusVersion,
- "restliServerStandalone" : "com.linkedin.pegasus:restli-server-standalone:"+pegasusVersion,
- "restliSpringBridge" : "com.linkedin.pegasus:restli-spring-bridge:"+pegasusVersion
+ 'product' : [
+ 'pegasus' : [
+ 'data' : 'com.linkedin.pegasus:data:'+pegasusVersion,
+ 'generator' : 'com.linkedin.pegasus:generator:'+pegasusVersion,
+ 'r2Netty' : 'com.linkedin.pegasus:r2-netty:'+pegasusVersion,
+ 'restliClient' : 'com.linkedin.pegasus:restli-client:'+pegasusVersion,
+ 'restliServer' : 'com.linkedin.pegasus:restli-server:'+pegasusVersion,
+ 'restliTools' : 'com.linkedin.pegasus:restli-tools:'+pegasusVersion,
+ 'gradlePlugins' : 'com.linkedin.pegasus:gradle-plugins:'+pegasusVersion,
+ 'restliNettyStandalone' : 'com.linkedin.pegasus:restli-netty-standalone:'+pegasusVersion,
+ 'restliServerStandalone' : 'com.linkedin.pegasus:restli-server-standalone:'+pegasusVersion,
+ 'restliSpringBridge' : 'com.linkedin.pegasus:restli-spring-bridge:'+pegasusVersion
]
]
]
@@ -45,10 +46,6 @@ subprojects {
apply plugin: 'eclipse'
afterEvaluate {
- if (project.plugins.hasPlugin('java')) {
- sourceCompatibility = JavaVersion.VERSION_1_6
- }
-
// add the standard pegasus dependencies wherever the plugin is used
if (project.plugins.hasPlugin('pegasus')) {
dependencies {
@@ -63,4 +60,3 @@ subprojects {
mavenCentral()
}
}
-
@@ -2,6 +2,7 @@ apply plugin: 'java'
dependencies {
compile project(path: ':api', configuration: 'restClient')
+ compile spec.product.pegasus.r2Netty
}
task startFortunesClient(type: JavaExec) {
Binary file not shown.
@@ -1,6 +1,6 @@
-#Wed Nov 05 14:13:47 PST 2014
+#Sat Apr 23 15:01:53 PDT 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-2.1-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-2.12-bin.zip

0 comments on commit af237a0

Please sign in to comment.