mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
fix(build): resolve all actionable compile-time warnings (#5058)
This commit is contained in:
parent
3d139d32fd
commit
929e273978
10 changed files with 34 additions and 17 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue