diff --git a/.github/workflows/publish-packages.yml b/.github/workflows/publish-packages.yml
deleted file mode 100644
index 3d20ec9e2..000000000
--- a/.github/workflows/publish-packages.yml
+++ /dev/null
@@ -1,36 +0,0 @@
-name: Publish Packages
-
-on:
- release:
- types: [created]
- workflow_dispatch:
-
-jobs:
- publish:
- runs-on: ubuntu-latest
- permissions:
- contents: read
- packages: write
-
- steps:
- - name: Checkout code
- uses: actions/checkout@v6
- with:
- submodules: 'recursive'
-
- - name: Set up JDK 21
- uses: actions/setup-java@v5
- with:
- java-version: '21'
- distribution: 'jetbrains'
-
- - name: Setup Gradle
- uses: gradle/actions/setup-gradle@v5
- with:
- cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
-
- - name: Publish to GitHub Packages
- run: ./gradlew :core:api:publish :core:model:publish :core:proto:publish
- env:
- GITHUB_ACTOR: ${{ github.actor }}
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/gradle/publishing.gradle.kts b/gradle/publishing.gradle.kts
index 6fe834ee8..d9a52f93e 100644
--- a/gradle/publishing.gradle.kts
+++ b/gradle/publishing.gradle.kts
@@ -14,19 +14,19 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-import java.io.FileInputStream
import java.util.Properties
project.pluginManager.apply("maven-publish")
-val configProperties = Properties()
-val configFile = rootProject.file("config.properties")
-if (configFile.exists()) {
- FileInputStream(configFile).use { configProperties.load(it) }
-}
-
-val versionBase = configProperties.getProperty("VERSION_NAME_BASE") ?: "0.0.0-SNAPSHOT"
-val appVersion = System.getenv("VERSION_NAME") ?: versionBase
-
-project.version = appVersion
project.group = "org.meshtastic"
+
+if (project.version == "unspecified") {
+ val props = Properties().apply {
+ rootProject.file("config.properties").takeIf { it.exists() }?.inputStream()?.use { load(it) }
+ }
+
+ project.version = System.getenv("VERSION")
+ ?: System.getenv("VERSION_NAME")
+ ?: props.getProperty("VERSION_NAME_BASE")
+ ?: "0.0.0-SNAPSHOT"
+}
diff --git a/mesh_service_example/build.gradle.kts b/mesh_service_example/build.gradle.kts
index af2a04641..8b083656a 100644
--- a/mesh_service_example/build.gradle.kts
+++ b/mesh_service_example/build.gradle.kts
@@ -36,12 +36,10 @@ configure {
testOptions { unitTests.isReturnDefaultValues = true }
}
-val meshtasticVersion = "main-SNAPSHOT"
-
dependencies {
- implementation("com.github.meshtastic.Meshtastic-Android:core-api:$meshtasticVersion")
- implementation("com.github.meshtastic.Meshtastic-Android:core-model:$meshtasticVersion")
- implementation("com.github.meshtastic.Meshtastic-Android:core-proto:$meshtasticVersion")
+ implementation(projects.core.api)
+ implementation(projects.core.model)
+ implementation(projects.core.proto)
implementation(libs.androidx.activity.compose)
implementation(libs.androidx.lifecycle.viewmodel.compose)
diff --git a/mesh_service_example/src/main/AndroidManifest.xml b/mesh_service_example/src/main/AndroidManifest.xml
index cfa4623bc..b8ffa4cae 100644
--- a/mesh_service_example/src/main/AndroidManifest.xml
+++ b/mesh_service_example/src/main/AndroidManifest.xml
@@ -5,6 +5,8 @@
+
+
= Build.VERSION_CODES.TIRAMISU) {
+ packageManager.queryIntentServices(intent, PackageManager.ResolveInfoFlags.of(0))
+ } else {
+ @Suppress("DEPRECATION")
+ packageManager.queryIntentServices(intent, 0)
+ }
+
+ if (resolveInfo.isNotEmpty()) {
+ val serviceInfo = resolveInfo[0].serviceInfo
+ intent.setClassName(serviceInfo.packageName, serviceInfo.name)
+ Log.i(TAG, "Found service in package: ${serviceInfo.packageName}")
+ } else {
+ Log.w(TAG, "No service found for action com.geeksville.mesh.Service. Falling back to default.")
+ intent.setClassName("com.geeksville.mesh", "com.geeksville.mesh.service.MeshService")
+ }
+
val success = bindService(intent, serviceConnection, BIND_AUTO_CREATE)
if (!success) {
Log.e(TAG, "bindService returned false")
}
} catch (e: SecurityException) {
- Log.e(TAG, "SecurityException while binding", e)
+ Log.e(TAG, "SecurityException while binding: ${e.message}")
}
}