Introduce "-api-version" CLI option
The `@SinceKotlin("X.Y.Z")` annotation now hides a particular declaration from
resolution when the API version specified by the `-api-version` option is
_less_ than X.Y.Z. The comparison is performed as for versions in Maven:
MavenComparableVersion is in fact a copy of
org.apache.maven.artifact.versioning.ComparableVersion.
Also support "!API_VERSION" directive in diagnostic tests
#KT-14298 Fixed
This commit is contained in:
+5
@@ -30,6 +30,11 @@ public abstract class CommonCompilerArguments {
|
||||
@ValueDescription("<version>")
|
||||
public String languageVersion;
|
||||
|
||||
@GradleOption(DefaultValues.LanguageVersions.class)
|
||||
@Argument(value = "api-version", description = "Allow to use declarations only from the specified version of bundled libraries")
|
||||
@ValueDescription("<version>")
|
||||
public String apiVersion;
|
||||
|
||||
@GradleOption(DefaultValues.BooleanFalseDefault.class)
|
||||
@Argument(value = "nowarn", description = "Generate no warnings")
|
||||
public boolean suppressWarnings;
|
||||
|
||||
Reference in New Issue
Block a user