build.gradle 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. apply plugin: 'com.android.library'
  2. android {
  3. compileSdkVersion 28
  4. buildToolsVersion '28.0.3'
  5. defaultConfig {
  6. minSdkVersion 16
  7. targetSdkVersion 28
  8. versionCode 1
  9. versionName "1.0"
  10. }
  11. defaultConfig {
  12. minSdkVersion 16
  13. targetSdkVersion 28
  14. versionCode 1
  15. versionName "1.0"
  16. ndk {
  17. abiFilters 'armeabi', 'armeabi-v7a', 'x86'
  18. }
  19. }
  20. buildTypes {
  21. release {
  22. minifyEnabled false
  23. signingConfig signingConfigs.debug
  24. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  25. }
  26. debug {
  27. minifyEnabled false
  28. signingConfig signingConfigs.debug
  29. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  30. proguardFiles 'proguard-rules.pro'
  31. }
  32. signingConfigs {
  33. debug {
  34. //签名文件在项目根目录下
  35. //KEY_ALIAS,KEY_PASSWORD,STORE_PASSWORD写在项目根目录下的gradle.properties里
  36. keyAlias "qhd"
  37. keyPassword "aoyi123"
  38. storeFile file('qhd.jks')
  39. storePassword "aoyi123"
  40. }
  41. }
  42. }
  43. lintOptions {
  44. abortOnError false
  45. }
  46. productFlavors {
  47. }
  48. }
  49. dependencies {
  50. implementation fileTree(include: ['*.jar'], dir: 'libs')
  51. // implementation(rootProject.ext.dependencies.espresso, {
  52. // exclude group: 'com.android.support', module: 'support-annotations'
  53. // })
  54. // implementation rootProject.ext.dependencies.appcompatV7
  55. // implementation rootProject.ext.dependencies.junit
  56. implementation 'com.android.support:appcompat-v7:28.0.0'
  57. testImplementation 'junit:junit:4.12'
  58. implementation 'tv.danmaku.ijk.media:ijkplayer-java:0.8.3'
  59. // compile 'tv.danmaku.ijk.media:ijkplayer-exo:0.8.3'
  60. implementation 'tv.danmaku.ijk.media:ijkplayer-armv7a:0.8.3'
  61. implementation 'tv.danmaku.ijk.media:ijkplayer-armv5:0.8.3'
  62. // compile 'tv.danmaku.ijk.media:ijkplayer-arm64:0.8.3'
  63. implementation 'tv.danmaku.ijk.media:ijkplayer-x86:0.8.3'
  64. // compile 'tv.danmaku.ijk.media:ijkplayer-x86_64:0.8.3'
  65. }
  66. //apply plugin: 'com.github.dcendents.android-maven'
  67. //apply plugin: 'com.jfrog.bintray'
  68. //
  69. //def siteUrl = 'https://github.com/xiaoyanger0825/NiceVideoPlayer' // 项目的主页
  70. //def gitUrl = 'https://github.com/xiaoyanger0825/NiceVideoPlayer' // Git仓库的url
  71. ////发布到组织名称名字,必须填写
  72. //group = "com.xiaomark.nicevideoplayer"
  73. ////发布到JCenter上的项目名字,必须填写
  74. //def libName = "nicevideoplayer"
  75. //// 版本号,下次更新是只需要更改版本号即可
  76. //version = rootProject.ext.android.versionName
  77. //
  78. //Properties properties = new Properties()
  79. //properties.load(project.rootProject.file('local.properties').newDataInputStream())
  80. //bintray {
  81. // user = properties.getProperty("bintray.user")
  82. // key = properties.getProperty("bintray.apikey")
  83. // pkg {
  84. // userOrg = 'xiaomark' //自己创建的organization名称
  85. // repo = 'nicevideoplayer'//自己创建的仓库名字
  86. // name = libName //上传到JCenter的名字,最终引用的名字
  87. // websiteUrl = siteUrl
  88. // vcsUrl = gitUrl
  89. // licenses = ['Apache-2.0']//不能随便写,只能是仓库创建时选择的license type
  90. // publish = true // 是否是公开项目,公开别人可以引用
  91. //
  92. // version {
  93. // name = rootProject.ext.android.versionName
  94. // desc = 'a video player libarary for android.'//描述,自己定义
  95. // released = new Date()
  96. // vcsTag = rootProject.ext.android.versionName
  97. // attributes = ['gradle-plugin': 'com.use.less:com.use.less.gradle:gradle-useless-plugin']
  98. // }
  99. // }
  100. // configurations = ['archives']
  101. //}
  102. //
  103. //install {
  104. // repositories.mavenInstaller {
  105. // // This generates POM.xml with proper parameters
  106. // pom {
  107. // project {
  108. // packaging 'aar'
  109. // // Add your description here
  110. // name 'nicevideoplayer'
  111. // description 'a video player libarary for android.'
  112. // url siteUrl
  113. // // Set your license
  114. // licenses {
  115. // license {
  116. // name 'Apache-2.0' //和之前自己定义的协议一致
  117. // url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
  118. // }
  119. // }
  120. // developers {
  121. // developer {
  122. // id 'xiaoyanger0825' //填写bintray或者github的用户名
  123. // name 'xiaojianjun' //姓名
  124. // email 'xiaojianjun0825@aliyun.com'//邮箱
  125. // }
  126. // }
  127. // scm {
  128. // connection gitUrl
  129. // developerConnection gitUrl
  130. // url siteUrl
  131. // }
  132. // }
  133. // }
  134. // }
  135. //}
  136. //task sourcesJar(type: Jar) {
  137. // from android.sourceSets.main.java.srcDirs
  138. // classifier = 'sources'
  139. //}
  140. //task javadoc(type: Javadoc) {
  141. // failOnError false //必须添加以免出错
  142. // source = android.sourceSets.main.java.srcDirs
  143. // classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
  144. //}
  145. //task javadocJar(type: Jar, dependsOn: javadoc) {
  146. // classifier = 'javadoc'
  147. // from javadoc.destinationDir
  148. //}
  149. //artifacts {
  150. // archives javadocJar
  151. // archives sourcesJar
  152. //}
  153. //
  154. //javadoc {
  155. // options {
  156. // //如果你的项目里面有中文注释的话,必须将格式设置为UTF-8,不然会出现乱码
  157. // encoding "UTF-8"
  158. // charSet 'UTF-8'
  159. // author true
  160. // version true
  161. // links "http://docs.oracle.com/javase/7/docs/api"
  162. // }
  163. //}