Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
bbe681a9
authored
Aug 08, 2019
by
tonihei
Committed by
Oliver Woodman
Aug 09, 2019
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Make Kotlin JVM annotations available and use in ExoPlayer.
NoExternal PiperOrigin-RevId: 262316962
parent
313bd109
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
8 deletions
constants.gradle
library/core/build.gradle
library/core/proguard-rules.txt
library/core/src/main/java/com/google/android/exoplayer2/util/NonNullApi.java
constants.gradle
View file @
bbe681a9
...
...
@@ -25,6 +25,7 @@ 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
=
':'
...
...
library/core/build.gradle
View file @
bbe681a9
...
...
@@ -62,8 +62,7 @@ dependencies {
compileOnly
'com.google.code.findbugs:jsr305:'
+
jsr305Version
compileOnly
'org.checkerframework:checker-qual:'
+
checkerframeworkVersion
compileOnly
'org.checkerframework:checker-compat-qual:'
+
checkerframeworkVersion
// Uncomment to enable Kotlin non-null strict mode. See [internal: b/138703808].
// compileOnly "org.jetbrains.kotlin:kotlin-annotations-jvm:1.1.60"
compileOnly
'org.jetbrains.kotlin:kotlin-annotations-jvm:'
+
kotlinAnnotationsVersion
androidTestImplementation
'androidx.test:runner:'
+
androidXTestVersion
androidTestImplementation
'androidx.test.ext:junit:'
+
androidXTestVersion
androidTestImplementation
'com.google.truth:truth:'
+
truthVersion
...
...
library/core/proguard-rules.txt
View file @
bbe681a9
...
...
@@ -58,5 +58,6 @@
<init>(com.google.android.exoplayer2.upstream.DataSource$Factory);
}
# Don't warn about checkerframework
# Don't warn about checkerframework
and Kotlin annotations
-dontwarn org.checkerframework.**
-dontwarn kotlin.annotations.jvm.**
library/core/src/main/java/com/google/android/exoplayer2/util/NonNullApi.java
View file @
bbe681a9
...
...
@@ -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,8 +29,6 @@ import javax.annotation.meta.TypeQualifierDefault;
*/
@Nonnull
@TypeQualifierDefault
(
ElementType
.
TYPE_USE
)
// TODO(internal: b/138703808): Uncomment to ensure Kotlin issues compiler errors when non-null
// types are used incorrectly.
// @UnderMigration(status = MigrationStatus.STRICT)
@UnderMigration
(
status
=
MigrationStatus
.
STRICT
)
@Retention
(
RetentionPolicy
.
CLASS
)
public
@interface
NonNullApi
{}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment