mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
* Move battery info to compose - always show voltage level and icons to match battery percentage Use tool text in preview, rather than actually set text value Simplify node info layout to avoid defining margins on everything * Move node position to Compose * Update hyperlink color to match previous value * Use compose preview in layout editor * Use compose preview in layout editor * Add simple preview for use in layout * Move last heard node info to Compose Clean up layout of node info * Move signal info to Compose and simplify bind * Prevent long coordinates from colliding with signal info * Move the rest of the node info card to compose Breaks the blinking feature when navigating from chat Wrap position to new line if overflow * Adjust layout and text sizing to closer match original * Use constraint layout for tighter display on busy nodes * Construct environment metrics so that there aren't trailing spaces if current is zero * Swap viewholder root for compose view rather than inflating layout Fix padding lost when changing out view holder root Intelligently update the list with only nodes that changed * Remove unused method, and adjust replacement method to match the same decimal precisions as before * Use previous string for denoting unknown node names * Mark unknown short name as non-translatable
277 lines
9.9 KiB
Groovy
277 lines
9.9 KiB
Groovy
plugins {
|
|
id 'com.android.application'
|
|
id 'kotlin-android'
|
|
id 'kotlin-parcelize'
|
|
id 'kotlinx-serialization'
|
|
id 'com.google.dagger.hilt.android'
|
|
id 'de.mobilej.unmock'
|
|
id 'com.google.protobuf'
|
|
id "com.google.devtools.ksp"
|
|
}
|
|
|
|
unMock {
|
|
keep "android.net.Uri"
|
|
keep "android.util.Base64"
|
|
}
|
|
|
|
def keystorePropertiesFile = rootProject.file("keystore.properties")
|
|
def keystoreProperties = new Properties()
|
|
if (keystorePropertiesFile.exists()) {
|
|
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
|
|
}
|
|
|
|
android {
|
|
namespace 'com.geeksville.mesh'
|
|
|
|
signingConfigs {
|
|
release {
|
|
keyAlias keystoreProperties['keyAlias']
|
|
keyPassword keystoreProperties['keyPassword']
|
|
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
|
|
storePassword keystoreProperties['storePassword']
|
|
}
|
|
}
|
|
compileSdk 34
|
|
defaultConfig {
|
|
applicationId "com.geeksville.mesh"
|
|
minSdkVersion 21 // The oldest emulator image I have tried is 22 (though 21 probably works)
|
|
targetSdk 33
|
|
versionCode 30224 // format is Mmmss (where M is 1+the numeric major number
|
|
versionName "2.2.24"
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
|
|
// per https://developer.android.com/studio/write/vector-asset-studio
|
|
vectorDrawables.useSupportLibrary = true
|
|
}
|
|
flavorDimensions = ['default']
|
|
productFlavors {
|
|
fdroid {
|
|
dimension = 'default'
|
|
dependenciesInfo {
|
|
includeInApk = false
|
|
}
|
|
}
|
|
google {
|
|
dimension = 'default'
|
|
if (useCrashlytics) {
|
|
apply plugin: 'com.google.gms.google-services'
|
|
apply plugin: 'com.google.firebase.crashlytics'
|
|
}
|
|
}
|
|
}
|
|
buildTypes {
|
|
release {
|
|
if (keystoreProperties['storeFile']) {
|
|
signingConfig signingConfigs.release
|
|
}
|
|
minifyEnabled true
|
|
shrinkResources true
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
}
|
|
debug {
|
|
pseudoLocalesEnabled true
|
|
}
|
|
}
|
|
defaultConfig {
|
|
// We have to list all translated languages here, because some of our libs have bogus languages that google play
|
|
// doesn't like and we need to strip them (gr)
|
|
resConfigs "bg", "cs", "de", "el", "en", "es", "fi", "fr", "fr-rHT", "ga", "hu", "is", "it", "iw", "ja", "ko", "nl", "nb", "pl", "pt", "pt-rBR", "ro", "ru", "sk", "sl", "sq", "sv", "tr", "zh", "uk"
|
|
|
|
ndk {
|
|
// abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
|
|
}
|
|
}
|
|
bundle {
|
|
language {
|
|
enableSplit false
|
|
}
|
|
}
|
|
buildFeatures {
|
|
viewBinding true
|
|
compose true
|
|
aidl true
|
|
buildConfig true
|
|
}
|
|
composeOptions {
|
|
kotlinCompilerExtensionVersion = "1.5.10"
|
|
}
|
|
// Configure the build-logic plugins to target JDK 17
|
|
// This matches the JDK used to build the project, and is not related to what is running on device.
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_17
|
|
targetCompatibility JavaVersion.VERSION_17
|
|
}
|
|
kotlinOptions {
|
|
jvmTarget = JavaVersion.VERSION_17.toString()
|
|
freeCompilerArgs += ['-opt-in=kotlin.RequiresOptIn']
|
|
}
|
|
lint {
|
|
abortOnError false
|
|
}
|
|
}
|
|
|
|
// per protobuf-gradle-plugin docs, this is recommended for android
|
|
protobuf {
|
|
protoc {
|
|
artifact = "com.google.protobuf:protoc:$protobuf_version"
|
|
}
|
|
generateProtoTasks {
|
|
all().each { task ->
|
|
task.builtins {
|
|
java {
|
|
// turned off for now so I can use json printing in debug panel
|
|
// use the smaller android version of the library
|
|
//option "lite"
|
|
}
|
|
kotlin {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// workaround for https://github.com/google/ksp/issues/1590
|
|
androidComponents {
|
|
onVariants(selector().all(), { variant ->
|
|
afterEvaluate {
|
|
def capName = variant.name.capitalize()
|
|
tasks.getByName("ksp${capName}Kotlin") {
|
|
setSource(tasks.getByName("generate${capName}Proto").outputs)
|
|
}
|
|
}
|
|
})
|
|
}
|
|
|
|
dependencies {
|
|
|
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
def appcompat_version = '1.6.1'
|
|
implementation "androidx.appcompat:appcompat:$appcompat_version"
|
|
// For loading and tinting drawables on older versions of the platform
|
|
implementation "androidx.appcompat:appcompat-resources:$appcompat_version"
|
|
implementation "androidx.emoji2:emoji2-emojipicker:1.4.0"
|
|
|
|
implementation 'androidx.core:core-ktx:1.12.0'
|
|
implementation 'androidx.fragment:fragment-ktx:1.6.2'
|
|
implementation 'androidx.cardview:cardview:1.0.0'
|
|
implementation 'androidx.recyclerview:recyclerview:1.3.0'
|
|
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
|
implementation 'com.google.android.material:material:1.11.0'
|
|
implementation 'androidx.viewpager2:viewpager2:1.0.0'
|
|
implementation 'androidx.datastore:datastore:1.0.0'
|
|
|
|
// Lifecycle
|
|
def lifecycle_version = '2.7.0'
|
|
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
|
|
implementation "androidx.lifecycle:lifecycle-viewmodel-compose:$lifecycle_version"
|
|
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version"
|
|
implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycle_version"
|
|
implementation "androidx.lifecycle:lifecycle-runtime-compose:$lifecycle_version"
|
|
implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version"
|
|
implementation "androidx.lifecycle:lifecycle-process:$lifecycle_version"
|
|
|
|
// Room
|
|
def room_version = '2.6.1'
|
|
implementation "androidx.room:room-runtime:$room_version"
|
|
annotationProcessor "androidx.room:room-compiler:$room_version"
|
|
ksp "androidx.room:room-compiler:$room_version"
|
|
// optional - Kotlin Extensions and Coroutines support for Room
|
|
implementation "androidx.room:room-ktx:$room_version"
|
|
// optional - Test helpers
|
|
testImplementation "androidx.room:room-testing:$room_version"
|
|
|
|
// Hilt
|
|
implementation "com.google.dagger:hilt-android:$hilt_version"
|
|
implementation "androidx.hilt:hilt-navigation-compose:1.2.0"
|
|
ksp "com.google.dagger:hilt-compiler:$hilt_version"
|
|
|
|
// Navigation
|
|
def nav_version = "2.7.7"
|
|
implementation "androidx.navigation:navigation-compose:$nav_version"
|
|
androidTestImplementation "androidx.navigation:navigation-testing:$nav_version"
|
|
|
|
// Compose
|
|
def composeBom = platform('androidx.compose:compose-bom:2024.02.01')
|
|
implementation composeBom
|
|
androidTestImplementation composeBom
|
|
implementation "androidx.constraintlayout:constraintlayout-compose:1.0.1"
|
|
|
|
implementation 'androidx.compose.material:material'
|
|
implementation 'androidx.activity:activity-compose'
|
|
implementation 'androidx.compose.runtime:runtime-livedata'
|
|
implementation "com.google.accompanist:accompanist-themeadapter-appcompat:0.34.0"
|
|
|
|
// Android Studio Preview support
|
|
implementation 'androidx.compose.ui:ui-tooling-preview'
|
|
debugImplementation 'androidx.compose.ui:ui-tooling'
|
|
|
|
// UI Tests
|
|
androidTestImplementation 'androidx.compose.ui:ui-test-junit4'
|
|
debugImplementation 'androidx.compose.ui:ui-test-manifest'
|
|
|
|
// Osmdroid & Maps
|
|
def osmdroid_version = '6.1.14'
|
|
implementation "org.osmdroid:osmdroid-android:$osmdroid_version"
|
|
implementation "org.osmdroid:osmdroid-wms:$osmdroid_version"
|
|
implementation("org.osmdroid:osmdroid-geopackage:$osmdroid_version") {
|
|
exclude group: 'com.j256.ormlite'
|
|
}
|
|
implementation 'com.github.MKergall:osmbonuspack:6.9.0'
|
|
implementation "mil.nga:mgrs:2.1.2"
|
|
|
|
testImplementation 'junit:junit:4.13.2'
|
|
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
|
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
|
|
|
|
// kotlin serialization
|
|
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3"
|
|
|
|
// rate this app
|
|
googleImplementation 'com.suddenh4x.ratingdialog:awesome-app-rating:2.7.0'
|
|
|
|
// Coroutines
|
|
def coroutines_version = '1.8.0'
|
|
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines_version"
|
|
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-guava:$coroutines_version"
|
|
|
|
// For now I'm not using javalite, because I want JSON printing
|
|
implementation "com.google.protobuf:protobuf-kotlin:$protobuf_version"
|
|
|
|
// For UART access
|
|
implementation 'com.github.mik3y:usb-serial-for-android:3.7.0'
|
|
|
|
// For Firebase Crashlytics & Analytics
|
|
googleImplementation platform('com.google.firebase:firebase-bom:32.7.3')
|
|
googleImplementation 'com.google.firebase:firebase-crashlytics'
|
|
googleImplementation 'com.google.firebase:firebase-analytics'
|
|
|
|
// barcode support
|
|
// per https://github.com/journeyapps/zxing-android-embedded#older-sdk-versions for minSdkVersion 21
|
|
implementation('com.journeyapps:zxing-android-embedded:4.3.0') { transitive = false }
|
|
//noinspection GradleDependency
|
|
implementation 'com.google.zxing:core:3.3.0' // <-- don't update
|
|
|
|
def work_version = '2.9.0'
|
|
// Work Request - used to delay boot event handling
|
|
implementation "androidx.work:work-runtime-ktx:$work_version"
|
|
|
|
implementation "androidx.core:core-splashscreen:1.0.1"
|
|
|
|
// CompletableFuture backport for API 14+
|
|
implementation 'net.sourceforge.streamsupport:streamsupport-minifuture:1.7.4'
|
|
|
|
// App intro
|
|
implementation 'com.github.AppIntro:AppIntro:6.3.1'
|
|
|
|
// MQTT
|
|
implementation "org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.2.5"
|
|
}
|
|
|
|
ksp {
|
|
// arg("room.generateKotlin", "true")
|
|
arg("room.schemaLocation", "$projectDir/schemas")
|
|
}
|
|
|
|
repositories {
|
|
maven { url "https://jitpack.io" }
|
|
}
|