mirror of
https://github.com/anyproto/anytype-kotlin.git
synced 2025-06-08 05:47:05 +09:00
56 lines
No EOL
1.5 KiB
Groovy
56 lines
No EOL
1.5 KiB
Groovy
apply plugin: 'com.android.library'
|
|
apply plugin: 'kotlin-android'
|
|
apply plugin: 'kotlin-kapt'
|
|
|
|
android {
|
|
def config = rootProject.extensions.getByName("ext")
|
|
|
|
compileSdkVersion config["compile_sdk"]
|
|
|
|
defaultConfig {
|
|
minSdkVersion config["min_sdk"]
|
|
targetSdkVersion config["target_sdk"]
|
|
testInstrumentationRunner config["test_runner"]
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
buildConfigField "boolean", "SEND_EVENTS", "true"
|
|
}
|
|
debug {
|
|
buildConfigField "boolean", "SEND_EVENTS", getProperty('config.enableAnalyticsForDebugBuilds')
|
|
}
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_11
|
|
targetCompatibility JavaVersion.VERSION_11
|
|
}
|
|
|
|
kotlinOptions {
|
|
jvmTarget = JavaVersion.VERSION_11
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
def app = rootProject.ext.mainApplication
|
|
def analytics = rootProject.ext.analytics
|
|
implementation app.kotlin
|
|
implementation app.coroutinesAndroid
|
|
implementation app.timber
|
|
implementation analytics.amplitude
|
|
}
|
|
|
|
tasks.register("enableAnalyticsForDebugBuilds") {
|
|
doLast {
|
|
enableAnalyticsForDebugBuilds()
|
|
}
|
|
}
|
|
|
|
def enableAnalyticsForDebugBuilds() {
|
|
def file = file('gradle.properties')
|
|
def content = "config.enableAnalyticsForDebugBuilds=true"
|
|
file.text = content.toString()
|
|
} |