build.gradle 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. plugins {
  2. id 'com.android.library'
  3. id 'maven-publish'
  4. }
  5. android {
  6. namespace 'com.huantansheng.easyphotos'
  7. compileSdk 33
  8. defaultConfig {
  9. minSdk 21
  10. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  11. consumerProguardFiles "consumer-rules.pro"
  12. }
  13. buildTypes {
  14. release {
  15. minifyEnabled false
  16. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  17. }
  18. }
  19. compileOptions {
  20. sourceCompatibility JavaVersion.VERSION_1_8
  21. targetCompatibility JavaVersion.VERSION_1_8
  22. }
  23. }
  24. afterEvaluate {
  25. publishing {
  26. publications {
  27. //SDK Release 版本
  28. sdkRelease(MavenPublication) { //这个的 Release 名称是可以随意进行定义的
  29. // from components.release //关键是这个地方的值该如何配置的问题。
  30. artifact("$buildDir/outputs/aar/${project.name}-release.aar")
  31. groupId = 'com.github.Tudie'
  32. artifactId = 'EasyPhotos'
  33. version = '3.1.7'
  34. }
  35. }
  36. }
  37. }
  38. dependencies {
  39. implementation 'androidx.appcompat:appcompat:1.6.1'
  40. implementation 'com.google.android.material:material:1.8.0'
  41. testImplementation 'junit:junit:4.13.2'
  42. androidTestImplementation 'androidx.test.ext:junit:1.1.5'
  43. androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
  44. implementation 'androidx.legacy:legacy-support-v4:1.0.0'
  45. implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
  46. implementation 'androidx.appcompat:appcompat:1.6.1'
  47. implementation 'com.google.android.material:material:1.8.0'
  48. implementation 'androidx.recyclerview:recyclerview:1.3.0'
  49. implementation 'com.davemorrissey.labs:subsampling-scale-image-view-androidx:3.10.0'
  50. implementation 'com.github.chrisbanes:PhotoView:2.3.0'
  51. implementation 'com.github.dcendents:android-maven-gradle-plugin:2.0'
  52. }