build.gradle 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. apply plugin: 'com.android.library'
  2. apply plugin: 'com.github.dcendents.android-maven'
  3. group = 'com.github.HuanTanSheng'
  4. android {
  5. compileSdkVersion 28
  6. defaultConfig {
  7. minSdkVersion 19
  8. targetSdkVersion 28
  9. versionCode 1
  10. versionName "1.0"
  11. vectorDrawables.useSupportLibrary = true
  12. }
  13. }
  14. dependencies {
  15. implementation 'androidx.legacy:legacy-support-v4:1.0.0'
  16. implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
  17. implementation 'androidx.appcompat:appcompat:1.0.2'
  18. implementation 'com.google.android.material:material:1.0.0'
  19. implementation 'androidx.recyclerview:recyclerview:1.0.0'
  20. implementation 'com.davemorrissey.labs:subsampling-scale-image-view:3.10.0'
  21. implementation 'com.github.chrisbanes:PhotoView:2.3.0'
  22. implementation project(path: ':xlibrary')
  23. }
  24. //// 指定编码
  25. //tasks.withType(JavaCompile) {
  26. // options.encoding = "UTF-8"
  27. //}
  28. // 打包源码
  29. task sourcesJar(type: Jar) {
  30. from android.sourceSets.main.java.srcDirs
  31. classifier = 'sources'
  32. }
  33. //制作文档
  34. //task javadoc(type: Javadoc) {
  35. // failOnError false
  36. // source = android.sourceSets.main.java.sourceFiles
  37. // classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
  38. // classpath += configurations.compile
  39. //}
  40. // 打包文档
  41. //task javadocJar(type: Jar, dependsOn: javadoc) {
  42. // classifier = 'javadoc'
  43. // from javadoc.destinationDir
  44. //}
  45. artifacts {
  46. archives sourcesJar
  47. // archives javadocJar
  48. }