build.gradle 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. apply plugin: 'com.android.library'
  2. //apply plugin: 'com.github.dcendents.android-maven'
  3. //apply plugin: 'com.jfrog.bintray'
  4. version = "1.1.8"
  5. android {
  6. compileSdkVersion COMPILE_SDK_VERSION as int
  7. buildToolsVersion BUILD_TOOLS_VERSION
  8. defaultConfig {
  9. minSdkVersion 14
  10. targetSdkVersion 25
  11. versionCode 1
  12. versionName "1.0"
  13. }
  14. buildTypes {
  15. release {
  16. minifyEnabled false
  17. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  18. }
  19. }
  20. lintOptions {
  21. abortOnError false
  22. }
  23. }
  24. dependencies {
  25. implementation fileTree(include: ['*.jar'], dir: 'libs')
  26. testImplementation 'junit:junit:4.13'
  27. implementation('com.android.support:appcompat-v7:28.0.0') { exclude module: 'support-v4' }
  28. }
  29. /*def siteUrl = 'https://github.com/CJT2325/CameraView' // 项目的主页
  30. def gitUrl = 'https://github.com/CJT2325/CameraView.git' // Git仓库的url
  31. group = "cjt.library.wheel" // Maven Group ID for the artifact,
  32. install {
  33. repositories.mavenInstaller {
  34. // This generates POM.xml with proper parameters
  35. pom {
  36. project {
  37. packaging 'aar'
  38. // Add your description here
  39. name 'A simple camera view' //项目的描述 你可以多写一点
  40. url siteUrl
  41. // Set your license
  42. licenses {
  43. license {
  44. name 'The Apache Software License, Version 2.0'
  45. url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
  46. }
  47. }
  48. developers {
  49. developer {
  50. id 'cjt' //填写的一些基本信息
  51. name 'JiaTong Chen'
  52. email '445263848@qq.com'
  53. }
  54. }
  55. scm {
  56. connection gitUrl
  57. developerConnection gitUrl
  58. url siteUrl
  59. }
  60. }
  61. }
  62. }
  63. }
  64. task sourcesJar(type: Jar) {
  65. from android.sourceSets.main.java.srcDirs
  66. classifier = 'sources'
  67. }
  68. task javadoc(type: Javadoc) {
  69. options.encoding = "UTF-8"
  70. source = android.sourceSets.main.java.srcDirs
  71. classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
  72. }
  73. task javadocJar(type: Jar, dependsOn: javadoc) {
  74. classifier = 'javadoc'
  75. from javadoc.destinationDir
  76. }
  77. artifacts {
  78. archives javadocJar
  79. archives sourcesJar
  80. }
  81. File localProps = project.rootProject.file('local.properties')
  82. if (localProps.exists()) {
  83. Properties properties = new Properties()
  84. properties.load(localProps.newDataInputStream())
  85. bintray {
  86. user = properties.getProperty("bintray.user")
  87. key = properties.getProperty("bintray.apikey")
  88. configurations = ['archives']
  89. pkg {
  90. repo = "maven"
  91. name = "cameraView"
  92. websiteUrl = siteUrl
  93. vcsUrl = gitUrl
  94. licenses = ["Apache-2.0"]
  95. publish = true
  96. }
  97. }
  98. }*/