spiegel-keyman/android/KMEA/app/build.gradle
Darcy Wong da9a50ae58 chore(android/engine): update to sentry-android:3.1.0
The migration changes the package name from `import io.sentry.core` to `import.sentry`
2020-11-16 14:05:41 +07:00

89 lines
3 KiB
Groovy

plugins {
id 'com.android.library'
id 'name.remal.default-plugins'
}
ext.rootPath = '../../'
apply from: "$rootPath/version.gradle"
android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
defaultConfig {
minSdkVersion 21
targetSdkVersion 29
// VERSION_CODE and VERSION_NAME from version.gradle
versionCode VERSION_CODE as Integer
versionName VERSION_NAME
buildConfigField "String", "VERSION_ENVIRONMENT", "\""+VERSION_ENVIRONMENT+"\""
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
// TODO: Remove ResourceType when SDK > 17
lintOptions {
disable 'ImpliedQuantity', 'MissingQuantity', 'MissingTranslation', 'ResourceType'
lintConfig file("lint.xml")
}
testOptions {
unitTests {
// Allows use of a simulated Android API for tests. (Thanks, roboelectric!)
includeAndroidResources = true
}
unitTests.all {
testLogging {
// May also add "passed", "skipped".
events "failed"//, "standardOut", "standardError" if we want them to show in builds.
outputs.upToDateWhen {false}
//showStandardStreams = true // If we want test console log output to show during builds.
}
systemProperty 'kmeaTestMode', 'true'
workingDir = "../" // Defaults to the `app` subdirectory, which is different from Android Studio's default.
//Avoid Warning: an illegal reflective access operation has occurred
//Change argument jdk.module.illegalAccess=warn for detailed information which module needs to be opened
//Problem is caused by robolectric: see https://github.com/robolectric/robolectric/issues/4776
if(JavaVersion.current().isJava9Compatible()){
jvmArgs ('-Djdk.module.illegalAccess=permit')
jvmArgs('--add-opens', 'java.base/java.lang=ALL-UNNAMED')
jvmArgs('--add-opens', 'java.base/java.lang.reflect=ALL-UNNAMED')
}
}
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.3.0-alpha02'
implementation 'com.google.android.material:material:1.2.1'
implementation 'commons-io:commons-io:2.6'
implementation 'io.sentry:sentry-android:3.1.0'
// Robolectric
testImplementation 'androidx.test:core:1.2.0'
testImplementation 'androidx.test.ext:junit:1.1.1'
testImplementation 'org.robolectric:robolectric:4.3.1'
// Generate QR Codes
implementation ('com.github.kenglxn.QRGen:android:2.6.0') {
transitive = true
}
// Assign the annotation processor for tests.
testAnnotationProcessor 'com.google.auto.service:auto-service:1.0-rc4'
}
//Show deprecation compiler warnings
/*
allprojects {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:deprecation"
}
}*/