Skip to content

Commit

Permalink
chore: comment-out type "this" type annotations for jre6 and jre7
Browse files Browse the repository at this point in the history
  • Loading branch information
vlsi committed Aug 21, 2020
1 parent bc03d27 commit 5e4bbc8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pgjdbc/build.gradle.kts
Expand Up @@ -256,6 +256,7 @@ val hiddenAnnotation = Regex(
"GuardedBy|UnderInitialization|" +
"DefaultQualifier)(?:\\([^)]*\\))?")
val hiddenImports = Regex("import org.checkerframework")
val thisReferences = Regex("\\w+\\s+this\\s+,?")

val removeTypeAnnotations by tasks.registering(Sync::class) {
destinationDir = withoutAnnotations
Expand All @@ -264,6 +265,7 @@ val removeTypeAnnotations by tasks.registering(Sync::class) {
filter { x: String ->
x.replace(hiddenAnnotation, "/* $0 */")
.replace(hiddenImports, "// $0")
.replace(thisReferences, "/* $0 */")
}
include("src/**")
}
Expand Down

0 comments on commit 5e4bbc8

Please sign in to comment.