build.gradle 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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. compileSdk = rootProject.ext.compileSdkVersion
  11. buildToolsVersion rootProject.ext.buildToolsVersion
  12. defaultConfig {
  13. minSdkVersion rootProject.ext.minSdkVersion
  14. targetSdkVersion 33
  15. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  16. consumerProguardFiles "consumer-rules.pro"
  17. }
  18. buildTypes {
  19. debug {
  20. // libraryVariants.all { variant->
  21. // variant.outputs.all { output ->
  22. // if (outputFile != null && outputFileName.endsWith('.aar')) {
  23. // outputFileName = "ad_core_${version}_${releaseTime()}_debug.aar"
  24. // }
  25. // }
  26. // }
  27. }
  28. release {
  29. minifyEnabled true
  30. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  31. libraryVariants.all { variant ->
  32. variant.outputs.all { output ->
  33. if (outputFile != null && outputFileName.endsWith('.aar')) {
  34. outputFileName = "ad_core_${version}_${releaseTime()}_release.aar"
  35. }
  36. }
  37. }
  38. }
  39. }
  40. compileOptions {
  41. sourceCompatibility JavaVersion.VERSION_1_8
  42. targetCompatibility JavaVersion.VERSION_1_8
  43. }
  44. kotlinOptions {
  45. jvmTarget = '1.8'
  46. }
  47. }
  48. dependencies {
  49. // api fileTree(dir: "libs", include: ["*.jar", "*.aar"])
  50. /*Base*/
  51. api 'androidx.appcompat:appcompat:1.6.1'
  52. api 'com.google.android.material:material:1.8.0'
  53. /*Kotlin*/
  54. api "androidx.core:core-ktx:1.10.0"
  55. api "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
  56. api 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4'
  57. api 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4'
  58. api 'androidx.lifecycle:lifecycle-runtime-ktx:2.6.1'
  59. /*GroMore*/
  60. api 'com.pangle.cn:mediation-sdk:5.1.6.1'
  61. // api 'com.pangle.cn:mediation-test-tools:5.1.6.1'//测试工具
  62. }