build.gradle 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. plugins {
  2. id 'com.android.library'
  3. id 'org.jetbrains.kotlin.android'
  4. }
  5. def version = '1.0.2'
  6. def releaseTime() {
  7. return new Date().format("yyyy-MM-dd", TimeZone.getTimeZone("UTC"))
  8. }
  9. android {
  10. namespace 'com.composition.android.ad.gromore.beizis'
  11. compileSdk = rootProject.ext.compileSdkVersion
  12. buildToolsVersion rootProject.ext.buildToolsVersion
  13. defaultConfig {
  14. minSdkVersion rootProject.ext.minSdkVersion
  15. targetSdkVersion rootProject.ext.targetSdkVersion
  16. }
  17. buildTypes {
  18. debug {
  19. libraryVariants.all { variant ->
  20. variant.outputs.all { output ->
  21. if (outputFile != null && outputFileName.endsWith('.aar')) {
  22. outputFileName = "ad_gromore_beizis_${version}_${releaseTime()}_debug.aar"
  23. }
  24. }
  25. }
  26. }
  27. release {
  28. minifyEnabled false
  29. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  30. libraryVariants.all { variant ->
  31. variant.outputs.all { output ->
  32. if (outputFile != null && outputFileName.endsWith('.aar')) {
  33. outputFileName = "ad_gromore_beizis_${version}_${releaseTime()}_release.aar"
  34. }
  35. }
  36. }
  37. }
  38. }
  39. compileOptions {
  40. sourceCompatibility JavaVersion.VERSION_1_8
  41. targetCompatibility JavaVersion.VERSION_1_8
  42. }
  43. kotlinOptions {
  44. jvmTarget = '1.8'
  45. }
  46. }
  47. dependencies {
  48. compileOnly fileTree(include: ['*.jar', '*.aar'], dir: 'libs')
  49. implementation project(':lib_ad_gromore')
  50. }