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
7e7715db
authored
Mar 31, 2021
by
andrewlewis
Committed by
marcbaechinger
Apr 09, 2021
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Update instructions for GMaven releasing
Issue: #5246 PiperOrigin-RevId: 366041182
parent
1fd62c68
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
52 additions
and
122 deletions
README.md
RELEASENOTES.md
build.gradle
extensions/ffmpeg/README.md
publish.gradle
README.md
View file @
7e7715db
...
@@ -22,28 +22,16 @@ and extend, and can be updated through Play Store application updates.
...
@@ -22,28 +22,16 @@ and extend, and can be updated through Play Store application updates.
## Using ExoPlayer ##
## Using ExoPlayer ##
ExoPlayer modules can be obtained from
JCenter. It's also possible to clone the
ExoPlayer modules can be obtained from
[
the Google Maven repository
][]
. It's
repository and depend on the modules locally.
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
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
dependency in the
`build.gradle`
file of your app module. The following will add
included in the
`build.gradle`
file in the root of your project:
a dependency to the full library:
```
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:
```
gradle
```
gradle
implementation
'com.google.android.exoplayer:exoplayer:2.X.X'
implementation
'com.google.android.exoplayer:exoplayer:2.X.X'
...
@@ -51,6 +39,9 @@ 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.
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
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
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
on the Core, DASH and UI library modules, as might be required for an app that
...
@@ -72,18 +63,19 @@ individually.
...
@@ -72,18 +63,19 @@ individually.
*
`exoplayer-smoothstreaming`
: Support for SmoothStreaming content.
*
`exoplayer-smoothstreaming`
: Support for SmoothStreaming content.
*
`exoplayer-ui`
: UI components and resources for use with ExoPlayer.
*
`exoplayer-ui`
: UI components and resources for use with ExoPlayer.
In addition to library modules, ExoPlayer has
multiple extension modules that
In addition to library modules, ExoPlayer has
extension modules that depend on
depend on external libraries to provide additional functionality. Som
e
external libraries to provide additional functionality. Some extensions ar
e
extensions are available from JCenter
, whereas others must be built manually.
available from the Maven repository
, whereas others must be built manually.
Browse the
[
extensions directory
][]
and their individual READMEs for details.
Browse the
[
extensions directory
][]
and their individual READMEs for details.
More information on the library and extension modules that are available
from
More information on the library and extension modules that are available
can be
JCenter can be found on
[
Bintray
][]
.
found on the
[
Google Maven ExoPlayer page
][]
.
[
extensions directory
]:
https://github.com/google/ExoPlayer/tree/release-v2/extensions/
[
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
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
`build.gradle`
files depending on ExoPlayer, by adding the following to the
...
...
RELEASENOTES.md
View file @
7e7715db
...
@@ -91,6 +91,8 @@
...
@@ -91,6 +91,8 @@
*
Upgrade IMA SDK dependency to 3.22.3, fixing an issue with
*
Upgrade IMA SDK dependency to 3.22.3, fixing an issue with
`NullPointerExceptions`
within
`WebView`
callbacks
`NullPointerExceptions`
within
`WebView`
callbacks
(
[
#8447
](
https://github.com/google/ExoPlayer/issues/8447
)
).
(
[
#8447
](
https://github.com/google/ExoPlayer/issues/8447
)
).
*
Update instructions and publishing configuration for releasing to Google's
Maven repository instead of bintray/JCenter.
### 2.13.2 (2021-02-25)
### 2.13.2 (2021-02-25)
...
...
build.gradle
View file @
7e7715db
...
@@ -14,21 +14,15 @@
...
@@ -14,21 +14,15 @@
buildscript
{
buildscript
{
repositories
{
repositories
{
google
()
google
()
jcenter
()
}
}
dependencies
{
dependencies
{
classpath
'com.android.tools.build:gradle:4.0.1'
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'
classpath
'com.google.android.gms:strict-version-matcher-plugin:1.2.1'
}
}
}
}
allprojects
{
allprojects
{
repositories
{
repositories
{
google
()
google
()
jcenter
()
}
project
.
ext
{
exoplayerPublishEnabled
=
false
}
}
if
(
it
.
hasProperty
(
'externalBuildDir'
))
{
if
(
it
.
hasProperty
(
'externalBuildDir'
))
{
if
(!
new
File
(
externalBuildDir
).
isAbsolute
())
{
if
(!
new
File
(
externalBuildDir
).
isAbsolute
())
{
...
...
extensions/ffmpeg/README.md
View file @
7e7715db
...
@@ -15,8 +15,8 @@ more external libraries as described below. These are licensed separately.
...
@@ -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
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
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
][]
[
top level README
][]
. The extension is not provided via
Google's Maven
for more information).
repository (see
[
#2781
][]
for more information).
In addition, it's necessary to manually build the FFmpeg library, so that gradle
In addition, it's necessary to manually build the FFmpeg library, so that gradle
can bundle the FFmpeg binaries in the APK:
can bundle the FFmpeg binaries in the APK:
...
...
publish.gradle
View file @
7e7715db
...
@@ -12,104 +12,46 @@
...
@@ -12,104 +12,46 @@
// See the License for the specific language governing permissions and
// See the License for the specific language governing permissions and
// limitations under the License.
// limitations under the License.
if
(
project
.
ext
.
has
(
"exoplayerPublishEnabled"
)
apply
plugin:
'maven-publish'
&&
project
.
ext
.
exoplayerPublishEnabled
)
{
afterEvaluate
{
// For publishing to Bintray.
publishing
{
apply
plugin:
'bintray-release'
repositories
{
publish
{
maven
{
artifactId
=
releaseArtifact
url
=
findProperty
(
'mavenRepo'
)
?:
"${buildDir}/repo"
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"
}
}
}
publications
{
}
release
(
MavenPublication
)
{
publications
{
from
components
.
release
release
(
MavenPublication
)
{
artifact
androidSourcesJar
from
components
.
release
groupId
=
'com.google.android.exoplayer'
artifact
androidSourcesJar
artifactId
=
releaseArtifact
groupId
=
'com.google.android.exoplayer'
version
releaseVersion
artifactId
=
releaseArtifact
pom
{
version
releaseVersion
name
=
releaseArtifact
pom
{
description
=
releaseDescription
name
=
releaseArtifact
licenses
{
description
=
releaseDescription
license
{
licenses
{
name
=
'The Apache Software License, Version 2.0'
license
{
url
=
'http://www.apache.org/licenses/LICENSE-2.0.txt'
name
=
'The Apache Software License, Version 2.0'
distribution
=
'repo'
url
=
'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
distribution
=
'repo'
}
developers
{
developer
{
name
=
'The Android Open Source Project'
}
}
}
scm
{
}
connection
=
'scm:git:https://github.com/google/ExoPlayer.git'
developers
{
url
=
'https://github.com/google/ExoPlayer'
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
)
{
task
androidSourcesJar
(
type:
Jar
)
{
archiveClassifier
.
set
(
'sources'
)
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