• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Gradle - next generation of build tools
 

Gradle - next generation of build tools

on

  • 1,579 views

(Russian) Overview of gradle build integration tool - current status, features and how it compares to current Java mainstream build tools - Ant and Maven.

(Russian) Overview of gradle build integration tool - current status, features and how it compares to current Java mainstream build tools - Ant and Maven.

Statistics

Views

Total Views
1,579
Views on SlideShare
1,540
Embed Views
39

Actions

Likes
0
Downloads
23
Comments
0

6 Embeds 39

http://it-jam.com.ua 24
http://it-jam.ciklum.net 8
http://twitter.com 3
http://www.it-jam.com.ua 2
https://twitter.com 1
http://www.it-jam.ciklum.net 1

Accessibility

Categories

Upload Details

Uploaded via as OpenOffice

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Gradle - next generation of build tools Gradle - next generation of build tools Presentation Transcript

    • Gradle next generation of build tools E-mail: khotin@gmx.com Игорь Хотинь Gradle next generation of build tools
    • Background
      • 11+ лет в IT-индустрии
      • 6+ лет с Java
      • Сторонник гибкого дизайна
      • Agile-практик
    • Что мы используем?
      • Ant?
      • Maven?
      • buildr?
      • Gradle?
      • ...
    • Что нас беспокоит?
      • Тяжёлые билды
      • Долгие циклы интеграции
      • Поддержка билд-проектов
      • ...
    • Как это было раньше?
    • Выбить перфокарты...
    • Принести оператору
    • Подождать результат
    • Забрать распечатки
    • Отладка?
    • 1977 – make
    • 2000
    • Сложность повторное использование ant тяжёлые build.xml контроль циклов сборки
    • 2001
    • m a ven тяжёлые pom.xml convention over configuration dependency management Сложно переопределить поведение по-умолчанию lost of control
    • Gradle вчера
      • Hans Dockter – основатель
      • Еволюция идей Gant
      • Начало 2008 – первые версии
      • Серия стабильных pre-1.0 релизов
      • 2010 Springy Innovation Award
    • Gradle сегодня
      • Релиз 1.0 milestone-3 stable
      • Активное сообщество
      • Gradleware
      • Apache License, Version 2.0
    • Gradle in the wild Carrier Hibernate Grails Groovy Spring-Security Spring-Integration EADS Griffon Gaelyk Qi4j Canoo FCC Zeppelin GmhH Spock Aluminum Gant GPars
    • Gradle завтра
      • Сентябрь 2011 - 1.0 RC-1
      • Ожидаем релиз 1.0 к концу 2012
        • Более тесная интеграция с maven
        • Build aggregation
        • Gradle daemon
        • Gradle 1.0 Plugin System
        • Archetypes?
    • Who is that Gradle?
      • Build integration tool
      • Declarative builds
      • Groovy-based build DSL
      • Build-by-convention
    • Who is that Gradle?
      • Scalable – multi-project builds
      • Dependency management
      • Ease of migration
      • Embeddable
      • Deep API
    • Gradle positioning
    • Hello Gradle build.gradle task hello << { println 'Hello world!' } > gradle -q hello Hello Gradle!
    • gradle task != ant task gradle task == ant target
    • Groovy в Gradle build.gradle task count << { 4.times { print &quot;$it &quot; } } > gradle -q count 0 1 2 3
    • Dependencies build.gradle task hello << { println 'Hello world!' } task count(dependsOn: hello) << { 4.times { print &quot;$it &quot; } } > gradle -q count Hello world! 0 1 2 3
    • Lazy dependencies build.gradle task hello(dependsOn: 'lazy') << { println 'Hello world!' } task lazy << { println 'so lazy...' } > gradle -q hello so lazy... Hello world!
    • Java Plugin build.gradle apply plugin: 'java' > gradle build ...
    • Java build-cycle customization build.gradle apply plugin: 'java' test.doFirst { println 'Before testing...' } test.doLast { println '...after testing.' }
    • Repos build.gradle apply plugin: 'java' repositories { mavenCentral() } dependencies { compile group: 'commons-collections', name: 'commons-collections', version: '3.2' testCompile group: 'junit', name: 'junit', version: '4.+' }
    • Ant build.gradle ant.importBuild 'build.xml' task ant << { ant.echo(message: 'hello from Ant') ant.zip(destfile: 'archive.zip') { fileset(dir: 'src') { include(name: '**.xml') exclude(name: '**.java') } } }
    • Apache Ant vs. Apache Maven vs. Gradle
    • ant <?xml version=&quot;1.0&quot;?> <project name=&quot;simple&quot; default=&quot;dist&quot; basedir=&quot;.&quot;> <property name=&quot;src&quot; location=&quot;src/main/java&quot;/> <property name=&quot;srcTest&quot; location=&quot;src/test/java&quot;/> <property name=&quot;build&quot; location=&quot;build&quot;/> <property name=&quot;dist&quot; location=&quot;${build}/lib&quot;/> <property name=&quot;version&quot; value=&quot;1.0-SNAPSHOT&quot; /> <path id=&quot;classpath.compile&quot;> <pathelement location=&quot;libs/commons-lang-2.5.jar&quot;/> </path> <path id=&quot;classpath.test&quot;> <pathelement location=&quot;libs/junit-4.8.2.jar&quot;/> <pathelement location=&quot;libs/commons-lang-2.5.jar&quot;/> <pathelement location=&quot;${srcTest}&quot;/> <pathelement location=&quot;${build}/classes&quot;/> <pathelement location=&quot;${build}/test-classes&quot;/> </path> ...
    • ... <target name=&quot;init&quot;> <mkdir dir=&quot;${build}/classes&quot;/> <mkdir dir=&quot;${build}/test-classes&quot;/> </target> <target name=&quot;compile&quot; depends=&quot;init&quot;> <javac srcdir=&quot;${src}&quot; destdir=&quot;${build}/classes&quot;> <classpath refid=&quot;classpath.compile&quot;/> </javac> </target> <target name=&quot;testCompile&quot; depends=&quot;compile&quot;> <javac srcdir=&quot;${srcTest}&quot; destdir=&quot;${build}/test-classes&quot;> <classpath refid=&quot;classpath.test&quot;/> </javac> </target> ... ant
    • ... <target name=&quot;test&quot; depends=&quot;testCompile&quot;> <junit fork=&quot;yes&quot; haltonfailure=&quot;yes&quot;> <batchtest fork=&quot;yes&quot;> <fileset dir=&quot;${srcTest}&quot;> <include name=&quot;**/*Test.java&quot;/> </fileset> </batchtest> <classpath refid=&quot;classpath.test&quot;/> <formatter type=&quot;plain&quot;/> </junit> </target> <target name=&quot;dist&quot; depends=&quot;test&quot;> <mkdir dir=&quot;${dist}&quot;/> <jar jarfile=&quot;${dist}/coc-comparison-${version}.jar&quot; basedir=&quot;${build}/classes&quot;/> </target> <target name=&quot;clean&quot;><delete dir=&quot;${build}&quot;/></target> </project> ant
    • m a ven <?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?> <project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd&quot;> <modelVersion>4.0.0</modelVersion> <groupId>grId</groupId> <artifactId>coc-comparison</artifactId> <packaging>jar</packaging> <version>1.0-SNAPSHOT</version> ...
    • m a ven ... <dependencies> <dependency> <groupId>commons-lang</groupId> <artifactId>commons-lang</artifactId> <version>2.5</version> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.8.1</version> <scope>test</scope> </dependency> </dependencies> </project>
    • gradle apply plugin: 'java' version=&quot;1.0-SNAPSHOT&quot; group=&quot;grId&quot; archivesBaseName=&quot;coc-comparison&quot; repositories { mavenCentral() } dependencies { compile 'commons-lang:commons-lang:2.5' testCompile 'junit:junit:4.8.1' }
    •  
    • Ресурсы
      • www.gradle.org
      • groovy.codehaus.org
      • ant.apache.org/ivy
    • Контакты E-mail: [email_address] Blog: www.ikhotin.com Twitter: chaostarter linkedin .com/pub/igor-khotin/5/193/257
    • Вопросы?