spiegel-keyman/android/KMEA/app/build.gradle
Marc Durdin a1c8e63cc8 chore(android): cleanup Android build scripts and artifact filenames
* Specify clearer filenames for Android samples and test KeyboardHarness
* Cleanup android/*/build.sh to match current patterns
* Remove obsolete jcenter dependency
* Export BUILDER_CONFIGURATION in builder.inc.sh

Fixes: #16137
Fixes: #16181
Test-bot: skip
Build-bot: skip release:android
2026-07-13 16:36:29 +02:00

93 lines
2.8 KiB
Groovy

plugins {
id 'base'
id 'com.android.library'
id 'name.remal.default-plugins'
}
ext.rootPath = '../../'
apply from: "$rootPath/version.gradle"
base {
// Specify library filename keyman-engine-$BUILDER_CONFIGURATION.aar
archivesName = "keyman-engine"
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
android {
compileSdk 35
namespace "com.keyman.engine"
buildFeatures {
// needed for custom BuildConfigField values in defaultConfig
buildConfig = true
}
defaultConfig {
minSdkVersion 21
targetSdkVersion 35
// KEYMAN_VERSION_CODE and KEYMAN_VERSION_NAME from version.gradle but Gradle removes them for libraries
buildConfigField "String", "KEYMAN_ENGINE_VERSION_NAME", "\""+KEYMAN_VERSION_NAME+"\""
buildConfigField "String", "KEYMAN_VERSION_ENVIRONMENT", "\""+KEYMAN_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.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.
}
}
}
dependencies {
// 1.6.0-rc01 needed to resolve https://issuetracker.google.com/issues/238425626
implementation 'androidx.appcompat:appcompat:1.7.0'
implementation 'androidx.constraintlayout:constraintlayout:2.2.1'
// material:1.7.0 will need Gradle plugin 7.1.0+
implementation 'com.google.android.material:material:1.12.0'
implementation 'commons-io:commons-io:2.16.1'
implementation 'io.sentry:sentry-android:8.19.1'
implementation 'androidx.preference:preference:1.2.1'
implementation 'androidx.webkit:webkit:1.14.0'
// Robolectric
testImplementation 'androidx.test.ext:junit:1.2.1'
testImplementation 'org.robolectric:robolectric:4.14.1'
testImplementation 'androidx.test:core:1.6.1'
// Generate QR Codes
implementation ('com.github.kenglxn.QRGen:android:3.0.1') {
transitive = true
}
}
//Show deprecation compiler warnings
/*
allprojects {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:deprecation"
}
}*/