fix(build): resolve all actionable compile-time warnings (#5058)

This commit is contained in:
James Rich 2026-04-10 17:42:30 -05:00 committed by GitHub
parent 3d139d32fd
commit 929e273978
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 34 additions and 17 deletions

View file

@ -33,6 +33,10 @@ configure<com.android.build.api.dsl.LibraryExtension> {
publishing { singleVariant("release") { withSourcesJar() } }
}
// Suppress dep-ann warnings from AIDL-generated code where Javadoc @deprecated
// doesn't produce @Deprecated annotations on Stub/Proxy override methods.
tasks.withType<JavaCompile>().configureEach { options.compilerArgs.add("-Xlint:-dep-ann") }
// Map the Android component to a Maven publication
afterEvaluate {
publishing {

View file

@ -27,6 +27,7 @@ import org.meshtastic.core.repository.ServiceRepository
* in `MeshService`.
*/
@Single(binds = [ServiceRepository::class, AndroidServiceRepository::class])
@Suppress("DEPRECATION") // IMeshService is deprecated but still required for AIDL binding
class AndroidServiceRepository : ServiceRepositoryImpl() {
var meshService: IMeshService? = null
private set

View file

@ -49,7 +49,8 @@ import org.meshtastic.core.repository.ServiceBroadcasts
import org.meshtastic.core.repository.ServiceRepository
import org.meshtastic.proto.PortNum
@Suppress("TooManyFunctions", "LargeClass")
// IMeshService is deprecated but still required for AIDL binding
@Suppress("TooManyFunctions", "LargeClass", "DEPRECATION")
class MeshService : Service() {
private val radioInterfaceService: RadioInterfaceService by inject()
@ -88,7 +89,6 @@ class MeshService : Service() {
fun createIntent(context: Context) = Intent(context, MeshService::class.java)
fun changeDeviceAddress(context: Context, service: IMeshService, address: String?) {
@Suppress("DEPRECATION") // Internal use: routes address change through AIDL binder
service.setDeviceAddress(address)
startService(context)
}

View file

@ -29,6 +29,7 @@ import org.meshtastic.core.common.util.SequentialJob
/** A Activity-lifecycle-aware [ServiceClient] that binds [MeshService] once the Activity is started. */
@Factory
@Suppress("DEPRECATION") // IMeshService is deprecated but still required for AIDL binding
class MeshServiceClient(
private val context: Context,
private val serviceRepository: AndroidServiceRepository,

View file

@ -14,6 +14,8 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
@file:Suppress("DEPRECATION") // IMeshService is deprecated but still required for AIDL binding
package org.meshtastic.core.service.testing
import org.meshtastic.core.model.DataPacket