2024-05-19 04:13:39 +00:00
|
|
|
import java.io.FileInputStream
|
|
|
|
import java.io.FileNotFoundException
|
|
|
|
import java.util.Properties
|
|
|
|
|
|
|
|
plugins {
|
2024-07-12 04:00:13 +00:00
|
|
|
alias(libs.plugins.android.library)
|
|
|
|
alias(libs.plugins.kotlin.android)
|
2024-05-19 04:13:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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"
|
2024-07-12 04:00:13 +00:00
|
|
|
compileSdk = libs.versions.maxSdk.get().toInt()
|
2024-05-19 04:13:39 +00:00
|
|
|
|
|
|
|
defaultConfig {
|
2024-07-12 04:00:13 +00:00
|
|
|
minSdk = libs.versions.minSdk.get().toInt()
|
2024-05-19 04:13:39 +00:00
|
|
|
|
|
|
|
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 {
|
|
|
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
|
|
targetCompatibility = JavaVersion.VERSION_1_8
|
|
|
|
}
|
|
|
|
kotlinOptions {
|
|
|
|
jvmTarget = "1.8"
|
|
|
|
}
|
2024-08-01 02:17:14 +00:00
|
|
|
lint {
|
2024-08-22 02:57:57 +00:00
|
|
|
disable += "AndroidGradlePluginVersion"
|
2024-08-01 02:17:14 +00:00
|
|
|
warningsAsErrors = true
|
|
|
|
}
|
2024-05-19 04:13:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2024-07-12 04:00:13 +00:00
|
|
|
implementation(libs.acra.core)
|
|
|
|
implementation(libs.acra.http)
|
|
|
|
runtimeOnly(libs.acra.limiter)
|
|
|
|
runtimeOnly(libs.acra.advanced.scheduler)
|
|
|
|
api(libs.timber)
|
2024-05-19 04:13:39 +00:00
|
|
|
}
|