build.gradle 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. // Copyright (C) 2014 The Android Open Source Project
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. apply plugin: 'com.android.library'
  15. apply plugin: 'bintray-release'
  16. android {
  17. compileSdkVersion 21
  18. buildToolsVersion "21.1.2"
  19. defaultConfig {
  20. minSdkVersion 9
  21. targetSdkVersion 21
  22. }
  23. buildTypes {
  24. release {
  25. minifyEnabled false
  26. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
  27. }
  28. }
  29. lintOptions {
  30. abortOnError false
  31. }
  32. }
  33. dependencies {
  34. }
  35. android.libraryVariants.all { variant ->
  36. def name = variant.buildType.name
  37. if (name.equals(com.android.builder.core.BuilderConstants.DEBUG)) {
  38. return; // Skip debug builds.
  39. }
  40. def task = project.tasks.create "jar${name.capitalize()}", Jar
  41. task.dependsOn variant.javaCompile
  42. task.from variant.javaCompile.destinationDir
  43. artifacts.add('archives', task);
  44. }
  45. publish {
  46. repoName = 'exoplayer'
  47. userOrg = 'google'
  48. groupId = 'com.google.android.exoplayer'
  49. artifactId = 'exoplayer'
  50. version = 'r1.2.4'
  51. description = 'The ExoPlayer library.'
  52. website = 'https://github.com/google/ExoPlayer'
  53. }