Eclipse Buildship JUG Hamburg

Embed Size (px)

Citation preview

Eclipse Buildship

Simon Scholz

https://twitter.com/simonscholz

Agenda

Gradle in general

BuildshipExplanation

Demo

Future plans

Questions

Please ask questions at any the time!

What is Gradle?

Buildtool (Concepts of both Ant and Maven)

Groovy based DSL instead of XML

Multi-project builds

Polyglot Builds

Incremental Build

Lots of Plugins

apply plugin: 'java'

https://plugins.gradle.org/

Incremental builds, build caching and parallelization drives the Gradle daemon to new heights of performance

Out of the box, Gradle handles transitive dependencies that resolve across multiple repository types including Maven, Ivy, flat files.

Linkedin uses Gradle to build 60 different programming languages including Java, Scala, Python, C/C++, Android, IOS and many many more.

Robust build analytic capabilities that allow build masters to see exactly what needs to be optimized and zero in on build problems. Gain insight into the efficiency of the build pipeline including which modules are outperforming and which are lagging.

Sample Gradle script

apply plugin: 'java'

repositories { jcenter() mavenCentral() ivy { url "http://repo.mycompany.com/repo" }}

task JUGHH { System.out.println(Please the audience) }

dependencies { compile 'org.slf4j:slf4j-api:1.7.12'

testCompile 'junit:junit:4.12'}

Gradle Wrapper

Project may contain a Gradle wrapper

Linux / Mac

gradlew

Windows

gradlew.bat

./gradlew build

Make sure that the builds runs the same everywhere

What is needed for Gradle?

Java 6 or higher (JDK or JRE)

No Groovy installation required

Add GRADLE_HOME/bin to your path

Latest Version 2.7 (14th of September)

You can check installation with the gradle -v command in a terminal

https://docs.gradle.org/current/release-notes

Release every 4-6 weeks

What is Buildship?

Current Version 1.0.3 will be shipped with Eclipse Mars 4.5.1 (25th of Sep.)

Tooling API

GradleTooling APIBuildship

Single truth of build logic!Etienne Studer

Beginning of the screenshot slides, which where shown live in Eclipse

We recommend to leave it like in the sreenshot,because all settings made here are only locally in your Eclipse IDE and therefore won't be available for others who checkout the ProjectsTip : Rather specify your settings in the Gradle build files

Gradle automatically choosesthe right version, which is definedin the build files orthe latest, if no version is defined.

The preview also shows the project structure of the overall import

Gradle Task View

Shows the tasks of the Gradle projects

Filter options in theView's menu

Gradle Execution View

See all running tasks with options to open test files, see failures and (re-)run tests

Jump to test file and see test summary

Gradle Run Configuration

The New Wizard uses the gradle init --type 'java-library' command to create this Project

End of the screenshot slides, which where shown live in Eclipse

Buildship Libraries

Several Eclipse IDE Libraries (Resources, JDT...)

Google Guava

Google GSON

SLF4J

Gradle Tooling API

Testing: Spock, SWTBot tests

Obtained from Eclipse Orbit

Will soon be part of Eclipse Orbit

http://download.eclipse.org/tools/orbit/downloads/

Current Features

Import Gradle projects

Create new Gradle projects

Run Gradle tasks in the IDEIt is recommended to use the latest Gradle Version

Visualize Gradle task execution

What is needed for Buildship?

Java 6 or higher (JDK or JRE)

At least Eclipse 3.6

Gradle will be downloaded automatically

Certain Features depend on the Gradle version

Release every 4-6 weeks

Future Plans

Task favorites

Run Configuration history in Task View

Components View

Plugins View

Run configuration in debug mode

Gradle Editor

Gradle Perspective for Buildmasters

...AndMore

Detailed Information

https://projects.eclipse.org/projects/tools.buildship

https://github.com/eclipse/buildship

https://gradle.org/blog/

http://www.vogella.com/tutorials/EclipseGradle/article.html

Do not miss the Eclipse Hackathon
18.09.2015 18:00

https://wiki.eclipse.org/Hackathon_Hamburg_2015_Q4

You can alsocontribute to Buildship

Thank you for your attention!

Simon Scholz

https://twitter.com/simonscholz