diff --git a/blessed/build.gradle b/blessed/build.gradle index 88219a0..217f4c2 100644 --- a/blessed/build.gradle +++ b/blessed/build.gradle @@ -22,14 +22,20 @@ android { } } - kotlinOptions { - jvmTarget = "1.8" - } - compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } + + kotlinOptions { + jvmTarget = '1.8' + } + + testOptions { + unitTests { + includeAndroidResources = true + } + } } dependencies { diff --git a/blessed/src/main/java/com/welie/blessed/BluetoothPeripheral.kt b/blessed/src/main/java/com/welie/blessed/BluetoothPeripheral.kt index d6a2c6f..a9b1588 100644 --- a/blessed/src/main/java/com/welie/blessed/BluetoothPeripheral.kt +++ b/blessed/src/main/java/com/welie/blessed/BluetoothPeripheral.kt @@ -48,7 +48,7 @@ import kotlin.coroutines.suspendCoroutine * It takes care of operation queueing, some Android bugs, and provides several convenience functions. */ @SuppressLint("MissingPermission") -@Suppress("unused") +@Suppress("unused", "deprecation") class BluetoothPeripheral internal constructor( private val context: Context, private var device: BluetoothDevice, diff --git a/build.gradle b/build.gradle index 9559910..583b322 100644 --- a/build.gradle +++ b/build.gradle @@ -4,29 +4,3 @@ plugins { id 'com.android.library' version '8.1.2' apply false id 'org.jetbrains.kotlin.android' version '1.9.10' apply false } - -//// Top-level build file where you can add configuration options common to all sub-projects/modules. -// -//buildscript { -// ext.kotlin_version = '1.9.10' -// repositories { -// google() -// mavenCentral() -// } -// -// dependencies { -// classpath 'com.android.tools.build:gradle:8.1.2' -// classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" -// -// // NOTE: Do not place your application dependencies here; they belong -// // in the individual module build.gradle files -// } -//} -// -//allprojects { -// repositories { -// google() -// mavenCentral() -// maven { url 'https://jitpack.io' } -// } -//} diff --git a/gradle.properties b/gradle.properties index 7da6579..a2e90d8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,12 +6,20 @@ # http://www.gradle.org/docs/current/userguide/build_environment.html # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. -android.enableJetifier=true -android.useAndroidX=true -org.gradle.jvmargs=-Xmx1536m +org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true +# AndroidX package structure to make it clearer which packages are bundled with the +# Android operating system, and which are packaged with your app's APK +# https://developer.android.com/topic/libraries/support-library/androidx-rn +android.useAndroidX=true +# Kotlin code style for this project: "official" or "obsolete": kotlin.code.style=official - +# Enables namespacing of each library's R class so that its R class includes only the +# resources declared in the library itself and none from the library's dependencies, +# thereby reducing the size of the R class for that library +android.nonTransitiveRClass=true +android.defaults.buildfeatures.buildconfig=true +android.nonFinalResIds=false \ No newline at end of file