aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEgor Andreevici <egor@squareup.com>2020-01-09 11:32:42 -0500
committerEgor Andreevici <egor@squareup.com>2020-01-09 11:32:42 -0500
commit0d25ea100a4387c28b5ef12e44fbffc0b22b5343 (patch)
tree76da77a966feacc469b1336b4acef0b74f44f50f
parent1ef324c43fe5371e4d0c63dfe4d52c14c0c01631 (diff)
downloadjavapoet-0d25ea100a4387c28b5ef12e44fbffc0b22b5343.tar.gz
Changelog for 1.12.0
-rw-r--r--CHANGELOG.md24
-rw-r--r--README.md4
2 files changed, 26 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3933dd0..08ed40e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,30 @@
Change Log
==========
+JavaPoet 1.12.0 *(2020-01-09)*
+-----------------------------
+
+ * New: Add `JavaFile.writeToPath()` and `JavaFile.writeToFile()` methods that return paths to the
+ generated file as `Path` and `File` respectively.
+ * New: Add `TypeSpec.alwaysQualify()` API to avoid clashes involving nested type names.
+ * New: Add overloads accepting `CodeBlock`s to `MethodSpec`'s control flow methods.
+ * New: Make list fields of all `Builder` types mutable.
+ * New: Add `CodeBlock.clear()`.
+ * New: Allow passing a custom `Charset` to `JavaFile.writeTo()`.
+ * New: Improved performance of `ClassName.simpleNames()` by memoizing results.
+ * New: Significant performance improvements for `CodeWriter.resolve()` as all nested simple names
+ of a `TypeSpec` get pre-computed.
+ * New: Add `TypeName.Builder.setName()` to allow overriding names passed in the constructor.
+ * New: Add `TypeName.canonicalName()`.
+ * Fix: Use `\\R` instead of `\n` as line separator in `CodeWriter.emitAndIndent()`.
+ * Fix: Copy originating elements in `TypeSpec.toBuilder()`.
+ * Fix: Ensure trailing newlines in Javadocs and method bodies.
+ * Fix: Copy annotations when creating a `ParameterSpec` from a `VariableElement`.
+ * Fix: Properly handle classes located in empty packages in `ClassName`.
+ * Fix: Disallow `final` modifier on a `ParameterSpec`.
+ * Fix: Use fully-qualified names for type names that are masked by type variable names.
+
+
JavaPoet 1.11.1 *(2018-05-16)*
-----------------------------
diff --git a/README.md b/README.md
index 8574eae..0b627aa 100644
--- a/README.md
+++ b/README.md
@@ -892,12 +892,12 @@ Download [the latest .jar][dl] or depend via Maven:
<dependency>
<groupId>com.squareup</groupId>
<artifactId>javapoet</artifactId>
- <version>1.11.1</version>
+ <version>1.12.0</version>
</dependency>
```
or Gradle:
```groovy
-compile 'com.squareup:javapoet:1.11.1'
+compile 'com.squareup:javapoet:1.12.0'
```
Snapshots of the development version are available in [Sonatype's `snapshots` repository][snap].