aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-04-10Merge "Upgrade javapoet to javapoet-1.12.1"Haibo Huang
2020-04-09Upgrade javapoet to javapoet-1.12.1Haibo Huang
Exempt-From-Owner-Approval: upgrade Change-Id: I110240a89821c144cba4f536cdbebee1f53184eb
2020-03-25Remove redundant NOTICE symbolic link.Bob Badour
Now that http://aosp/1235427 and http://aosp/1238719 are in, NOTICE symbolic links are no longer needed. Bug: 67772237 Bug: 68860345 Test: manually built and diffed before and after system image notices Change-Id: I4a72960d8145d5e951fe3f5f1d55fff8d75a9227
2020-01-20[maven-release-plugin] prepare release javapoet-1.12.1upstream/javapoet-1.12.1Egor Andreevici
2020-01-14Merge pull request #756 from square/egorand/200114/overriding-noteEgor Andreevich
Add a comment about dropping parameter annotations in MethodSpec.overriding
2020-01-14Add a comment about dropping parameter annotations in MethodSpec.overridingEgor Andreevici
2020-01-13Merge pull request #755 from ↵Egor Andreevich
square/egorand/200113/method-override-remove-param-annotations Remove parameter annotations in MethodSpec.overriding
2020-01-13Remove parameter annotations in MethodSpec.overridingEgor Andreevici
- Change to not copy parameter annotations was first introduced in 9505ad0e027a1f125b5352ac722ea141831fbf1c. - Change to properly copy mirror annotations in ParameterSpec.get was introduced in a0eadbbf0e7b70f0fbbc66043536e4328c3808fd, breaking the behavior of MethodSpec.overriding. - This change preserves the correct behavior of ParameterSpec.get while also removing annotations in MethodSpec.overriding.
2020-01-09Fix changelog for 1.12.0Egor Andreevici
"Disallow final modifier on ParameterSpec" -> "Only allow final modifier on ParameterSpec"
2020-01-09Changelog for 1.12.0Egor Andreevici
2020-01-09[maven-release-plugin] prepare for next development iterationEgor Andreevici
2020-01-09[maven-release-plugin] prepare release javapoet-1.12.0upstream/javapoet-1.12.0Egor Andreevici
2020-01-06Merge pull request #753 from square/egorand/200106/write-to-path-testEgor Andreevich
Test for JavaFile.writeToPath
2020-01-06Test for JavaFile.writeToPathEgor Andreevici
2020-01-06Merge branch 'galderz-t_javafile_writeto_691'Egor Andreevici
2020-01-06Add writeTo methods returning Path/File written to #691Galder Zamarreño
2020-01-06Add alwaysQualify() API to avoid collisions with known colliding types (#734)Zac Sweers
* Add alwaysQualify() API to avoid collisions with known colliding types Implementation based on https://github.com/square/javapoet/issues/77#issuecomment-507387399 Resolves #77 CC @eamonnmcmanus * Add utility avoidClashesWithNestedClasses methods for Class/TypeElement * Fix style issues * Move scope to TypeSpecs * Check superclasses and superinterfaces * Add superclass and superinterface overloads * Style fixes * Add qualified names to toBuilder test * Add Map.Entry test + doc regression tests
2020-01-04added convenience overloads for code blocks in control flow (#752)Florian Enner
* added convenience overloads for code blocks in control flow * added javadoc and test * added test for do while block * fixed continuation space count
2020-01-02Hardcoded line separator bug (#684)Vlad Topala
* Use regex for new line character to cover both dos and unix endings when calling emitAndIndent - fixes #552 * Update CodeWriter to use linebreak matcher instead of \r\n
2020-01-01Copy originating elements in toBuilder() as well (#750)Zac Sweers
* Copy originating elements in toBuilder() as well Fixes #749 * Add test
2020-01-01Ensure trailing newlines in javadocs and method bodies (#732)Zac Sweers
* Add RecordingAppendable in LineWrapper for tracking last emitted char * Check lastChar in javadoc emission to emit newline if necessary Resolves #731 * Move trailing newline check to emit() overload for reuse Allows using from anywhere emitting a CodeBlock * Ensure trailing newlines in method bodies Resolves #722 * Add dedicated trailing newline in javadoc test * Fix modifier ordering * Fix rebase conflict Co-authored-by: Egor Andreevich <andreevich.egor@gmail.com>
2020-01-01Mutable builder list fields (#650)Zac Sweers
* Make modifiers and annotations in FieldSpec public * Make AnnotationSpec members public * Make JavaFile staticImports public * Make modifiers and annotations in parameterspec public * Make methodspec modifiers, params, typevars, and annotations public * Make typespec builder lists public * Move TypeSpec.Builder validations to build() where appropriate * Move AnnotationSpec.Builder validations to build() where appropriate * Fix line length style
2019-12-22Merge pull request #748 from square/egorand/191222/travis-cleanupEgor Andreevich
Remove non-LTS JDK versions from Travis config
2019-12-22Merge pull request #747 from square/egorand/191222/fix-masterEgor Andreevich
Fix broken merge
2019-12-22Remove non-LTS JDK versions from Travis configEgor Andreevici
2019-12-22Fix broken mergeEgor Andreevici
2019-12-21Add checks to ParameterSpec with VariableElement + copy over annotations (#681)Shaishav Gandhi
* Add checks to ParameterSpec with VariableElement + copy over annotations Signed-off-by: shaishavgandhi05 <shaishgandhi@gmail.com> * Add test for variable element Signed-off-by: shaishavgandhi05 <shaishgandhi@gmail.com> * Extract util methods into TestUtil * Fix formatting * Make findFirst more generic Co-authored-by: Egor Andreevich <andreevich.egor@gmail.com>
2019-08-11Merge pull request #735 from ZacSweers/z/codeblockClearJake Wharton
Add CodeBlock.Builder#clear() method
2019-08-10Add CodeBlock.Builder#clear() methodZac Sweers
Analogous to the change added in KotlinPoet
2019-08-10Merge pull request #733 from ZacSweers/z/openjdk8Egor Andreevich
Switch to openjdk8 for CI
2019-08-07Switch to openjdk8 for CIZac Sweers
2019-06-04easier_way_provide_encoding (#712)Rene Fischer
* provide an easier way for an other encoding than UTF-8 * formatting * no final on argument and fix for javadoc * checkstyle line length checkstyle line length
2019-05-17Fix version in METADATA am: 74af6f11fc am: 276cad6717android-r-preview-4android-r-preview-3android-r-preview-2android-r-preview-1android-mainline-10.0.0_r8android-mainline-10.0.0_r6android10-mainline-resolv-releaseandroid10-mainline-networking-releaseHaibo Huang
am: d177b55a23 Change-Id: I496742695f41183ac435e9d8d474c9eb099bb764
2019-05-17Fix version in METADATA am: 74af6f11fcndk-sysroot-r21Haibo Huang
am: 276cad6717 Change-Id: I647a51a6d7e5c912828457129178bc0cfece1006
2019-05-16Fix version in METADATAHaibo Huang
am: 74af6f11fc Change-Id: I83ff9f0bc6a6682b92c8b828c8f1b6d9a4432e77
2019-05-17Fix version in METADATAHaibo Huang
So that tools/external_updater can check updates for this library. Exempt-From-Owner-Approval: No code change Test: NA Change-Id: Iee1179c7e5ed625c798965360a980bbd02d2625d
2019-05-03Merge pull request #724 from ronshapiro/codeblock_simpleJake Wharton
Nit: Simplify a CodeBlock
2019-05-03Nit: Simplify a CodeBlockRon Shapiro
2019-05-01Fix an issue where ClassName could not handle classes in the default (empty) ↵Almog Gavra
package
2019-04-16Merge pull request #720 from ronshapiro/ClassName_simpleNamesEgor Andreevich
Memoize ClassName.simpleNames()
2019-04-16Memoize ClassName.simpleNames()Ron Shapiro
In addition to being used repeatedly in CodeWriter.lookupName(), the current implementation is N^2 (albeit for a usually low N) since it recursively calls itself on the enclosing class name. This should get rid of some of the garbage created in code writing.
2019-03-25Merge pull request #719 from square/jakew/unused/2019-03-25Jake Wharton
Remove argument whose value isn't needed
2019-03-25Remove argument whose value isn't neededJake Wharton
The single-argument overload will use the end of the String as the end index automatically.
2019-03-16Merge pull request #714 from square/egorand/190313/checkstyle-8.18Jesse Wilson
Checkstyle 8.18
2019-03-14Checkstyle 8.18Egor Andreevici
2019-02-07Merge pull request #705 from ronshapiro/CodeWriter_resolveEgor Andreevich
Remove n^2 algorithm in CodeWriter.resolve() by precomputing all of the nested simple names of a TypeSpec
2019-02-06Merge pull request #703 from galderz/t_nextcontrolflow_693Egor Andreevich
Add documentation on nextControlFlow to README #693
2019-02-06Add documentation on nextControlFlow to README #693Galder Zamarreño
2019-02-05Remove n^2 algorithm in CodeWriter.resolve() by precomputing all of the ↵Ron Shapiro
nested simple names of a TypeSpec For one large (100K lines) file, this saved 3.5s/build
2019-02-04Allow setting method name on MethodSpec.Builder (#702)Shaishav Gandhi
* Allow setting method name on MethodSpec.Builder * Fix indentation