cross posting from general So I'm working on a pr...
# kapt
l
cross posting from general So I'm working on a project with dagger and kotlin, and including the kapt execution is giving me a whole bunch of xlint errors, it seems to process the annotations correctly, it's just crowding the compile logs quite a bit. here is the compiler config
Copy code
<plugin>
                <groupId>org.jetbrains.kotlin</groupId>
                <artifactId>kotlin-maven-plugin</artifactId>
                <version>${kotlin.version}</version>
                <executions>
                    <execution>
                        <id>kapt</id>
                        <goals>
                            <goal>kapt</goal>
                        </goals>
                        <configuration>
                            <sourceDirs>
                                <sourceDir>${project.basedir}/src/main</sourceDir>
                            </sourceDirs>
                            <annotationProcessorPaths>
                                <annotationProcessorPath>
                                    <groupId>com.google.dagger</groupId>
                                    <artifactId>dagger-compiler</artifactId>
                                    <version>${dagger.version}</version>
                                </annotationProcessorPath>
                            </annotationProcessorPaths>
                        </configuration>
                    </execution>
                    <execution>
                        <id>compile</id>
                        <phase>process-sources</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>test-compile</id>
                        <phase>test-compile</phase>
                        <goals>
                            <goal>test-compile</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <jvmTarget>1.8</jvmTarget>
                    <compilerPlugins>
                        <!-- Or "jpa" for JPA support -->
                        <plugin>no-arg</plugin>
                    </compilerPlugins>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.jetbrains.kotlin</groupId>
                        <artifactId>kotlin-maven-noarg</artifactId>
                        <version>${kotlin.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
these are the errors, there are hundred of them
Copy code
[Xlint:cantFindType]
[URLClassLoader@4914000c] error can't determine annotations of missing type org.springframework.cache.annotation.Cacheable
when weaving type dagger.internal.codegen.BindingGraphValidator
when weaving classes
when weaving
 [Xlint:cantFindType]
[URLClassLoader@4914000c] error can't determine annotations of missing type org.springframework.cache.annotation.CacheEvict
when weaving type dagger.spi.DiagnosticReporter
when weaving classes
when weaving
It's not breaking, just very noisy. I tried looking into it a bit, but couldn't find much. Commenting out kapt gets rid of the XLints