spiegel-keyman/android/KMEA/app/build.gradle
Eberhard Beilharz d87d104808
maint(android): update Android Target API to 36
This change updates the Android Target API to 36 to satisfy the upcoming
annual Play Store Aug 31 requirement. It updates Keyman for Android to
use API level 36 by changing the compileSdk and targetSdkVersion
properties to 36.

Also update `compileSdkVersion` and some reformatting in `README.md`.

Changes made by AI (Gemini 3 Flash Preview).

Fixes: #16279
Build-bot: release:android
2026-07-24 10:55:45 +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 36
namespace "com.keyman.engine"
buildFeatures {
// needed for custom BuildConfigField values in defaultConfig
buildConfig = true
}
defaultConfig {
minSdkVersion 21
targetSdkVersion 36
// 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"
}
}*/