build.gradle 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. plugins {
  2. id 'com.android.library'
  3. id 'org.jetbrains.kotlin.android'
  4. }
  5. def version = '1.0.4'
  6. def releaseTime() {
  7. return new Date().format("yyyy-MM-dd", TimeZone.getTimeZone("UTC"))
  8. }
  9. android {
  10. compileSdk = rootProject.ext.compileSdkVersion
  11. buildToolsVersion rootProject.ext.buildToolsVersion
  12. defaultConfig {
  13. minSdkVersion rootProject.ext.minSdkVersion
  14. targetSdkVersion rootProject.ext.targetSdkVersion
  15. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  16. consumerProguardFiles "consumer-rules.pro"
  17. setProperty("archivesBaseName", "ad_gromore_${version}_${releaseTime()}")
  18. }
  19. buildTypes {
  20. debug {
  21. libraryVariants.all { variant ->
  22. variant.outputs.all { output ->
  23. if (outputFile != null && outputFileName.endsWith('.aar')) {
  24. outputFileName = "ad_gromore_${version}_${releaseTime()}_debug.aar"
  25. }
  26. }
  27. }
  28. }
  29. release {
  30. minifyEnabled false
  31. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  32. libraryVariants.all { variant ->
  33. variant.outputs.all { output ->
  34. if (outputFile != null && outputFileName.endsWith('.aar')) {
  35. outputFileName = "ad_gromore_${version}_${releaseTime()}_release.aar"
  36. }
  37. }
  38. }
  39. }
  40. }
  41. compileOptions {
  42. sourceCompatibility JavaVersion.VERSION_1_8
  43. targetCompatibility JavaVersion.VERSION_1_8
  44. }
  45. kotlinOptions {
  46. jvmTarget = '1.8'
  47. }
  48. }
  49. dependencies {
  50. compileOnly fileTree(include: ['*.jar', '*.aar'], dir: 'libs')
  51. api project(':lib_ad_core')
  52. /*GroMore*/
  53. api 'com.pangle.cn:mediation-sdk:5.8.1.8'
  54. }