Add @UnderMigration annotation and options for report level

This commit is contained in:
Leonid Stashevsky
2017-09-28 17:15:08 +03:00
parent a524bde9b7
commit 95d32d8d1e
75 changed files with 1436 additions and 139 deletions
@@ -0,0 +1,36 @@
description = 'Kotlin annotations for JVM'
apply plugin: 'kotlin'
configureJvm6Project(project)
configurePublishing(project)
sourceSets {
main {
kotlin {
srcDir 'src'
}
}
}
artifacts {
archives sourcesJar
archives javadocJar
}
dist {
from (jar, sourcesJar)
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile) {
kotlinOptions.jdkHome = JDK_16
kotlinOptions.jvmTarget = 1.6
}
compileKotlin {
kotlinOptions.freeCompilerArgs = [
"-Xallow-kotlin-package",
"-module-name", project.name
]
}
@@ -0,0 +1,34 @@
/*
* Copyright 2010-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package kotlin.annotations.jvm
/**
* Contains the list of possible migration statuses.
*/
public enum class MigrationStatus {
IGNORE,
WARN,
@Deprecated("experimental feature")
STRICT
}
/**
* This meta-annotation is intended for user nullability annotations with JSR-305 type qualifiers. Behaviour of meta-annotated
* nullability annotations can be controlled via compilation flag.
*/
@Target(AnnotationTarget.ANNOTATION_CLASS)
public annotation class UnderMigration(val status: MigrationStatus)