build.gradle 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. apply plugin: 'com.android.library'
  2. android {
  3. compileSdkVersion 26
  4. defaultConfig {
  5. // applicationId "com.usai.redant.rautils"
  6. minSdkVersion 21
  7. targetSdkVersion 26
  8. versionCode 1
  9. versionName "1.0"
  10. testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
  11. }
  12. buildTypes {
  13. release {
  14. minifyEnabled true
  15. zipAlignEnabled true
  16. // shrinkResources true
  17. // proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
  18. }
  19. }
  20. libraryVariants.all { variant ->
  21. // if (variant.buildType.name == 'release') {
  22. variant.assemble.doLast {
  23. variant.outputs.each { output ->
  24. def outputFile = output.outputFile
  25. // if (outputFile != null && outputFile.name.endsWith('release.aar')) {
  26. def fileName = "${project.name}"
  27. println(fileName)
  28. def outputPath = "../output"
  29. copy {
  30. from outputFile
  31. into outputPath
  32. rename { fileName + ".aar" }
  33. }
  34. // }
  35. }
  36. }
  37. // }
  38. }
  39. gradle.projectsEvaluated {
  40. tasks.withType(JavaCompile) {
  41. // options.compilerArgs << "-Xlint:deprecation"
  42. options.compilerArgs << "-Xlint:unchecked"
  43. }
  44. }
  45. }
  46. dependencies {
  47. implementation 'com.android.support:appcompat-v7:26.1.0'
  48. testImplementation 'junit:junit:4.12'
  49. androidTestImplementation 'com.android.support.test:runner:1.0.2'
  50. androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
  51. api files('libs/bcprov-jdk15on-157.jar')
  52. api files('libs/httpmime-4.1.1.jar')
  53. api 'com.google.android.gms:play-services-location:16.0.0'
  54. api files('libs/core-2.3.0.jar')
  55. api 'com.github.barteksc:android-pdf-viewer:3.0.0-beta.5'
  56. }