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
6fd235f9
authored
Jul 09, 2019
by
Oliver Woodman
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Merge pull request #5732 from ToxicBakery:feature/add-license-to-pom
PiperOrigin-RevId: 257138448
parent
d035f24e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
0 deletions
build.gradle
publish.gradle
build.gradle
View file @
6fd235f9
...
@@ -44,6 +44,7 @@ allprojects {
...
@@ -44,6 +44,7 @@ allprojects {
}
}
buildDir
=
"${externalBuildDir}/${project.name}"
buildDir
=
"${externalBuildDir}/${project.name}"
}
}
group
=
'com.google.android.exoplayer'
}
}
apply
from:
'javadoc_combined.gradle'
apply
from:
'javadoc_combined.gradle'
publish.gradle
View file @
6fd235f9
...
@@ -23,6 +23,21 @@ if (project.ext.has("exoplayerPublishEnabled")
...
@@ -23,6 +23,21 @@ if (project.ext.has("exoplayerPublishEnabled")
groupId
=
'com.google.android.exoplayer'
groupId
=
'com.google.android.exoplayer'
website
=
'https://github.com/google/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
)
}
}
}
}
}
}
def
getBintrayRepo
()
{
def
getBintrayRepo
()
{
...
@@ -30,3 +45,23 @@ def getBintrayRepo() {
...
@@ -30,3 +45,23 @@ def getBintrayRepo() {
property
(
'publicRepo'
).
toBoolean
()
property
(
'publicRepo'
).
toBoolean
()
return
publicRepo
?
'exoplayer'
:
'exoplayer-test'
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
))
def
printer
=
new
XmlNodePrinter
(
writer
)
printer
.
preserveWhitespace
=
true
printer
.
print
(
xml
)
writer
.
close
()
}
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