Releases: UnquietCode/Flapi
Version 2.0
This release is all about Java 8, and is more-or-less identical to the recent 1.0 release but with added support for the latest version of Java.
JDK 8 Parameter Names (#218)
Java 8 has built-in support for introspecting method parameter names when debug compilation is enabled. Flapi now makes use of these names where available when scanning an annotated descriptor class.
JDK 8 Support Classes (#219)
The 2.0 release changes out the Consumer
, Supplier
, and Function
classes used in Flapi interfaces for their built-in counterparts. This allows for greater compatibility and shaves a few runtime classes, at the expense of requiring a JDK 8 environment.
Version 1.0
We did it everyone. You can all go home now. This release is exciting and a long time coming.
Upgrade Guide (#225)
There is an Upgrade Guide available which can help early adopters migrate from a 0.x
development version to the new 1.0
release.
Remove Deprecated Things (#212)
Part of the upgrade to 1.0
is removing deprecated elements from the codebase. The upgrade guide above goes into more detail about what to expect.
Gradle Plugin Handles Full Descriptors (#222)
You can pass full descriptors to the gradle plugin. This is a cool feature enabled by the fact that the gradle plugin script is dynamic, whereas the maven pom file is just a lifeless XML document. So this small change means you can just build a descriptor in your build script instead of in a separate class, if you wish.
Group ID has Changed (#200)
The Maven repository group ID has been changed to conform to the Sonatype central repository rules. Previously the high level package name was unquietcode.tools.flapi
but now it is com.unquietcode.tools.flapi
. The upshot of making this change is that now Flapi and all of its dependencies are hosted in the Maven central repository.
Removed Deprecated flapi.descriptor.class
Property
The flapi.descriptor.class
property used in the build plugin configurations has been removed after being deprecated for several releases. You can use the comma-separated version named flapi.descriptor.classes
instead.
build-project
is Now flapi-build-project
(#193)
This change brings the build-project naming in line with the convention used by the other modules of prefixing with flapi-
followed by the module name.
Introduction of Generics in Builder Methods
Some method signatures now have generics where before they did not. This may cause warnings. Generally wherever a Class
parameter was accepted it is now Class<?>
. The same goes for Enum
, etc.
Start
Object is Now Untyped (again)
The Start
object is no longer typed as Start<Void>
but just Start
. The newer Head<?>
wrapper can be used instead, either with Void
or some other return type (and indeed Start
is now just an alias for Head<Void>
).
The full list of tasks and issues included in the release is available on the project's Issue Tracker.
Version 0.8
This version includes several key features, and is also intended to be the last feature release before 1.0.
Gradle Plugin
A new build plugin for Gradle is available, extending the build-time support for code generation offered by the Maven plugin. See the wiki page for more information.
Block Mixins
Using block mixins, it is possible to 'extend' one or more already existing blocks, reducing duplication, and covering a common use case. See the Block Mixins section in the documentation for usage notes.
Return of the Start
wrapper interface.
The Start<Void>
wrapper interface which was removed previously has been restored. Every descriptor now includes a simple, untyped interface for public consumption named Start
. This interface will extend whatever the internal Head
interface demands, creating a more shelf-stable API.
Features and Improvements
+ [#25]: new Gradle build plugin
+ [#44]: support for block mixins
+ [#216]: support for extended type hierarchies in annotated helpers
+ [#215]: allow customization of anonymous names via the NameGenerator API
+ [#214]: support for single wildcard generics in method signatures
+ [#213]: new `Start` wrapper type, replacing confusing uses of `Start<Void>`
The full list of tasks and issues included in the release is available on the project's Issue Tracker.
Version 0.7
The latest version includes some new features for modifying the output
of the generated source code. As well, better type handling is availble
for arrays and generics.
Features and Improvements
+ [#197]: pluggable class and method name generator
+ [#14]: support for disabling the printing of timestamps
+ [#194, #208]: support for generic parameters in annotated helpers
+ [#94]: support for multi-dimensional array types
+ [#47]: new `*Factory` interfaces and static factory method
+ [#33]: update to JDK7, and enable JDK8 builds
Disabling Timestamps
Timestamps in the generated source can be disabled by calling the new disableTimestamps()
method on the fluent builder.
Pluggable Name Generator
It is now possible to customize the generated names by using different implementations
of the new NameGenerator
interface. An instance can be provided by calling the new
useCustomNameGenerator(..)
method on the fluent builder. Several name generators are
provided out of the box:
DefaultNameGenerator
- makes no alterationsCondensedNameGenerator
- shortens method namesTinyNameGenerator
- shortens method and class namesHashedNameGenerator
- shortens method and class names using an MD5 hash
Generics in Annotated Helpers and Return Types
Improving upon the annotations introduced in version 0.6, you can now use generic
parameters and return types in your annotated helper classes. Additionally, all
methods can make use of generic return types.
Factory Methods
A new Factory
interface is now created for each descriptor, and contains a
single parameter-less method which can be used to start a new builder. The
Generator
classes correspondingly have a new method which binds parameters
to a new factory instance and returns it. This functionality is provided as
a shortcut to defining your own factory for downstream consumers.
BREAKING CHANGE - @BlockChain
annotation does not have a value
The value for the block chain marker annotation for use in annotated helpers
has been removed through better resolution of generics.
The full list of tasks and issues included in the release is available on the project's
Issue Tracker.
Version 0.6
Version 0.6
Flapi Version 0.6 includes a major update to support annotation based configuration of descriptors.
Annotations
You can now create descriptors from annotated helper classes and interfaces. See the wiki page on annotations for more information.
Bean Builders
Similar to annotations, you can provide a class with setXYZ(..)
and withXYZ(..)
methods, and these will be turned into a simple builder where each method can only be called at most one time, and where a bean will be returned at the end of the chain.
Resolved Issues
Issues are now handled through GitHub, and historical issues have been migrated from JIRA.
Features and Improvement
+ [FLAPI-188 / #11]: Support for creating descriptors from annotated helper interfaces.
+ [FLAPI-155 / #52]: Support referencing the current block.
+ [FLAPI-185 / #38]: Add @see to generated documentation pointing to actual Helper methods.
+ [FLAPI-147 / #36]: Provide Wrapper interface for all blocks.
Bugs
+ [FLAPI-165 / #35]: Get build project working in the reactor build.
Tasks
+ [FLAPI-190 / #34]: Update docs and wiki with annotations info.
+ [FLAPI-189 / #17]: Move issues from JIRA to GitHub
The full list of tasks and issues included in the release is available on the project's
Issue Tracker.
Version 0.5
Flapi Version 0.5 has been released!
Highlights
- grouped any() methods
- Flapi's builder is now generated on the fly!
- new Flapi User Group on Google
- It is now possible to declare return types by String instead of by Class.
- support for array types
BREAKING CHANGE - wrapper interface is now 'Start'
Previously, the wrapper interface was called $
. Flapi 0.5 has removed all uses of the '$' character from the generated classes to address Flapi-159. The wrapper has been changed to the *Builder.Start
interface generated for each block. While an inconvenience for those making use of the old interface, this flows from the tool's mandate to be compatible with the most number of code editors.
No More License
Previous versions of the tool have been released under the ASL 2.0 license. After some serious soul-searching, the license has been removed entirely.
The full release notes are available on the wiki.
Version 0.4
Flapi 0.4 includes several bugfixes, as well as a bunch of new features. This release is larger than the rest, and has been a long time coming.
Highlights
- No more *Impl classes!
- triggered methods
- generics support
- enum selectors
$
wrapper for top level interfaces. (Feature suggested by Jiri Jetmar. Thanks!)- builder package partitioning
- switched From CodeModel to JCodeModel
- new runtime module
- maven build plugin
New Documentation
A brand new documentation page is available at http://unquietcode.github.io/Flapi. Check it out!
BREAKING CHANGE - Switched From ObjectWrapper to AtomicReference
Previously, *Helper interfaces made use of a custom ObjectWrapper
class to provide new instances. This has been replaced with the JDK AtomicReference
class. While an annoying change, one of the goals of this project is to require as few additional classes to function as possible. Removing this was an easy win, and fortunately the change in your code is slight, typically just the import statement.
BREAKING CHANGE - New BlockChainBuilder API
When creating block chains via addBlockChain()
, the returned BlockChainBuilder
object's API has changed. Instead of creating a chain by prepending C to B to A, it is now possible to declare them as a flat list of A, B, C. This is facilitated by the addition of a end()
method, which is required to finish constructing the block chain. Again, change is hard but the project is still in the 0.x development stage, and sometimes these changes are required.
The full release notes are available on the wiki.