1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- plugins {
- id 'com.android.library'
- id 'org.jetbrains.kotlin.android'
- }
- def version = '1.0.4'
- def releaseTime() {
- return new Date().format("yyyy-MM-dd", TimeZone.getTimeZone("UTC"))
- }
- android {
- compileSdk = rootProject.ext.compileSdkVersion
- buildToolsVersion rootProject.ext.buildToolsVersion
- defaultConfig {
- minSdkVersion rootProject.ext.minSdkVersion
- targetSdkVersion rootProject.ext.targetSdkVersion
- testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
- consumerProguardFiles "proguard-rules.pro"
- setProperty("archivesBaseName", "ad_admob_${version}_${releaseTime()}")
- }
- buildTypes {
- debug{
- libraryVariants.all { variant->
- variant.outputs.all { output ->
- if (outputFile != null && outputFileName.endsWith('.aar')) {
- outputFileName = "ad_admob_${version}_${releaseTime()}_release.aar"
- }
- }
- }
- }
- release {
- minifyEnabled true
- proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
- libraryVariants.all { variant->
- variant.outputs.all { output ->
- if (outputFile != null && outputFileName.endsWith('.aar')) {
- outputFileName = "ad_admob_${version}_${releaseTime()}_release.aar"
- }
- }
- }
- }
- }
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- }
- kotlinOptions {
- jvmTarget = '1.8'
- }
- }
- dependencies {
- implementation project(':lib_ad_core')
- api 'com.google.android.gms:play-services-ads:22.6.0'
- }
|