mirror of
https://github.com/samsonjs/media.git
synced 2026-03-29 10:05:48 +00:00
Fix publishing to bintray
The configuration to publish to Maven seems to be incompatible with the configuration for bintray, so only enable one at once. Once the GMaven publishing flow is completely set up we can remove the exoplayerPublishEnabled constant and the first branch entirely. Issue: #5246 PiperOrigin-RevId: 359056610
This commit is contained in:
parent
e3adac59b4
commit
abf65e27f4
1 changed files with 42 additions and 44 deletions
|
|
@ -12,10 +12,9 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// For publishing to Bintray.
|
||||
|
||||
if (project.ext.has("exoplayerPublishEnabled")
|
||||
&& project.ext.exoplayerPublishEnabled) {
|
||||
// For publishing to Bintray.
|
||||
apply plugin: 'bintray-release'
|
||||
publish {
|
||||
artifactId = releaseArtifact
|
||||
|
|
@ -41,6 +40,47 @@ if (project.ext.has("exoplayerPublishEnabled")
|
|||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// For publishing to a Maven repository.
|
||||
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'
|
||||
}
|
||||
}
|
||||
scm {
|
||||
connection = 'scm:git:https://github.com/google/ExoPlayer.git'
|
||||
url = 'https://github.com/google/ExoPlayer'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def getBintrayRepo() {
|
||||
|
|
@ -70,49 +110,7 @@ static void addLicense(File pom) {
|
|||
writer.close()
|
||||
}
|
||||
|
||||
// For publishing to a Maven repository.
|
||||
|
||||
task androidSourcesJar(type: Jar) {
|
||||
archiveClassifier.set('sources')
|
||||
from android.sourceSets.main.java.srcDirs
|
||||
}
|
||||
|
||||
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'
|
||||
}
|
||||
}
|
||||
scm {
|
||||
connection = 'scm:git:https://github.com/google/ExoPlayer.git'
|
||||
url = 'https://github.com/google/ExoPlayer'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue