libreoffice-online/android/app/build.gradle.in
Rash419 f0ea15a9b9 android: add ndkVersion in build.gradle
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I7b7c716be067859e72c21e07716db7622a116bf6
2023-08-31 13:12:22 +02:00

97 lines
3.2 KiB
Groovy

apply plugin: 'com.android.application'
// buildhost settings - paths and the like
apply from: 'appSettings.gradle'
android {
compileSdkVersion 33
buildDir = "${rootProject.getBuildDir()}/app"
ndkVersion "20.1.5948944"
defaultConfig {
// applicationId, versionCode and versionName are defined in appSettings.gradle
minSdkVersion 21
targetSdkVersion 33
resValue "string", "app_name", "${liboAppName}"
resValue "string", "vendor", "${liboVendor}"
resValue "string", "info_url", "${liboInfoURL}"
resValue "string", "online_version_hash", "${liboOVersionHash}"
resValue "string", "core_version_hash", "${liboCoreVersionHash}"
resValue "string", "image_draw_header", "@drawable/drawer_header"
manifestPlaceholders = [ appIcon: "${liboLauncherIcon}" ]
buildConfigField "boolean", "APP_HAS_BRANDING", "${liboHasBranding}"
}
splits {
abi {
enable true
reset ()
include @ANDROID_ABI_SPLIT@
}
}
lintOptions {
disable 'MissingTranslation', 'ExtraTranslation'
}
buildTypes {
debug {
resValue "string", "app_name", "${liboAppName} Debug"
applicationIdSuffix '.debug'
versionNameSuffix '-debug'
debuggable true
}
release {
if (file("src/main/res/drawable/drawer_header_brand.png").exists()) {
resValue "string", "image_draw_header", "@drawable/drawer_header_brand"
}
minifyEnabled false // FIXME disabled before we get a good proguardRules for callFakeWebsocketOnMessage calling from C++
shrinkResources false // FIXME cannot be enabled when minifyEnabled is turned off
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.core:core:1.9.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.recyclerview:recyclerview:1.3.1'
implementation 'com.google.android.material:material:1.6.1'
implementation 'com.google.android.play:core:1.10.3'
implementation 'androidx.preference:preference:1.2.1'
implementation project(path: ':lib')
// https://stackoverflow.com/questions/75263047/duplicate-class-in-kotlin-android
constraints {
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.0") {
because("kotlin-stdlib-jdk7 is now a part of kotlin-stdlib")
}
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.0") {
because("kotlin-stdlib-jdk8 is now a part of kotlin-stdlib")
}
}
}
tasks.register('copyBrandFiles', Copy) {
from "${liboBrandingDir}/android"
into "src/main/res"
}
afterEvaluate {
if (!project.ext.liboHasBranding.equals("true") || !file("${liboBrandingDir}").exists()) {
copyBrandFiles.enabled = false
}
preBuild.dependsOn copyBrandFiles
}