Make it easier to use ExoPlayer modules in other projects
It's currently difficult to use ExoPlayer modules in other gradle projects because they rely on constants and dependencies defined in our own top level gradle file. This change moves the constants into a separate file referenced directly from each module. It also removes the need for the top level gradle file to declare a dependency on com.novoda:bintray-release. This is now only needed if "exoplayerPublishEnabled = true" is specified. Issue: #2851 Issue: #2974 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=160272072
This commit is contained in:
parent
1dcad4d173
commit
2a8eb5a2a1
24
build.gradle
24
build.gradle
@ -33,23 +33,7 @@ allprojects {
|
|||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
project.ext {
|
project.ext {
|
||||||
// Important: ExoPlayer specifies a minSdkVersion of 9 because various
|
exoplayerPublishEnabled = true
|
||||||
// components provided by the library may be of use on older devices.
|
|
||||||
// However, please note that the core media playback functionality
|
|
||||||
// provided by the library requires API level 16 or greater.
|
|
||||||
minSdkVersion = 9
|
|
||||||
compileSdkVersion = 25
|
|
||||||
targetSdkVersion = 25
|
|
||||||
buildToolsVersion = '25'
|
|
||||||
testSupportLibraryVersion = '0.5'
|
|
||||||
supportLibraryVersion = '25.3.1'
|
|
||||||
dexmakerVersion = '1.2'
|
|
||||||
mockitoVersion = '1.9.5'
|
|
||||||
releaseRepoName = getBintrayRepo()
|
|
||||||
releaseUserOrg = 'google'
|
|
||||||
releaseGroupId = 'com.google.android.exoplayer'
|
|
||||||
releaseVersion = 'r2.4.2'
|
|
||||||
releaseWebsite = 'https://github.com/google/ExoPlayer'
|
|
||||||
}
|
}
|
||||||
if (it.hasProperty('externalBuildDir')) {
|
if (it.hasProperty('externalBuildDir')) {
|
||||||
if (!new File(externalBuildDir).isAbsolute()) {
|
if (!new File(externalBuildDir).isAbsolute()) {
|
||||||
@ -59,10 +43,4 @@ allprojects {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
def getBintrayRepo() {
|
|
||||||
boolean publicRepo = hasProperty('publicRepo') &&
|
|
||||||
property('publicRepo').toBoolean()
|
|
||||||
return publicRepo ? 'exoplayer' : 'exoplayer-test'
|
|
||||||
}
|
|
||||||
|
|
||||||
apply from: 'javadoc_combined.gradle'
|
apply from: 'javadoc_combined.gradle'
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// 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 from: '../version_constants.gradle'
|
||||||
apply plugin: 'com.android.application'
|
apply plugin: 'com.android.application'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// 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 from: '../../version_constants.gradle'
|
||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// 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 from: '../../version_constants.gradle'
|
||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// 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 from: '../../version_constants.gradle'
|
||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// 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 from: '../../version_constants.gradle'
|
||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
apply from: '../../version_constants.gradle'
|
||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// 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 from: '../../version_constants.gradle'
|
||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// 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 from: '../../version_constants.gradle'
|
||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// 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 from: '../../version_constants.gradle'
|
||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// 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 from: '../../version_constants.gradle'
|
||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
// 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 from: '../../version_constants.gradle'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion project.ext.compileSdkVersion
|
compileSdkVersion project.ext.compileSdkVersion
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// 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 from: '../../version_constants.gradle'
|
||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// 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 from: '../../version_constants.gradle'
|
||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// 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 from: '../../version_constants.gradle'
|
||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// 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 from: '../../version_constants.gradle'
|
||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// 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 from: '../version_constants.gradle'
|
||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
@ -11,14 +11,22 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// 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: 'bintray-release'
|
if (project.ext.has("exoplayerPublishEnabled")
|
||||||
|
&& project.ext.exoplayerPublishEnabled) {
|
||||||
publish {
|
apply plugin: 'bintray-release'
|
||||||
artifactId = releaseArtifact
|
publish {
|
||||||
description = releaseDescription
|
artifactId = releaseArtifact
|
||||||
repoName = releaseRepoName
|
description = releaseDescription
|
||||||
userOrg = releaseUserOrg
|
version = releaseVersion
|
||||||
groupId = releaseGroupId
|
repoName = getBintrayRepo()
|
||||||
version = releaseVersion
|
userOrg = 'google'
|
||||||
website = releaseWebsite
|
groupId = 'com.google.android.exoplayer'
|
||||||
|
website = 'https://github.com/google/ExoPlayer'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
def getBintrayRepo() {
|
||||||
|
boolean publicRepo = hasProperty('publicRepo') &&
|
||||||
|
property('publicRepo').toBoolean()
|
||||||
|
return publicRepo ? 'exoplayer' : 'exoplayer-test'
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// 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 from: '../version_constants.gradle'
|
||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
28
version_constants.gradle
Normal file
28
version_constants.gradle
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
// 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.
|
||||||
|
ext {
|
||||||
|
// Important: ExoPlayer specifies a minSdkVersion of 9 because various
|
||||||
|
// components provided by the library may be of use on older devices.
|
||||||
|
// However, please note that the core media playback functionality provided
|
||||||
|
// by the library requires API level 16 or greater.
|
||||||
|
minSdkVersion = 9
|
||||||
|
compileSdkVersion = 25
|
||||||
|
targetSdkVersion = 25
|
||||||
|
buildToolsVersion = '25'
|
||||||
|
testSupportLibraryVersion = '0.5'
|
||||||
|
supportLibraryVersion = '25.3.1'
|
||||||
|
dexmakerVersion = '1.2'
|
||||||
|
mockitoVersion = '1.9.5'
|
||||||
|
releaseVersion = 'r2.4.2'
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user