mirror of
https://github.com/home-assistant/android.git
synced 2025-07-20 16:47:20 +00:00
Bump target API to 36 🚀🚀🚀 (#5556)
* Fix target SDK to 35 for Robolectric * Bump changelog
This commit is contained in:
@ -1,16 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<changelog xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:ignore="MissingDefaultResource">
|
||||
<release version="2025.7.2 - Main" versioncode="3">
|
||||
<release version="2025.7.3 - Main" versioncode="3">
|
||||
<change>Health Connect sensors now require permission to access health data in the background</change>
|
||||
<change>Gestures for the main Home Assistant UI can now be changed</change>
|
||||
<change>Downloading snapshots from camera card is now working</change>
|
||||
<change>Bug fixes and dependency updates</change>
|
||||
</release>
|
||||
<release version="2025.7.2 - Wear" versioncode="2">
|
||||
<release version="2025.7.3 - Wear" versioncode="2">
|
||||
<change>Bug fixes and dependency updates</change>
|
||||
</release>
|
||||
<release version="2025.7.2 - Automotive" versioncode="1">
|
||||
<release version="2025.7.3 - Automotive" versioncode="1">
|
||||
<change>Gestures for the native (dashboard) Home Assistant UI can now be changed</change>
|
||||
<change>Downloading snapshots from camera card is now working</change>
|
||||
<change>Bug fixes and dependency updates</change>
|
||||
|
@ -2,6 +2,7 @@ import com.android.build.api.dsl.ApplicationExtension
|
||||
import com.android.build.api.dsl.CommonExtension
|
||||
import com.android.build.api.dsl.LibraryExtension
|
||||
import io.homeassistant.companion.android.getPluginId
|
||||
import java.io.File
|
||||
import org.gradle.api.Plugin
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.tasks.testing.Test
|
||||
@ -31,6 +32,11 @@ class AndroidCommonConventionPlugin : Plugin<Project> {
|
||||
apply(plugin = libs.plugins.ksp.getPluginId())
|
||||
apply(plugin = libs.plugins.hilt.getPluginId())
|
||||
|
||||
// We create a resources directory to put `robolectric.properties` and set the SDK version
|
||||
// inspired from https://github.com/PaulWoitaschek/Voice/commit/55505083dd3c3ecfe7b28192d7e9664ebb066399
|
||||
// More info https://github.com/robolectric/robolectric/issues/10103
|
||||
val testResourcesDir = file("build/generated/testResources").apply { mkdirs() }
|
||||
|
||||
fun CommonExtension<*, *, *, *, *, *>.configure() {
|
||||
compileSdk = libs.versions.androidSdk.compile.get().toInt()
|
||||
|
||||
@ -62,6 +68,12 @@ class AndroidCommonConventionPlugin : Plugin<Project> {
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
named("test") {
|
||||
resources.srcDir(testResourcesDir)
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType<Test> {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
@ -130,6 +142,11 @@ class AndroidCommonConventionPlugin : Plugin<Project> {
|
||||
|
||||
is LibraryExtension -> extensions.configure<LibraryExtension> { configure() }
|
||||
}
|
||||
|
||||
File(testResourcesDir, "robolectric.properties").apply {
|
||||
val sdkVersion = libs.versions.robolectric.target.sdk.get().toInt()
|
||||
writeText("sdk=$sdkVersion")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ androidBeaconLibrary = "2.21.1"
|
||||
androidGradlePlugin = "8.10.1"
|
||||
androidSdk-compile = "36"
|
||||
androidSdk-min = "21"
|
||||
androidSdk-target = "34"
|
||||
androidSdk-target = "36"
|
||||
androidSdk-automotive-min = "29"
|
||||
androidSdk-wear-min = "26"
|
||||
androidSdk-wear-target = "34"
|
||||
@ -66,7 +66,8 @@ preference-ktx = "1.2.1"
|
||||
recyclerview = "1.4.0"
|
||||
reorderable = "2.5.1"
|
||||
retrofit-bom = "3.0.0"
|
||||
robolectric = "4.15.1"
|
||||
robolectric = "4.15.1" # Check if robolectric supports a more recent version of the SDK on each update
|
||||
robolectric-target-sdk = "35"
|
||||
room = "2.7.2"
|
||||
runtimeLint = "1.8.3"
|
||||
screenshot = "0.0.1-alpha09"
|
||||
|
Reference in New Issue
Block a user