45 Commits

Author SHA1 Message Date
olly
2d0b10a73a Use constant to define androidx annotation version
PiperOrigin-RevId: 266801762
2019-09-05 10:45:08 +01:00
tonihei
9dd04baef6 Rollback of 9f55045eeb
*** Original commit ***

Rollback of bbe681a904

*** Original commit ***

PiperOrigin-RevId: 263736897
2019-08-23 16:59:18 +01:00
tonihei
389eca6e07 Merge robolectric_testutils into testutils.
We no longer need two modules as AndroidX-Test takes care of the system
abstraction and we no longer have Robolectric Handler/Looper workarounds.

PiperOrigin-RevId: 262363201
2019-08-09 18:36:32 +01:00
olly
9f55045eeb Rollback of bbe681a904
*** Original commit ***

Make Kotlin JVM annotations available and use in ExoPlayer.

NoExternal

***

PiperOrigin-RevId: 262323737
2019-08-09 18:35:53 +01:00
tonihei
bbe681a904 Make Kotlin JVM annotations available and use in ExoPlayer.
NoExternal

PiperOrigin-RevId: 262316962
2019-08-09 18:35:34 +01:00
olly
fb0481c520 Bump annotations dependency + update release notes
PiperOrigin-RevId: 261353271
2019-08-02 19:04:56 +01:00
tonihei
6f2e24915d Add @NonNullApi and annotate two packages with it.
This new annotation declares everything as non-null by default and can be
used as a package annotation in package-info.java.

In this change the core lib offline package and the mediasession extension is
annotated that way as initial example usage.

PiperOrigin-RevId: 260894548
2019-08-01 20:35:06 +01:00
olly
118218cc73 Remove cronet extension nullness blacklist
PiperOrigin-RevId: 249432337
2019-05-23 13:29:35 +01:00
olly
f74d2294be Remove media-session extension nullness blacklist
PiperOrigin-RevId: 249431620
2019-05-23 13:29:19 +01:00
tonihei
4507c6870d Move away from AndroidX bundled Truth to be closer to head revision.
The AndroidX bundled version (0.42) lags behind the most up-to-date public
release (0.44) making it more difficult to stay close to the actual head
revision which is used internally.

PiperOrigin-RevId: 244848568
2019-04-26 18:29:49 +01:00
eguven
f9f009645d Add missing DownloadService build*Intent and startWith* methods
PiperOrigin-RevId: 244196081
2019-04-18 23:22:35 +01:00
olly
2959b5f9c2 Roll forward of 238625384.
PiperOrigin-RevId: 238666870
2019-03-20 23:26:49 +00:00
olly
a291d6221f Automated g4 rollback of changelist 238625384.
*** Original change description ***

Allow exoplayer/v2 mockito2

***

PiperOrigin-RevId: 238626401
2019-03-20 23:26:49 +00:00
olly
07702cecdd Allow exoplayer/v2/ mockito2
PiperOrigin-RevId: 238625384
2019-03-20 23:26:10 +00:00
tonihei
8e80acd18f Use androidx.test and extensions.
This replaces the deprecated usages of RobolectricTestRunner and
RuntimeEnvironent and fully migrates the tests to androidx.

PiperOrigin-RevId: 238011667
2019-03-15 04:53:12 +00:00
olly
0622afe170 Migrate to androidx
Issue: #5489
PiperOrigin-RevId: 234507428

Add missing annotation dependency

Issue: #5489
PiperOrigin-RevId: 234566177
2019-02-19 13:22:54 +00:00
tonihei
edabbd52d0 Update Robolectric and Truth.
PiperOrigin-RevId: 233612344
2019-02-18 15:59:32 +00:00
olly
8401097ead Upgrade gradle plugin and friends
PiperOrigin-RevId: 233390513
2019-02-18 15:57:55 +00:00
andrewlewis
5c2dd9ca42 Move all tests to JUnit 4
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209412403
2018-08-24 15:25:56 +01:00
andrewlewis
930833627f Use androidx test runner in gradle configuration
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=203141421
2018-07-06 14:29:14 +01:00
brettchabot
1ee36101f6 Replace references to android.support.test with androidx.test.
The Android Test Support Library is being renamed to AndroidX Test, with its root java namespace changing from android.support.test to androidx.test.
And code location changing from tp/android/android_test_support to tp/android/androidx_test.

More information: []

TAP global presubmit: []

BUG:
79205333

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=202796842
2018-07-03 11:50:39 +01:00
hoangtc
eb8c686243 Fix a bug with MetadataRetriever getMedatadata query.
When getMedatadata from an ExtractorMediaPeriod, due to the MediaPeriod refreshing its Timeline twice, the MetadataRetriever may wrongly reset periodIndex of the current trackGroup to C.TIME_UNSET, which makes it unable to handle subsequent metadata queries.

This CL changes the MetadataRetriever to keep track of periodUid of the current trackGroup instead of period index. PeriodUid is not changed on timeline refreshing, so is not prone the existing problem.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=201969350
2018-06-25 22:37:15 +01:00
tonihei
841ce9df71 Fix track selection nullability issues.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=199266768
2018-06-05 12:45:55 +01:00
tonihei
27f009d239 Enable Java 8 support.
This enables compiler support for Java 8 features.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=198709705
2018-06-05 12:29:14 +01:00
hoangtc
f3e650b8c7 Update InstrumentationTestCase to use JUnit4.
InstrumentationTestCase has been deprecated, and it does not offer some useful
features, such as targeting SDK version level for tests, or skipping tests if
necessary.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=197141082
2018-05-22 09:08:43 +01:00
tonihei
74df3766f9 Include checkerframework annotatons with compileOnly and remove lint exclusion
The lint error suppression only works locally and not for external developers
who still see the lint error and need to suppress it themselves.

This changes 'implementation' to 'compileOnly' in gradle to prevent the
dependency from being exported. Also removes the local lint suppression.

Issue:#4234

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=196251407
2018-05-12 18:56:12 +01:00
olly
590edf5288 Fix checker-framework build issues
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195689456
2018-05-07 19:17:07 +01:00
hoangtc
b8206a70e6 Support handling metadata queries for MetadataRetriever.
- Support handling metadata queries (a.k.a get TrackGroupArray, which contains
Format and associated Metadata) from MetadataRetriever.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195401204
2018-05-07 07:06:25 +01:00
tonihei
7799e8fd5e Add dependency on nullness annotations and add missing annotations for DASH.
This includes only the (hopefully) non-debatable changes for the DASH module
and all needed changes for call into the core library.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=195097791
2018-05-07 06:48:44 +01:00
hoangtc
fcb796a80c Migrate ExoPlayer Gradle build files.
- Change 'compile' configuration (deprecared) to using 'implementation'
and 'api' configurations instead.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187311778
2018-03-02 09:20:02 +00:00
tonihei
b47fb2826b Move extension tests to Robolectric.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187021822
2018-02-27 11:03:50 +00:00
olly
1f6d161d4d Fix proguard configurations
1. When we try and load something via reflection and find the
   class, always throw rather than failing silently if we
   subsequently fail to instantiate an instance. This is
   indicative of a broken proguard setup, and failing silently
   makes it hard to spot.
2. Add library/core proguard configuration to ensure extension
   renderer constructors that we access via reflection are kept.
3. Add demos/main proguard configuration to ensure ImaAdsLoader
   constructor that we access via reflection is kept.
4. Added IMA proguard file to hopefully fix #3723, although I
   wasn't actually able to reproduce the issue.

Issue: #3723

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=183648187
2018-02-01 14:52:16 +00:00
tonihei
e991a8015b Use Truth instead of framework asserts in all tests.
This achieves two things:
1. All our tests use the same type of assertions.
2. The tests currently run as instrumentation test can be moved to
   Robolectric without changing the assertions.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=182910542
2018-01-23 19:29:12 +00:00
andrewlewis
f15ce81c47 Move some unit tests to use Robolectric
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167148146
2017-09-04 10:20:59 +01:00
eguven
427411befb Disable test coverage again
https://issuetracker.google.com/issues/37019591 causes local variables can't be found while debugging.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164449443
2017-08-07 13:38:15 +01:00
olly
4a59c7cf40 Make it easier to use ExoPlayer modules in other projects II
With this change, it becomes possible to depend on ExoPlayer
locally in settings.gradle by doing:

gradle.ext.exoplayerRoot = 'path/to/exoplayer/root'
apply from: new File(gradle.ext.exoplayerRoot, 'core_settings.gradle')

You can optionally add a prefix onto ExoPlayer's module names
by adding:

gradle.ext.exoplayerModulePrefix = 'prefix'

Issue: #2851
Issue: #2974

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160277967
2017-06-28 22:26:05 +01:00
olly
2a8eb5a2a1 Make it easier to use ExoPlayer modules in other projects
It's currently difficult to use ExoPlayer modules in other gradle
projects because they rely on constants and dependencies defined
in our own top level gradle file. This change moves the constants
into a separate file referenced directly from each module. It also
removes the need for the top level gradle file to declare a
dependency on com.novoda:bintray-release. This is now only needed
if "exoplayerPublishEnabled = true" is specified.

Issue: #2851
Issue: #2974

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160272072
2017-06-28 22:26:05 +01:00
tonihei
cdad6a4ef1 Move playback test utils to testutils.
This allows other tests to reuse the util classes without having to link to playbacktests.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158214560
2017-06-12 10:18:50 +01:00
olly
8be85d4d2f Consolidate version codes in root gradle file
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=153453768
2017-04-18 19:42:27 +01:00
olly
85adecf948 Remove reflection + make it easy to set extractor flags
The idea of using reflection was so that a developer could
delete a package they didn't want and have everything else
still compile. However, a developer doing this is likely
building from source, in which case editing the factories
too is pretty trivial.

Removing the reflection makes specifying extractor flags
via the default factory easy, and removes the need for
special proguard config.

Issue: #2657

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=152810423
2017-04-18 19:29:56 +01:00
eguven
68b8a5e542 Downgrade jacoco to 0.7.4.201502262128 as a workaround for 'stuck in endless loop' issue
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=151554130
2017-03-31 19:09:01 +01:00
eguven
2f9e082fe1 Enable gradle test code coverage for the library modules that aren't affected by 'stuck in endless loop' issue
'library-core' is still affected by https://code.google.com/p/android/issues/detail?id=226070

Code coverage report can be generated for the rest of the modules by:
./gradlew :[module name]:createDebugCoverageReport
Report is generated under:
[module folder]/buildout/reports/coverage/debug

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=151448536
2017-03-31 19:06:58 +01:00
olly
382ba7ecf0 Generate combined Javadoc
Notes:
- Now only generating a single module Javadoc task for the
  release variant.
- Combined Javadoc now includes extensions. VP9 is excluded
  for now since it's failing for an unknown reason.

Issue: #2139

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=150865589
2017-03-22 19:11:28 +00:00
olly
88e74ef381 Generate Javadoc for each module individually
Notes:
- The VP9 one is failing claiming that the util package
  doesn't exist and that LibraryLoader cannot be found.
  Unsure why, since it appears to be setup exactly like
  other extensions (e.g. Opus) that does work.
- @link across modules will not work when generating
  Javadoc for a single module. This is WAI. I subsequent
  change will add an aggregated Javadoc generator that
  will generate Javadoc for all modules together and
  apply cross module @link correctly.

Issue: #2139

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=150864273
2017-03-22 19:10:15 +00:00
olly
ce55d1a712 Modularize ExoPlayer steps 1 + 2.
1. Move entire library from v2/library/ to v2/library/core
2. Add v2/library/all that depends on v2/library/core

Issue: #2139

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=150455693
2017-03-22 18:49:30 +00:00