Your SlideShare is downloading. ×
  • Like
SF Gradle Meetup - Netflix OSS
Upcoming SlideShare
Loading in...5

Thanks for flagging this SlideShare!

Oops! An error has occurred.


Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

SF Gradle Meetup - Netflix OSS



Published in Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads


Total Views
On SlideShare
From Embeds
Number of Embeds



Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

    No notes for slide
  • Where it all beganLegal does horribly code reviews Freedom & Responsibility to release it
  • We knew they’d be grow, though we never thought it’d be like this. Currently 26 Projects, all used internally in production:
  • Goals Establish our solutions as Best Practices/Standards Build up Netflix Technology Branch Retain and Engage Top Engineers Benefit from a shared ecosystemWhat Cloud Platform Undifferentiated Heavy Lifting
  • With that in mind, we don’t have to make an open source build. But we should, since we’re the best placed to do it.
  • Planned on using internally. Apply plugin: ‘java’
  • Cobbled together from blog posts Users had to set version
  • Attempting to mimic the internal build, where the minimum is specified.
  • gradle-release version Tag in SCM Ensure builds against internal and external


  • 1. Netflix OSS With Gradle@netflixoss
  • 2. @NetflixOSS ProgressionCuratorAutoScalingAstyanaxServoPriamJmeterforC*ExhibitorArchaiusAsgardChaosMonkeyEurekaGovernatorBlitz4JHystrixTurbineJanitorMonkeyRibbonRxJavaEVCacheDenominatorKaryonNeJlixGraphRecipeAppCI/CloudbeesAminator2012 2013
  • 3.
  • 4. My Role• Engineering Tools• We help, when and where we can• Build, Bake, Deploy, Monkey• Lead on internal Gradle and Ant builds
  • 5. EnvironmentsAll of Maven CentralPublish to SonatypeMaven On The OutsideDone in the publicSetup everythingNo Maven CentralPublish to ArtifactoryIvy On The InsideLegacy ConventionsMinimal Setup
  • 6. Phase 0: Use Gradle
  • 7. Phase 1: Naive Approach• Copyable build• build.gradle• gradle/conventions.gradle• gradle/maven.gradle• gradle/netflix-oss.gradle• Decent examples online
  • 8. ext.releaseVersion = 1.1.3 // TEMPLATEext.githubName = // TEMPLATEapply from: file(gradle/convention.gradle)apply from: file(gradle/maven.gradle)apply from: file(gradle/check.gradle)group = com.netflixrepositories {mavenCentral()}dependencies { // TEMPLATEcompile com.sun.jersey:jersey-core:1.11testCompile org.testng:testng:6.1.1testCompile org.mockito:mockito-core:1.8.5}build.gradle
  • 9. ext.performingRelease = project.hasProperty(release) &&Boolean.parseBoolean(project.release)def versionPostfix = performingRelease?:-SNAPSHOTversion = "${releaseVersion}${versionPostfix}"status = performingRelease?release:snapshotapply plugin: java // Plugin as major conventionssourceCompatibility = 1.6// GRADLE-2087 workaround, perform after java pluginstatus = rootProject.statustask sourcesJar(type: Jar, dependsOn:classes) {classifier = sourcesfrom sourceSets.main.allSource}task javadocJar(type: Jar, dependsOn:javadoc) {classifier = javadoc  from javadoc.destinationDir}convention.gradle
  • 10. apply plugin: mavenapply plugin: signingsigning { sign configurations.archives}task uploadMavenCentral(type:Upload) {configuration = configurations.archivesdependsOn signArchivesdoFirst.repositories.mavenDeployer {beforeDeployment { signing.signPom(it) }repository(url: {authentication(userName: rroject.sonatypeUsername, password:project.sonatypePassword)}pom.project {url "${project.githubName}"...}}}maven.gradle
  • 11. apply from:
  • 12. gradle-template• Be as visible as possible• Meant to be synced with (#git #ftw)• Templates for multiple-module and single-moduleprojects• Used by other companies•
  • 13. Phase 2: Full Build• Release plugin [gradle-release]• Publish snapshots, candidates and releases• Simpler signing in Jenkins• License and Copyright Headers [license-gradle-plugin]• Any plugins in Bintray• Publishing Javadoc• More code quality checks
  • 14. Continuous Integration• Jenkins Internally• Performs releases• Has Keys• Access to AWS• CloudBees DEV@CLOUD Externally• Builds Pull Requests• Shows Code Quality Metrics
  • 15. Problem Areas• Java plugin required for conf2scope mappings to work• Java plugin resets status [GRADLE-2087]• Parent poms caused problems, but aren’t needed• Sonatype username/password• Signing keys needed locally with special properties• Not all plugins were available
  • 16. Future• Roll features into plugins• Merge with internal build• Hire more engineers to work on Gradle
  • 17. @quidryan@quidryan YouQuestions?@netflixoss #cloudprize