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
86a0a405
authored
Mar 31, 2021
by
andrewlewis
Committed by
Oliver Woodman
Apr 01, 2021
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Update instructions for GMaven releasing
Issue: #5246 #minor-release PiperOrigin-RevId: 366041182
parent
056ef5c9
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
52 additions
and
124 deletions
README.md
RELEASENOTES.md
build.gradle
extensions/ffmpeg/README.md
publish.gradle
README.md
View file @
86a0a405
...
...
@@ -22,28 +22,16 @@ and extend, and can be updated through Play Store application updates.
## Using ExoPlayer ##
ExoPlayer modules can be obtained from
JCenter. It's also possible to clone the
repository and depend on the modules locally.
ExoPlayer modules can be obtained from
[
the Google Maven repository
][]
. It's
also possible to clone the
repository and depend on the modules locally.
### From
JCenter ###
### From
the Google Maven repository
#### 1. Add
repositor
ies ####
#### 1. Add
ExoPlayer module dependenc
ies ####
The easiest way to get started using ExoPlayer is to add it as a gradle
dependency. You need to make sure you have the Google and JCenter repositories
included in the
`build.gradle`
file in the root of your project:
```
gradle
repositories
{
google
()
jcenter
()
}
```
#### 2. Add ExoPlayer module dependencies ####
Next add a dependency in the
`build.gradle`
file of your app module. The
following will add a dependency to the full library:
dependency in the
`build.gradle`
file of your app module. The following will add
a dependency to the full library:
```
gradle
implementation
'com.google.android.exoplayer:exoplayer:2.X.X'
...
...
@@ -51,6 +39,9 @@ implementation 'com.google.android.exoplayer:exoplayer:2.X.X'
where
`2.X.X`
is your preferred version.
Note: old versions of ExoPlayer are available via JCenter. To use them, you need
to add
`jcenter()`
to your project's root build.gradle
`repositories`
block.
As an alternative to the full library, you can depend on only the library
modules that you actually need. For example the following will add dependencies
on the Core, DASH and UI library modules, as might be required for an app that
...
...
@@ -72,18 +63,19 @@ individually.
*
`exoplayer-smoothstreaming`
: Support for SmoothStreaming content.
*
`exoplayer-ui`
: UI components and resources for use with ExoPlayer.
In addition to library modules, ExoPlayer has
multiple extension modules that
depend on external libraries to provide additional functionality. Som
e
extensions are available from JCenter
, whereas others must be built manually.
In addition to library modules, ExoPlayer has
extension modules that depend on
external libraries to provide additional functionality. Some extensions ar
e
available from the Maven repository
, whereas others must be built manually.
Browse the
[
extensions directory
][]
and their individual READMEs for details.
More information on the library and extension modules that are available
from
JCenter can be found on
[
Bintray
][]
.
More information on the library and extension modules that are available
can be
found on the
[
Google Maven ExoPlayer page
][]
.
[
extensions directory
]:
https://github.com/google/ExoPlayer/tree/release-v2/extensions/
[
Bintray
]:
https://bintray.com/google/exoplayer
[
the Google Maven repository
]:
https://developer.android.com/studio/build/dependencies#google-maven
[
Google Maven ExoPlayer page
]:
https://maven.google.com/web/index.html#com.google.android.exoplayer
####
3
. Turn on Java 8 support ####
####
2
. Turn on Java 8 support ####
If not enabled already, you also need to turn on Java 8 support in all
`build.gradle`
files depending on ExoPlayer, by adding the following to the
...
...
RELEASENOTES.md
View file @
86a0a405
...
...
@@ -132,8 +132,8 @@
*
Upgrade IMA SDK dependency to 3.22.3, fixing an issue with
`NullPointerExceptions`
within
`WebView`
callbacks
(
[
#8447
](
https://github.com/google/ExoPlayer/issues/8447
)
).
the IMA SDK
.
*
Update instructions and publishing configuration for releasing to Google's
Maven repository instead of bintray/JCenter
.
### 2.13.2 (2021-02-25)
...
...
build.gradle
View file @
86a0a405
...
...
@@ -14,21 +14,15 @@
buildscript
{
repositories
{
google
()
jcenter
()
}
dependencies
{
classpath
'com.android.tools.build:gradle:4.0.1'
classpath
'com.novoda:bintray-release:0.9.1'
classpath
'com.google.android.gms:strict-version-matcher-plugin:1.2.1'
}
}
allprojects
{
repositories
{
google
()
jcenter
()
}
project
.
ext
{
exoplayerPublishEnabled
=
false
}
if
(
it
.
hasProperty
(
'externalBuildDir'
))
{
if
(!
new
File
(
externalBuildDir
).
isAbsolute
())
{
...
...
extensions/ffmpeg/README.md
View file @
86a0a405
...
...
@@ -15,8 +15,8 @@ more external libraries as described below. These are licensed separately.
To use this extension you need to clone the ExoPlayer repository and depend on
its modules locally. Instructions for doing this can be found in ExoPlayer's
[
top level README
][]
. The extension is not provided via
JCenter (see
[
#2781
][]
for more information).
[
top level README
][]
. The extension is not provided via
Google's Maven
repository (see
[
#2781
][]
for more information).
In addition, it's necessary to manually build the FFmpeg library, so that gradle
can bundle the FFmpeg binaries in the APK:
...
...
publish.gradle
View file @
86a0a405
...
...
@@ -12,104 +12,46 @@
// See the License for the specific language governing permissions and
// limitations under the License.
if
(
project
.
ext
.
has
(
"exoplayerPublishEnabled"
)
&&
project
.
ext
.
exoplayerPublishEnabled
)
{
// For publishing to Bintray.
apply
plugin:
'bintray-release'
publish
{
artifactId
=
releaseArtifact
desc
=
releaseDescription
publishVersion
=
releaseVersion
repoName
=
getBintrayRepo
()
userOrg
=
'google'
groupId
=
'com.google.android.exoplayer'
website
=
'https://github.com/google/ExoPlayer'
}
gradle
.
taskGraph
.
whenReady
{
taskGraph
->
project
.
tasks
.
findAll
{
task
->
task
.
name
.
contains
(
"generatePomFileFor"
)
}
.
forEach
{
task
->
task
.
doLast
{
task
.
outputs
.
files
.
filter
{
File
file
->
file
.
path
.
contains
(
"publications"
)
\
&&
file
.
name
.
matches
(
"^pom-.+\\.xml\$"
)
}
.
forEach
{
File
file
->
addLicense
(
file
)
}
}
}
}
}
else
{
// For publishing to a Maven repository.
apply
plugin:
'maven-publish'
afterEvaluate
{
publishing
{
repositories
{
maven
{
url
=
findProperty
(
'mavenRepo'
)
?:
"${buildDir}/repo"
}
apply
plugin:
'maven-publish'
afterEvaluate
{
publishing
{
repositories
{
maven
{
url
=
findProperty
(
'mavenRepo'
)
?:
"${buildDir}/repo"
}
publications
{
release
(
MavenPublication
)
{
from
components
.
release
artifact
androidSourcesJar
groupId
=
'com.google.android.exoplayer'
artifactId
=
releaseArtifact
version
releaseVersion
pom
{
name
=
releaseArtifact
description
=
releaseDescription
licenses
{
license
{
name
=
'The Apache Software License, Version 2.0'
url
=
'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution
=
'repo'
}
}
developers
{
developer
{
name
=
'The Android Open Source Project'
}
}
publications
{
release
(
MavenPublication
)
{
from
components
.
release
artifact
androidSourcesJar
groupId
=
'com.google.android.exoplayer'
artifactId
=
releaseArtifact
version
releaseVersion
pom
{
name
=
releaseArtifact
description
=
releaseDescription
licenses
{
license
{
name
=
'The Apache Software License, Version 2.0'
url
=
'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution
=
'repo'
}
scm
{
connection
=
'scm:git:https://github.com/google/ExoPlayer.git'
url
=
'https://github.com/google/ExoPlayer'
}
developers
{
developer
{
name
=
'The Android Open Source Project'
}
}
scm
{
connection
=
'scm:git:https://github.com/google/ExoPlayer.git'
url
=
'https://github.com/google/ExoPlayer'
}
}
}
}
}
tasks
.
withType
(
PublishToMavenRepository
)
{
it
.
dependsOn
lint
,
test
}
}
def
getBintrayRepo
()
{
boolean
publicRepo
=
hasProperty
(
'publicRepo'
)
&&
property
(
'publicRepo'
).
toBoolean
()
return
publicRepo
?
'exoplayer'
:
'exoplayer-test'
}
static
void
addLicense
(
File
pom
)
{
def
licenseNode
=
new
Node
(
null
,
"license"
)
licenseNode
.
append
(
new
Node
(
null
,
"name"
,
"The Apache Software License, Version 2.0"
))
licenseNode
.
append
(
new
Node
(
null
,
"url"
,
"http://www.apache.org/licenses/LICENSE-2.0.txt"
))
licenseNode
.
append
(
new
Node
(
null
,
"distribution"
,
"repo"
))
def
licensesNode
=
new
Node
(
null
,
"licenses"
)
licensesNode
.
append
(
licenseNode
)
def
xml
=
new
XmlParser
().
parse
(
pom
)
xml
.
append
(
licensesNode
)
def
writer
=
new
PrintWriter
(
new
FileWriter
(
pom
))
writer
.
write
(
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
)
def
printer
=
new
XmlNodePrinter
(
writer
)
printer
.
preserveWhitespace
=
true
printer
.
print
(
xml
)
writer
.
close
()
}
tasks
.
withType
(
PublishToMavenRepository
)
{
it
.
dependsOn
lint
,
test
}
task
androidSourcesJar
(
type:
Jar
)
{
archiveClassifier
.
set
(
'sources'
)
...
...
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