Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
62aa8ce1
Commit
62aa8ce1
authored
Jun 30, 2020
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support incremental annotation processing with Gradle
Closes gh-22150
parent
27c458ca
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
5 deletions
+19
-5
incremental.annotation.processors
...sources/META-INF/gradle/incremental.annotation.processors
+1
-0
Trees.java
.../boot/configurationprocessor/fieldvalues/javac/Trees.java
+17
-5
incremental.annotation.processors
...sources/META-INF/gradle/incremental.annotation.processors
+1
-0
No files found.
spring-boot-project/spring-boot-tools/spring-boot-autoconfigure-processor/src/main/resources/META-INF/gradle/incremental.annotation.processors
0 → 100644
View file @
62aa8ce1
org.springframework.boot.autoconfigureprocessor.AutoConfigureAnnotationProcessor,aggregating
\ No newline at end of file
spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/fieldvalues/javac/Trees.java
View file @
62aa8ce1
/*
/*
* Copyright 2012-20
19
the original author or authors.
* Copyright 2012-20
20
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
package
org
.
springframework
.
boot
.
configurationprocessor
.
fieldvalues
.
javac
;
package
org
.
springframework
.
boot
.
configurationprocessor
.
fieldvalues
.
javac
;
import
java.lang.reflect.Field
;
import
java.lang.reflect.Method
;
import
java.lang.reflect.Method
;
import
javax.annotation.processing.ProcessingEnvironment
;
import
javax.annotation.processing.ProcessingEnvironment
;
...
@@ -38,10 +39,21 @@ final class Trees extends ReflectionWrapper {
...
@@ -38,10 +39,21 @@ final class Trees extends ReflectionWrapper {
}
}
static
Trees
instance
(
ProcessingEnvironment
env
)
throws
Exception
{
static
Trees
instance
(
ProcessingEnvironment
env
)
throws
Exception
{
ClassLoader
classLoader
=
env
.
getClass
().
getClassLoader
();
try
{
Class
<?>
type
=
findClass
(
classLoader
,
"com.sun.source.util.Trees"
);
ClassLoader
classLoader
=
env
.
getClass
().
getClassLoader
();
Method
method
=
findMethod
(
type
,
"instance"
,
ProcessingEnvironment
.
class
);
Class
<?>
type
=
findClass
(
classLoader
,
"com.sun.source.util.Trees"
);
return
new
Trees
(
method
.
invoke
(
null
,
env
));
Method
method
=
findMethod
(
type
,
"instance"
,
ProcessingEnvironment
.
class
);
return
new
Trees
(
method
.
invoke
(
null
,
env
));
}
catch
(
Exception
ex
)
{
return
instance
(
unwrap
(
env
));
}
}
private
static
ProcessingEnvironment
unwrap
(
ProcessingEnvironment
wrapper
)
throws
Exception
{
Field
delegateField
=
wrapper
.
getClass
().
getDeclaredField
(
"delegate"
);
delegateField
.
setAccessible
(
true
);
return
(
ProcessingEnvironment
)
delegateField
.
get
(
wrapper
);
}
}
}
}
spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/main/resources/META-INF/gradle/incremental.annotation.processors
0 → 100644
View file @
62aa8ce1
org.springframework.boot.configurationprocessor.ConfigurationMetadataAnnotationProcessor,aggregating
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment