- MainActivity: remove isServer check — relay buttons always enabled when connected, regardless of device mode (fixes silently broken buttons when device mode accidentally set to 'client') - client.cpp: invert HS-S43A touch sensor readings (!tActive) — sensors are active LOW - build.gradle: bump versionCode 2, versionName 1.1 - platformio.ini: use stable by-id port for server ESP32 - firmware/*.bin: rebuilt with LED signaling and touch fixes
92 lines
No EOL
2.6 KiB
Groovy
92 lines
No EOL
2.6 KiB
Groovy
plugins {
|
|
id 'com.android.application'
|
|
id 'org.jetbrains.kotlin.android'
|
|
}
|
|
|
|
def signingPropsFile = rootProject.file('signing.properties')
|
|
def hasSigningConfig = signingPropsFile.exists()
|
|
|
|
android {
|
|
namespace 'nl.eddydevink.sylda'
|
|
compileSdk 34
|
|
|
|
if (hasSigningConfig) {
|
|
def props = new Properties()
|
|
props.load(new FileInputStream(signingPropsFile))
|
|
|
|
signingConfigs {
|
|
release {
|
|
storeFile rootProject.file(props['KEYSTORE_PATH'])
|
|
storePassword props['KEYSTORE_PASSWORD']
|
|
keyAlias props['KEY_ALIAS']
|
|
keyPassword props['KEY_PASSWORD']
|
|
}
|
|
}
|
|
}
|
|
|
|
defaultConfig {
|
|
applicationId "nl.eddydevink.sylda"
|
|
minSdk 26
|
|
targetSdk 34
|
|
versionCode 2
|
|
versionName "1.1"
|
|
buildConfigField "String", "BUILD_NUMBER", "\"${new java.text.SimpleDateFormat("yyyyMMddHHmmss").format(new Date())}\""
|
|
}
|
|
|
|
buildFeatures {
|
|
buildConfig true
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
if (hasSigningConfig) {
|
|
signingConfig signingConfigs.release
|
|
}
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
}
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_17
|
|
targetCompatibility JavaVersion.VERSION_17
|
|
}
|
|
kotlinOptions {
|
|
jvmTarget = '17'
|
|
}
|
|
}
|
|
|
|
task generateSylDaVersions {
|
|
def versionFile = rootProject.file('../version.txt')
|
|
def outputFile = file('src/main/java/nl/eddydevink/sylda/SylDaVersions.kt')
|
|
|
|
inputs.file(versionFile)
|
|
outputs.file(outputFile)
|
|
|
|
doLast {
|
|
def versions = [:]
|
|
versionFile.eachLine { line ->
|
|
def parts = line.trim().split('=')
|
|
if (parts.length == 2) versions[parts[0].trim()] = parts[1].trim()
|
|
}
|
|
outputFile.text = """// Auto-generated from version.txt — DO NOT EDIT
|
|
package nl.eddydevink.sylda
|
|
|
|
object SylDaVersions {
|
|
const val SERVER = "${versions.server}"
|
|
const val CLIENT = "${versions.client}"
|
|
}
|
|
"""
|
|
}
|
|
}
|
|
preBuild.dependsOn generateSylDaVersions
|
|
|
|
dependencies {
|
|
implementation 'androidx.core:core-ktx:1.12.0'
|
|
implementation 'androidx.appcompat:appcompat:1.6.1'
|
|
implementation 'io.github.dkaukov:esp32-flash-lib:1.1.17'
|
|
implementation 'com.eclipsesource.minimal-json:minimal-json:0.9.5'
|
|
implementation 'org.slf4j:slf4j-nop:2.0.16'
|
|
implementation 'androidx.security:security-crypto:1.1.0-alpha06'
|
|
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.7.0'
|
|
} |