-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[KAPT] Suppress resolve error in annotation procssing
#KT-33223
- Loading branch information
Andrey Zinovyev
authored
Feb 10, 2021
1 parent
d64f7dd
commit 48ec227
Showing
7 changed files
with
75 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
...3/kapt3-cli/test/org/jetbrains/kotlin/kapt/cli/test/KaptToolIntegrationTestGenerated.java
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
28 changes: 28 additions & 0 deletions
28
plugins/kapt3/kapt3-cli/testData/integration/kotlinFileGenerationCorrectErrorTypes/Test.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package test | ||
|
||
import apt.Anno | ||
import generated.Test as TestGenerated | ||
import generated.Property | ||
|
||
@Anno | ||
class Test { | ||
|
||
@field:Anno | ||
val property: String = "" | ||
|
||
@Anno | ||
fun function() { | ||
|
||
} | ||
|
||
} | ||
|
||
interface Usage { | ||
fun test(): TestGenerated | ||
fun test1(): generated.Function | ||
fun test2(): Property | ||
} | ||
|
||
fun main() { | ||
println("Generated class: " + TestGenerated::class.java.name) | ||
} |
37 changes: 37 additions & 0 deletions
37
plugins/kapt3/kapt3-cli/testData/integration/kotlinFileGenerationCorrectErrorTypes/build.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# copy | ||
../kotlinFileGeneration/ap | ||
ap | ||
|
||
# mkdir | ||
output/ap | ||
output/stubs | ||
output/classes | ||
output/sources | ||
output/kotlin-sources | ||
|
||
# kotlinc | ||
-cp %KOTLIN_STDLIB% | ||
-d output/ap | ||
ap/Processor.kt | ||
|
||
# copy | ||
../kotlinFileGeneration/ap/META-INF/services/javax.annotation.processing.Processor | ||
output/ap/META-INF/services/javax.annotation.processing.Processor | ||
|
||
# kapt | ||
-Kapt-stubs=output/stubs | ||
-Kapt-classes=output/classes | ||
-Kapt-sources=output/sources | ||
-Kapt-classpath=output/ap | ||
-Kapt-option:kapt.kotlin.generated=output/kotlin-sources | ||
-Kapt-correct-error-types=true | ||
-d output/classes | ||
-cp output/ap:%KOTLIN_STDLIB% | ||
Test.kt | ||
|
||
# java | ||
-cp output/classes:output/ap:%KOTLIN_STDLIB% | ||
test.TestKt | ||
|
||
# after | ||
Generated class: generated.Test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters