Skip to content
This repository has been archived by the owner on Nov 26, 2020. It is now read-only.

Ref #18 - Add incremental annotation processing #20

Merged
merged 1 commit into from
Jul 25, 2020
Merged

Ref #18 - Add incremental annotation processing #20

merged 1 commit into from
Jul 25, 2020

Conversation

mtraynham
Copy link
Contributor

@mtraynham mtraynham commented Jun 24, 2020

Related to #18

This adds incremental annotation processing for faster gradle builds.

By adding src/main/resources/META-INF/gradle/incremental.annotation.processors, it tells Gradle that the com.github.pozo.BuilderProcessor is an incremental processor.

A bump to MapStruct 1.4.0.Beta1 (mapstruct/mapstruct#1971) and AutoService 1.0-rc.7 (google/auto#615) is required.

@mtraynham
Copy link
Contributor Author

mtraynham commented Jul 22, 2020

@Pozo any chance you could take a look at this? I know it might be better if the mapstruct version was final and not a Beta version.

@Pozo
Copy link
Owner

Pozo commented Jul 22, 2020

@mtraynham Sure, so sorry for the late answer. I have a lot of thing going on, that's why I couldn't look over this repo changes nowadays. I'll manage everything soon, thank you very much for your time and your contribution. 🙇

@Pozo Pozo merged commit 6ecade6 into Pozo:master Jul 25, 2020
@mtraynham mtraynham deleted the ref_18_incremental_annotation_processing branch July 25, 2020 13:59
@Pozo
Copy link
Owner

Pozo commented Jul 25, 2020

I've tested it locally with the following environment


------------------------------------------------------------
Gradle 4.10
------------------------------------------------------------

Build time:   2018-08-27 18:35:06 UTC
Revision:     ee3751ed9f2034effc1f0072c2b2ee74b5dce67d

Kotlin DSL:   1.0-rc-3
Kotlin:       1.2.60
Groovy:       2.4.15
Ant:          Apache Ant(TM) version 1.9.11 compiled on March 23 2018
JVM:          1.8.0_252 (AdoptOpenJDK 25.252-b09)
OS:           Mac OS X 10.13.6 x86_64

With the command

./gradlew clean build --info

With the version 1.3.1.2 I'm getting the following output

[kapt] Incremental annotation processing requested, but support is disabled because the following processors are not incremental: com.github.pozo.BuilderProcessor (NON_INCREMENTAL), org.mapstruct.ap.MappingProcessor (NON_INCREMENTAL), com.google.auto.service.processor.AutoServiceProcessor (NON_INCREMENTAL).

With your change this message disappears. Thank you for your contribution @mtraynham

I'll prepare a release the version number will be 1.4.0.0

@mtraynham
Copy link
Contributor Author

mtraynham commented Jul 25, 2020

@Pozo awesome! One thing I wanted to point out, the Mapstruct version I bumped is the beta release 1.4.0.Beta1, https://github.com/mapstruct/mapstruct/releases/tag/1.4.0.Beta1. 1.4.0.Beta3 is also out now and I've verified it also works locally, https://github.com/mapstruct/mapstruct/releases/tag/1.4.0.Beta3. You can circumvent this in downstream projects by forcing the mapstruct version to a later or earlier one.

Not sure if you want to do a full release with a beta dependency, or just have your own beta release. Either way, I can finally start using incremental processing 😄, so thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants