On Github melix / devoxxfr2016-jigsaw-gradle
Cédric Champeau (@CedricChampeau), Gradle Inc.
speaker { name 'Cédric Champeau' company 'Gradle Inc' oss 'Apache Groovy committer', successes 'Static type checker', 'Static compilation', 'Traits', 'Markup template engine', 'DSLs' failures Stream.of(bugs), twitter '@CedricChampeau', github 'melix', extraDescription '''Groovy in Action 2 co-author Misc OSS contribs (Gradle plugins, deck2pdf, jlangdetect, ...)''' }
Coupon: ctwdevoxxfr
Unified, fast, reproducible builds
Cross-platform
Language agnostic
Modularity for the Java platform
Reliable configuration (goodbye classpath)
Strong encapsulation (goodbye com.sun)
Enforce strict boundaries between modules
compile-time
run-time
module com.foo.bar { requires org.baz.qux; exports com.foo.bar.alpha; exports com.foo.bar.beta; }
Declares dependencies onto other modules
optionally transitive (public)
Declares a list of packages it exports
will be found on modulepath
Exports are package based
A non-exported package is not visible to consumers
2 modules cannot export the same packages
2 modules cannot have the same internal packages
Death to split packages.
Find a smooth migration path
Prepare today, migrate when ready
Idea : we’re building software, so let’s model software
Describe what rather than how
Leverage conventions
Work in progress
Doesn’t recompile dependents if:
method body changes
parameter names change
method order changes
private method added/removed
In short: if API stable, do nothing
Add targetPlatform 'java9'
Generate module descriptor automatically?
Profit!
Automatic toolchain selection
Support for modulepath
Support for jimage and jlink
Support for modulepath
Toolchain provisioning
Specs can be found on our GitHub repo
Slides and code : https://github.com/melix/devoxxfr2016-jigsaw-gradle
Gradle documentation : http://gradle.org/documentation/
State of the module system: http://openjdk.java.net/projects/jigsaw/spec/sotms
Follow me: @CedricChampeau