Created
February 27, 2023 21:22
-
-
Save PetkevichPavel/9b44afd2d2da3baba5de7d3246239ff5 to your computer and use it in GitHub Desktop.
common-android-library.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'com.android.library' | |
apply plugin: 'kotlin-android' | |
apply plugin: 'kotlin-kapt' | |
apply from: "$rootDir/gradle/dependencies.gradle" | |
def ext = rootProject.ext | |
android { | |
compileSdkVersion ext.compileSdkVersion | |
defaultConfig { | |
minSdkVersion ext.minSdkVersion | |
targetSdkVersion ext.targetSdkVersion | |
versionCode ext.versionCode | |
versionName ext.versionName | |
buildConfigField "int", "VERSION_CODE", "${ext.versionCode}" | |
buildConfigField "String", "VERSION_NAME", "\"${ext.versionName}\"" | |
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | |
consumerProguardFiles 'consumer-rules.pro' | |
} | |
buildTypes { | |
debug { | |
minifyEnabled false | |
} | |
release { | |
minifyEnabled true | |
debuggable false | |
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | |
} | |
} | |
buildFeatures { | |
dataBinding = true | |
} | |
kapt { | |
correctErrorTypes = true | |
} | |
compileOptions { | |
sourceCompatibility JavaVersion.VERSION_11 | |
targetCompatibility JavaVersion.VERSION_11 | |
} | |
kotlinOptions { | |
jvmTarget = JavaVersion.VERSION_11 | |
} | |
flavorDimensions "api" | |
productFlavors { | |
dev { | |
dimension "api" | |
buildConfigField 'String', 'API_ENV', "\"Stage\"" | |
} | |
staging { | |
dimension "api" | |
buildConfigField 'String', 'API_ENV', "\"Stage\"" | |
} | |
production { | |
dimension "api" | |
buildConfigField 'String', 'API_ENV', "\"\"" | |
} | |
} | |
} | |
dependencies { | |
api fileTree(dir: 'libs', include: ['*.jar']) | |
api "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" | |
implementation epoxy.databinding | |
implementation epoxy.base | |
kapt epoxy.processor | |
api timberDependencies.timber | |
testImplementation testDependencies.junit | |
androidTestImplementation testDependencies.extJunit | |
androidTestImplementation testDependencies.axEspressoCore | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment