Commit d6db5066 by olly Committed by Oliver Woodman

Improve publishing to Bintray

- Update bintray-release version
- Publish to exoplayer-test unless -PpublicRepo=true
- Publish GVR extension
- Minimize duplication with new publish.gradle

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=150185740
parent a9617af2
...@@ -17,7 +17,7 @@ buildscript { ...@@ -17,7 +17,7 @@ buildscript {
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:2.3.0' classpath 'com.android.tools.build:gradle:2.3.0'
classpath 'com.novoda:bintray-release:0.3.4' classpath 'com.novoda:bintray-release:0.4.0'
} }
} }
...@@ -34,10 +34,16 @@ allprojects { ...@@ -34,10 +34,16 @@ allprojects {
compileSdkVersion=25 compileSdkVersion=25
targetSdkVersion=25 targetSdkVersion=25
buildToolsVersion='25' buildToolsVersion='25'
releaseRepoName = 'exoplayer' releaseRepoName = getBintrayRepo()
releaseUserOrg = 'google' releaseUserOrg = 'google'
releaseGroupId = 'com.google.android.exoplayer' releaseGroupId = 'com.google.android.exoplayer'
releaseVersion = 'r2.2.0' releaseVersion = 'r2.2.0'
releaseWebsite = 'https://github.com/google/ExoPlayer' releaseWebsite = 'https://github.com/google/ExoPlayer'
} }
} }
def getBintrayRepo() {
boolean publicRepo = hasProperty('publicRepo') &&
property('publicRepo').toBoolean()
return publicRepo ? 'exoplayer' : 'exoplayer-test'
}
...@@ -27,3 +27,9 @@ dependencies { ...@@ -27,3 +27,9 @@ dependencies {
compile project(':library') compile project(':library')
compile 'com.google.vr:sdk-audio:1.30.0' compile 'com.google.vr:sdk-audio:1.30.0'
} }
ext {
releaseArtifact = 'extension-gvr'
releaseDescription = 'Google VR extension for ExoPlayer.'
}
apply from: '../../publish.gradle'
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
// 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.
apply plugin: 'com.android.library' apply plugin: 'com.android.library'
apply plugin: 'bintray-release'
android { android {
compileSdkVersion project.ext.compileSdkVersion compileSdkVersion project.ext.compileSdkVersion
...@@ -36,12 +35,8 @@ dependencies { ...@@ -36,12 +35,8 @@ dependencies {
} }
} }
publish { ext {
artifactId = 'extension-okhttp' releaseArtifact = 'extension-okhttp'
description = 'An OkHttp extension for ExoPlayer.' releaseDescription = 'OkHttp extension for ExoPlayer.'
repoName = releaseRepoName
userOrg = releaseUserOrg
groupId = releaseGroupId
version = releaseVersion
website = releaseWebsite
} }
apply from: '../../publish.gradle'
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
import com.android.builder.core.BuilderConstants import com.android.builder.core.BuilderConstants
apply plugin: 'com.android.library' apply plugin: 'com.android.library'
apply plugin: 'bintray-release'
android { android {
compileSdkVersion project.ext.compileSdkVersion compileSdkVersion project.ext.compileSdkVersion
...@@ -81,12 +80,8 @@ android.libraryVariants.all { variant -> ...@@ -81,12 +80,8 @@ android.libraryVariants.all { variant ->
} }
} }
publish { ext {
artifactId = 'exoplayer' releaseArtifact = 'exoplayer'
description = 'The ExoPlayer library.' releaseDescription = 'The ExoPlayer library.'
repoName = releaseRepoName
userOrg = releaseUserOrg
groupId = releaseGroupId
version = releaseVersion
website = releaseWebsite
} }
apply from: '../publish.gradle'
// Copyright (C) 2017 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
apply plugin: 'bintray-release'
publish {
artifactId = releaseArtifact
description = releaseDescription
repoName = releaseRepoName
userOrg = releaseUserOrg
groupId = releaseGroupId
version = releaseVersion
website = releaseWebsite
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment