SimpleMarkdown/core/build.gradle.kts

67 lines
1.9 KiB
Text
Raw Permalink Normal View History

import java.io.FileInputStream
import java.io.FileNotFoundException
import java.util.Properties
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
}
val acraProperties = Properties()
try {
val acraPropertiesFile = project.file("acra.properties")
acraProperties.load(FileInputStream(acraPropertiesFile))
} catch (ignored: FileNotFoundException) {
logger.warn("Unable to load ACRA properties. Error reporting won't be available")
acraProperties["url"] = ""
acraProperties["user"] = ""
acraProperties["pass"] = ""
}
android {
namespace = "com.wbrawner.simplemarkdown.core"
compileSdk = libs.versions.maxSdk.get().toInt()
defaultConfig {
minSdk = libs.versions.minSdk.get().toInt()
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
buildConfigField("String", "ACRA_URL", "\"${acraProperties["url"]}\"")
buildConfigField("String", "ACRA_USER", "\"${acraProperties["user"]}\"")
buildConfigField("String", "ACRA_PASS", "\"${acraProperties["pass"]}\"")
}
buildTypes {
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
compileOptions {
2024-10-02 03:17:34 +00:00
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
kotlinOptions {
2024-10-02 03:17:34 +00:00
jvmTarget = "11"
}
2024-08-01 02:17:14 +00:00
lint {
2024-11-07 03:48:29 +00:00
disable += listOf(
"AndroidGradlePluginVersion",
"GradleDependency",
"ObsoleteLintCustomCheck"
)
2024-08-01 02:17:14 +00:00
warningsAsErrors = true
}
}
dependencies {
2024-08-22 22:59:04 +00:00
implementation(libs.kotlinx.coroutines.core)
implementation(libs.acra.core)
implementation(libs.acra.http)
runtimeOnly(libs.acra.limiter)
runtimeOnly(libs.acra.advanced.scheduler)
api(libs.timber)
}