build.gradle 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. plugins {
  2. id 'com.android.library'
  3. }
  4. android {
  5. compileSdk rootProject.ext.android.compileSdk
  6. buildToolsVersion rootProject.ext.android.buildToolsVersion
  7. defaultConfig {
  8. minSdk rootProject.ext.android.minSdk
  9. targetSdk rootProject.ext.android.targetSdk
  10. }
  11. buildTypes {
  12. release {
  13. minifyEnabled rootProject.ext.module.minifyEnabled
  14. proguardFiles 'proguard-rules.pro'
  15. }
  16. }
  17. buildFeatures {
  18. buildConfig false
  19. }
  20. lintOptions {
  21. abortOnError false
  22. }
  23. dexOptions {
  24. preDexLibraries false
  25. }
  26. }
  27. dependencies {
  28. api files('../libs/mmkv-static-1.2.8.jar')
  29. api files('../libs/dolin_zap_1.0.0.jar')
  30. api files('../libs/yyxx_support_1.0.2.jar')
  31. api files('../libs/android-support-v4.jar')
  32. }
  33. android.libraryVariants.all { variant ->
  34. if (variant.buildType.name == 'release'){
  35. variant.outputs.all {
  36. outputFileName = "$PUBLISH_ARTIFACT_ID"+ "-" + "$PUBLISH_VERSION" + ".aar"
  37. }
  38. }else{
  39. variant.outputs.all {
  40. outputFileName = "$PUBLISH_ARTIFACT_ID" + "_"+ variant.buildType.name + "$PUBLISH_VERSION" + ".aar"
  41. }
  42. }
  43. }
  44. apply from: 'buildJar.gradle'
  45. apply from: 'publish.gradle'