mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-14 20:59:25 +00:00
To comply with upcoming Play Store requirement, this updates targetSDKVersion to 30. * Also sets appropriate webView permissions to access local file (except for WebBrowserActivity, the in-app browser).
86 lines
3 KiB
Groovy
86 lines
3 KiB
Groovy
plugins {
|
|
id 'com.android.library'
|
|
id 'name.remal.default-plugins'
|
|
}
|
|
|
|
ext.rootPath = '../../'
|
|
apply from: "$rootPath/version.gradle"
|
|
|
|
android {
|
|
compileSdkVersion 30
|
|
buildToolsVersion "30.0.2"
|
|
|
|
defaultConfig {
|
|
minSdkVersion 21
|
|
targetSdkVersion 30
|
|
|
|
// VERSION_CODE and VERSION_NAME from version.gradle but Gradle removes them for libraries
|
|
buildConfigField "String", "KEYMAN_ENGINE_VERSION_NAME", "\""+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-rc01'
|
|
implementation 'com.google.android.material:material:1.3.0'
|
|
implementation 'commons-io:commons-io:2.6'
|
|
implementation 'io.sentry:sentry-android:4.3.0'
|
|
implementation 'androidx.preference:preference:1.1.1'
|
|
|
|
// Robolectric
|
|
testImplementation 'androidx.test:core:1.3.0'
|
|
testImplementation 'androidx.test.ext:junit:1.1.2'
|
|
testImplementation 'org.robolectric:robolectric:4.5.1'
|
|
|
|
// Generate QR Codes
|
|
implementation ('com.github.kenglxn.QRGen:android:2.6.0') {
|
|
transitive = true
|
|
}
|
|
}
|
|
//Show deprecation compiler warnings
|
|
/*
|
|
allprojects {
|
|
tasks.withType(JavaCompile) {
|
|
options.compilerArgs << "-Xlint:deprecation"
|
|
}
|
|
}*/
|