Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.

Nebula: Netflix's OSS Gradle Plugins

1 468 vues

Publié le

A quick overview of our open source Gradle plugins.

Publié dans : Logiciels
  • https://www.slideshare.net/xvier3453/android-studio-feature In today’s Era data security is one of the major concerns while transferring the data through wireless media.Due to the popularity of computer and Internet technology, network communication has penetrated into all aspects of society. Information security issues get more and more attention. Data encryption is the core in data confidentiality, integrity, effectiveness, and network security [1]. There are different algorithm and protocols available to address this issue. Encryption is the one of the best and highly used technology to secure the data. Encryption is the process of encoding a message or information in such a way that only authorized parties can access it. There are many Encryption algorithms available to encrypt the data. Symmetric key algorithms and Asymmetric key algorithms are two types of an encryption algorithm. In Symmetric key algorithms, both sender and recipient use the same private key to encrypt and decrypt the data. In another hand, Asymmetric key algorithms use different but related keys to encrypt and decrypt the message.
       Répondre 
    Voulez-vous vraiment ?  Oui  Non
    Votre message apparaîtra ici

Nebula: Netflix's OSS Gradle Plugins

  1. 1. Nebula:(Ne)lix's(OSS(Gradle( Plugins Rob$Spieldenner$@robspieldenner @NebulaPlugins
  2. 2. h"p://ne(lix.github.io/ h"ps://github.com/nebula4plugins
  3. 3. Why$Open$Source • Help&out&other&teams&using&gradle • Contribu5ons • Hiring
  4. 4. Current'Plugin'Build/Publish' Infrastructure • Github • branch,per,gradle,release • version,based,on,gradle,release,2.4.x,for, gradle:2.4 • Cloudbees,(Jenkins),for,CI,and,release:,Job,DSL,to, setup,a,snapshot,and,release,job,per,branch • Bintray,(jcenter),as,host
  5. 5. New$Plugin$Build/Publish$ Infrastructure • Github • matrix,tes/ng,for,different,versions,of,gradle • seman/c,versioning • Travis,CI,for,CI,,release,on,github,tag • Bintray,(jcenter),as,host • Publish,with,gradle,plugin,portal
  6. 6. Support,(Issues,(etc. • Github(issues • We(love(pull(requests • or(breaking(tests • gi6er.im
  7. 7. Naming'Scheme • nebula():)indicates)a)highly)opinionated)plugin • gradle():)indicates)we)believe)everyone)would) benefit)from)the)func;onality
  8. 8. nebula'test h"ps://github.com/nebula4plugins/nebula4test
  9. 9. nebula'test will$be$replaced$by$Gradle$TestKit • ProjectSpec • PluginProjectSpec • Integra2onSpec • Dependency6Genera2on
  10. 10. PluginProjectSpec import nebula.test.PluginProjectSpec class PluginExampleSpec extends PluginProjectSpec { @Override String getPluginName() { 'plugin-example' } def ‘check task is setup’() { when: project.plugins.apply(PluginExample) then: def exampleTask = project.tasks.get(‘example’) exampleTask.exampleProperty == 'myConfiguredValue' } }
  11. 11. Integra(onSpec import nebula.test.IntegrationSpec class MyExampleSpec extends IntegrationSpec { def 'example test'() { buildFile << """ apply plugin: 'java' ${applyPlugin(MyExamplePlugin)} """.stripIndent() when: def results = runTasksSuccessfully('exampleTask') then: results.wasExecuted(':exampleTask') results.wasUpToDate(':dependentTask') results.standardOutput.contains 'Example task output' fileExists('build/example/mycache.tmp') } }
  12. 12. Dependency(Genera,on import nebula.test.dependencies.DependencyGraphBuilder import nebula.test.dependencies.ModuleBuilder // ... def 'generate dependencies'() { given: def graph = new DependencyGraphBuilder().addModule('g0:a0:0.0.1') .addModule('g1', 'a1', '1.0.1') .addModule(new ModuleBuilder('g2:a2:2.0.1').build()) .addModule(new ModuleBuilder('g3:a3:3.0.1') .addDependency('g4:a4:4.0.1') .addDependency('g5', 'a5', '5.0.1').build() ).build() def generator = new GradleDependencyGenerator(graph) def mavenRepo = generator.generateTestMavenRepo() // def ivyRepo = generator.generateTestIvyRepo() // rest of test }
  13. 13. nebula'core h"ps://github.com/nebula4plugins/nebula4core
  14. 14. nebula'core U"lity'tasks'for'other'plugins • Download • Unzip • Untar
  15. 15. nebula'project'plugin h"ps://github.com/nebula4plugins/nebula4project4 plugin
  16. 16. nebula'project'plugin • Opinionated+about+what+a+responsible+project+ should+do • Builds+Javadoc+and+Sources+jars • Record+informa<on+about+the+build+and+stores+it+ in+the+.jar,+via+gradle@info@plugin • Easy+specifica<on+of+people+involved+in+a+project+ via+gradle@contacts@plugin • facets+to+ease+seDng+up+new+source+sets
  17. 17. gradle'ne)lixoss'project' plugin h"ps://github.com/nebula4plugins/gradle4ne7lixoss4 project4plugin
  18. 18. gradle'ne)lixoss'project'plugin • Provide)release)process • Configure)publishing • Recommend)license)headers • Add)some)error)handling)for)javadoc)in)jdk8
  19. 19. gradle'ospackage'plugin h"ps://github.com/nebula4plugins/gradle4ospackage4 plugin
  20. 20. gradle'ospackage'plugin apply plugin: 'nebula.ospackage' ospackage { installUtils file('scripts/utils.sh') preInstall file('scripts/preInstall.sh') postInstall file('scripts/postInstall.sh') preUninstall 'touch /tmp/myfile' postUninstall file('scripts/postUninstall.sh') requires('qux') into '/' from 'root' } buildRpm { requires('bar', '2.2', GREATER | EQUAL) requires('baz', '1.0.1', LESS) link('/etc/init.d/foo’, '/opt/foo/bin/foo.init') } buildDeb { requires('bat', '1.0.1') link('/etc/init.d/foo', '/opt/foo/bin/foo.upstart') }
  21. 21. nebula'ospackage'plugin h"ps://github.com/nebula4plugins/nebula4ospackage4 plugin
  22. 22. nebula'ospackage'plugin • nebula.nebula-ospackage-daemon"#"Setup" daemontools"in"a"system"package • nebula.nebula-ospackage-application"#" Put"contents"of"applica7on"zip"into"/opt/ $applica7onName • nebula.nebula-ospackage-application- daemon"#"Combine"the"above,"auto"setup" daemontools"script"for"the"applica7on"plugin" output
  23. 23. gradle'dependency'lock' plugin h"ps://github.com/nebula4plugins/gradle4 dependency4lock4plugin
  24. 24. gradle'dependency'lock'plugin plugins { id 'nebula.dependency-lock' version '3.0.0' id 'groovy' } repositories { jcenter() } dependencies { compile 'org.codehaus.groovy:groovy-all:2.+' compile 'com.google.guava:guava:latest.release' testCompile 'junit:junit:[4.0, 5.0)' }
  25. 25. gradle'dependency'lock'plugin ./gradlew generateLock saveLock { "com.google.guava:guava": { "locked": "19.0-rc1", "requested": "latest.release" }, "junit:junit": { "locked": "4.12", "requested": "[4.0, 5.0)" }, "org.codehaus.groovy:groovy-all": { "locked": "2.4.4", "requested": "2.+" } }
  26. 26. gradle'dependency'lock'plugin plugins { id 'nebula.dependency-lock' version '3.0.0' id 'groovy' } dependencyLock { includeTransitives = true } repositories { jcenter() } dependencies { compile 'org.codehaus.groovy:groovy-all:2.+' compile 'com.google.guava:guava:latest.release' testCompile 'junit:junit:[4.0, 5.0)' }
  27. 27. gradle'dependency'lock'plugin ./gradlew generateLock saveLock { "com.google.guava:guava": { "locked": "19.0-rc1", "requested": "latest.release" }, "junit:junit": { "locked": "4.12", "requested": "[4.0, 5.0)" }, "org.codehaus.groovy:groovy-all": { "locked": "2.4.4", "requested": "2.+" }, "org.hamcrest:hamcrest-core": { "locked": "1.3", "transitive": [ "junit:junit" ] } }
  28. 28. gradle'extra'configura/ons' plugin h"ps://github.com/nebula4plugins/gradle4extra4 configura9ons4plugin
  29. 29. gradle'extra'configura/ons'plugin apply plugin: 'nebula.provided-base' dependencies { provided 'example:providedlib:42.1.2' } // ------------------ apply plugin: 'nebula.optional-base' dependencies { compile 'example:optionallib:2.3.4', optional }
  30. 30. nebula'publishing'plugin h"ps://github.com/nebula4plugins/nebula4publishing4 plugin
  31. 31. nebula'publishing'plugin • nebula.javadoc.jar • nebula.source.jar • nebula.test.jar
  32. 32. nebula'publishing'plugin • nebula.maven+apache+license.proper3es • nebula.maven+manifest.proper3es • nebula.maven+base+publish.proper3es • nebula.maven+dependencies.proper3es • nebula.maven+resolved.proper3es • nebula.maven+scm.proper3es
  33. 33. nebula'publishing'plugin nebula.maven*publishing/nebula.ivy*publishing • resolve(dynamic(versions(to(specific • dependencies(for(war • add(licenses • add(manifest/informa6onal(proper6es
  34. 34. nebula'publishing'plugin <name>gradle-dependency-lock-plugin</name> <description>Gradle plugin to allow locking of dynamic dependency versions</description> <properties> <nebula_Manifest_Version>1.0</nebula_Manifest_Version> <nebula_Implementation_Title>com.netflix.nebula#gradle-dependency-lock-plugin;2.2.3</nebula_Implementation_Title> <nebula_Implementation_Version>2.2.3</nebula_Implementation_Version> <nebula_Built_By>jenkins</nebula_Built_By> <nebula_Build_Date>2015-04-02_10:02:13</nebula_Build_Date> <nebula_Gradle_Version>2.2.1</nebula_Gradle_Version> <nebula_Module_Origin>git@github.com:nebula-plugins/gradle-dependency-lock-plugin.git</nebula_Module_Origin> <nebula_Change>f91b5ad</nebula_Change> <nebula_Build_Id>2015-04-02_16-59-13</nebula_Build_Id> <nebula_Created_By>1.7.0_60-b19 (Oracle Corporation)</nebula_Created_By> <nebula_Build_Java_Version>1.7.0_60</nebula_Build_Java_Version> <nebula_X_Compile_Target_JDK>1.7</nebula_X_Compile_Target_JDK> <nebula_X_Compile_Source_JDK>1.7</nebula_X_Compile_Source_JDK> </properties> <scm> <url>git@github.com:nebula-plugins/gradle-dependency-lock-plugin.git</url> <connection>scm:git@github.com:nebula-plugins/gradle-dependency-lock-plugin.git</connection> </scm> <developers> <developer> <id>exampleuser</id> <name>Example User</name> <email>example@example.email</email> </developer> </developers>
  35. 35. gradle'metrics'plugin h"ps://github.com/nebula4plugins/gradle4metrics4 plugin
  36. 36. gradle'metrics'plugin • Stopped(development(in(favor(of(gradle.com • Ela5csearch(index(of(each(build • Info(<(Gradle(start(parameters,(system(proper5es( and(environment(variables.(SCM(and(GIT( informa5on(if(the(gradle<info<plugin(has(been( applied • Project(<(name(and(version • Events(<(configura5on,(dependency(resolu5on,( task(execu5on
  37. 37. gradle'override'plugin h"ps://github.com/nebula4plugins/gradle4override4 plugin
  38. 38. gradle'override'plugin apply plugin: 'nebula.nebula-override' class MyExtension { String myProp } example { myProp = 'hello' } $ ./gradlew -Doverride.example.myProb=newValue <task> $ ./gradlew -Doverride.sourceCompatibility=1.7 <task>
  39. 39. gradle'blacklist'plugin h"ps://github.com/nebula4plugins/gradle4blacklist4 plugin
  40. 40. gradle'blacklist'plugin blacklist { translate { map 'nebula', 'com.netflix.nebula' map 'commons-lang:commons-lang:2.6', 'org.apache.commons:commons-lang3:3.3.2' } flag { block 'org.foo:bar:3.4' warn group: 'com.company', name: 'baz', version: '1.2' } }
  41. 41. Other&Plugins • gradle(dependency(recommender(plugin • nebula(clojure(plugin • nebula(bintray(plugin • gradle(stash(plugin • gradle(contacts(plugin • gradle(scm(plugin • gradle(git(scm(plugin
  42. 42. Ques%ons
  43. 43. Ne#lix'is'Hiring • Build'Tools'+'Full'Stack'Engineer • h8ps://jobs.ne?lix.com/

×