build.gradle 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. plugins {
  2. id 'com.android.library'
  3. id 'org.jetbrains.kotlin.android'
  4. }
  5. apply from: '../ad-core-mavencentral.gradle'
  6. def version = '1.0.4'
  7. def releaseTime() {
  8. return new Date().format("yyyy-MM-dd", TimeZone.getTimeZone("UTC"))
  9. }
  10. android {
  11. compileSdk = rootProject.ext.compileSdkVersion
  12. buildToolsVersion rootProject.ext.buildToolsVersion
  13. defaultConfig {
  14. minSdkVersion rootProject.ext.minSdkVersion
  15. targetSdkVersion 33
  16. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  17. consumerProguardFiles "consumer-rules.pro"
  18. setProperty("archivesBaseName", "ad_core_${version}_${releaseTime()}")
  19. }
  20. buildTypes {
  21. debug {
  22. libraryVariants.all { variant->
  23. variant.outputs.all { output ->
  24. if (outputFile != null && outputFileName.endsWith('.aar')) {
  25. outputFileName = "ad_core_${version}_${releaseTime()}_debug.aar"
  26. }
  27. }
  28. }
  29. }
  30. release {
  31. minifyEnabled true
  32. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  33. }
  34. }
  35. compileOptions {
  36. sourceCompatibility JavaVersion.VERSION_1_8
  37. targetCompatibility JavaVersion.VERSION_1_8
  38. }
  39. kotlinOptions {
  40. jvmTarget = '1.8'
  41. }
  42. }
  43. dependencies {
  44. // api fileTree(dir: "libs", include: ["*.jar", "*.aar"])
  45. /*Base*/
  46. api 'androidx.appcompat:appcompat:1.6.1'
  47. api 'com.google.android.material:material:1.9.0'
  48. /*Kotlin*/
  49. api "androidx.core:core-ktx:1.10.1"
  50. api "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
  51. api 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4'
  52. api 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4'
  53. api 'androidx.lifecycle:lifecycle-runtime-ktx:2.6.1'
  54. }