Commit 9f55045e by olly Committed by Oliver Woodman

Rollback of https://github.com/google/ExoPlayer/commit/bbe681a904d58fe1f84f6c7c6e3390d932c86249

*** Original commit ***

Make Kotlin JVM annotations available and use in ExoPlayer.

NoExternal

***

PiperOrigin-RevId: 262323737
parent bbe681a9
......@@ -25,7 +25,6 @@ project.ext {
autoServiceVersion = '1.0-rc4'
checkerframeworkVersion = '2.5.0'
jsr305Version = '3.0.2'
kotlinAnnotationsVersion = '1.3.31'
androidXTestVersion = '1.1.0'
truthVersion = '0.44'
modulePrefix = ':'
......
......@@ -62,7 +62,8 @@ dependencies {
compileOnly 'com.google.code.findbugs:jsr305:' + jsr305Version
compileOnly 'org.checkerframework:checker-qual:' + checkerframeworkVersion
compileOnly 'org.checkerframework:checker-compat-qual:' + checkerframeworkVersion
compileOnly 'org.jetbrains.kotlin:kotlin-annotations-jvm:' + kotlinAnnotationsVersion
// Uncomment to enable Kotlin non-null strict mode. See [internal: b/138703808].
// compileOnly "org.jetbrains.kotlin:kotlin-annotations-jvm:1.1.60"
androidTestImplementation 'androidx.test:runner:' + androidXTestVersion
androidTestImplementation 'androidx.test.ext:junit:' + androidXTestVersion
androidTestImplementation 'com.google.truth:truth:' + truthVersion
......
......@@ -58,6 +58,5 @@
<init>(com.google.android.exoplayer2.upstream.DataSource$Factory);
}
# Don't warn about checkerframework and Kotlin annotations
# Don't warn about checkerframework
-dontwarn org.checkerframework.**
-dontwarn kotlin.annotations.jvm.**
......@@ -20,8 +20,8 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import javax.annotation.Nonnull;
import javax.annotation.meta.TypeQualifierDefault;
import kotlin.annotations.jvm.MigrationStatus;
import kotlin.annotations.jvm.UnderMigration;
// import kotlin.annotations.jvm.MigrationStatus;
// import kotlin.annotations.jvm.UnderMigration;
/**
* Annotation to declare all type usages in the annotated instance as {@link Nonnull}, unless
......@@ -29,6 +29,8 @@ import kotlin.annotations.jvm.UnderMigration;
*/
@Nonnull
@TypeQualifierDefault(ElementType.TYPE_USE)
@UnderMigration(status = MigrationStatus.STRICT)
// TODO(internal: b/138703808): Uncomment to ensure Kotlin issues compiler errors when non-null
// types are used incorrectly.
// @UnderMigration(status = MigrationStatus.STRICT)
@Retention(RetentionPolicy.CLASS)
public @interface NonNullApi {}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment