2019-02-12 03:13:16 -06:00
|
|
|
apply plugin: 'com.android.application'
|
|
|
|
|
2019-02-15 06:38:32 -06:00
|
|
|
// buildhost settings - paths and the like
|
2019-07-11 04:29:13 -05:00
|
|
|
apply from: 'appSettings.gradle'
|
2019-02-15 06:38:32 -06:00
|
|
|
|
2019-02-12 03:13:16 -06:00
|
|
|
android {
|
2023-06-30 04:41:07 -05:00
|
|
|
compileSdkVersion 33
|
2020-04-19 11:09:41 -05:00
|
|
|
buildDir = "${rootProject.getBuildDir()}/app"
|
2019-12-11 13:12:45 -06:00
|
|
|
|
2019-02-12 03:13:16 -06:00
|
|
|
defaultConfig {
|
2019-07-11 04:29:13 -05:00
|
|
|
// applicationId, versionCode and versionName are defined in appSettings.gradle
|
2019-02-12 03:13:16 -06:00
|
|
|
minSdkVersion 21
|
2023-06-30 04:41:07 -05:00
|
|
|
targetSdkVersion 33
|
2021-01-29 14:36:53 -06:00
|
|
|
|
|
|
|
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}"
|
2021-01-29 14:44:08 -06:00
|
|
|
}
|
|
|
|
splits {
|
|
|
|
abi {
|
|
|
|
enable true
|
|
|
|
|
|
|
|
reset ()
|
|
|
|
include @ANDROID_ABI_SPLIT@
|
2021-01-29 14:36:53 -06:00
|
|
|
}
|
2019-02-12 03:13:16 -06:00
|
|
|
}
|
2019-12-11 13:12:45 -06:00
|
|
|
|
2020-01-02 08:46:05 -06:00
|
|
|
lintOptions {
|
2020-03-19 02:58:46 -05:00
|
|
|
disable 'MissingTranslation', 'ExtraTranslation'
|
2020-01-02 08:46:05 -06:00
|
|
|
}
|
|
|
|
|
2019-02-12 03:13:16 -06:00
|
|
|
buildTypes {
|
|
|
|
debug {
|
2019-04-16 05:53:38 -05:00
|
|
|
resValue "string", "app_name", "${liboAppName} Debug"
|
2019-06-18 07:41:42 -05:00
|
|
|
applicationIdSuffix '.debug'
|
|
|
|
versionNameSuffix '-debug'
|
2019-02-21 03:16:32 -06:00
|
|
|
debuggable true
|
2019-02-12 03:13:16 -06:00
|
|
|
}
|
|
|
|
release {
|
2020-04-13 14:28:13 -05:00
|
|
|
if (file("src/main/res/drawable/drawer_header_brand.png").exists()) {
|
|
|
|
resValue "string", "image_draw_header", "@drawable/drawer_header_brand"
|
2019-02-12 03:13:16 -06:00
|
|
|
}
|
2021-01-29 14:36:53 -06:00
|
|
|
|
2019-06-19 15:27:09 -05:00
|
|
|
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
|
2019-02-12 03:13:16 -06:00
|
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'),
|
2019-03-22 11:24:47 -05:00
|
|
|
'proguard-rules.pro'
|
2019-02-12 03:13:16 -06:00
|
|
|
}
|
|
|
|
}
|
2019-12-11 13:12:45 -06:00
|
|
|
|
|
|
|
compileOptions {
|
|
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
|
|
}
|
2019-02-12 03:13:16 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
2020-05-06 07:15:32 -05:00
|
|
|
implementation 'androidx.appcompat:appcompat:1.1.0'
|
2019-12-13 08:47:37 -06:00
|
|
|
implementation 'androidx.core:core:1.0.2'
|
2019-02-12 03:13:16 -06:00
|
|
|
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
|
2019-03-22 11:24:47 -05:00
|
|
|
implementation 'androidx.recyclerview:recyclerview:1.0.0'
|
|
|
|
implementation 'com.google.android.material:material:1.1.0-alpha04'
|
2020-09-25 10:49:17 -05:00
|
|
|
implementation 'com.google.android.play:core:1.8.0'
|
2019-12-11 13:12:45 -06:00
|
|
|
|
2019-04-23 07:14:52 -05:00
|
|
|
//before changing the version please see https://issuetracker.google.com/issues/111662669
|
|
|
|
implementation 'androidx.preference:preference:1.1.0-alpha01'
|
2019-07-11 04:29:13 -05:00
|
|
|
implementation project(path: ':lib')
|
2019-02-12 03:13:16 -06:00
|
|
|
}
|
2020-04-20 09:41:50 -05:00
|
|
|
|
2020-04-21 15:41:58 -05:00
|
|
|
task copyBrandFiles(type: Copy) {
|
|
|
|
from "${liboBrandingDir}/android"
|
|
|
|
into "src/main/res"
|
|
|
|
}
|
|
|
|
|
2020-04-20 09:41:50 -05:00
|
|
|
afterEvaluate {
|
2020-04-21 15:41:58 -05:00
|
|
|
if (!project.ext.liboHasBranding.equals("true") || !file("${liboBrandingDir}").exists()) {
|
2020-04-21 16:23:59 -05:00
|
|
|
copyBrandFiles.enabled = false
|
2020-04-21 15:41:58 -05:00
|
|
|
}
|
|
|
|
|
2020-04-21 17:11:13 -05:00
|
|
|
preBuild.dependsOn copyBrandFiles
|
2020-04-20 09:41:50 -05:00
|
|
|
}
|