Skip to content

Commit 50c08dd

Browse files
committed
Migrate to alpha04 (from snapshot build)
1 parent 8ea310f commit 50c08dd

File tree

6 files changed

+13
-21
lines changed

6 files changed

+13
-21
lines changed

gradle/libs.versions.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ playServicesWearable = "19.0.0"
6363
protolayout = "1.2.1"
6464
recyclerview = "1.4.0"
6565
# @keep
66-
androidx-xr-arcore = "1.0.0-SNAPSHOT"
67-
androidx-xr-scenecore = "1.0.0-SNAPSHOT"
68-
androidx-xr-compose = "1.0.0-SNAPSHOT"
66+
androidx-xr-arcore = "1.0.0-alpha04"
67+
androidx-xr-scenecore = "1.0.0-alpha04"
68+
androidx-xr-compose = "1.0.0-alpha04"
6969
targetSdk = "34"
7070
tiles = "1.4.1"
7171
version-catalog-update = "1.0.0"

settings.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
val snapshotVersion : String? = "13432914"
1+
val snapshotVersion : String? = System.getenv("COMPOSE_SNAPSHOT_ID")
22

33
pluginManagement {
44
repositories {

xr/build.gradle.kts

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,12 @@ android {
2525
buildFeatures {
2626
compose = true
2727
}
28-
lint {
29-
lintOptions.disable += "RestrictedApi"
30-
}
3128
}
3229

3330
dependencies {
34-
implementation(libs.androidx.xr.arcore) {
35-
exclude(module = "impress")
36-
}
37-
implementation(libs.androidx.xr.scenecore) {
38-
exclude(module = "impress")
39-
}
40-
implementation(libs.androidx.xr.compose) {
41-
exclude(module = "impress")
42-
}
43-
44-
implementation("com.google.ar:impress:0.0.2")
31+
implementation(libs.androidx.xr.arcore)
32+
implementation(libs.androidx.xr.scenecore)
33+
implementation(libs.androidx.xr.compose)
4534

4635
implementation(libs.androidx.activity.ktx)
4736
implementation(libs.guava)

xr/src/main/java/com/example/xr/arcore/Anchors.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import androidx.xr.scenecore.AnchorEntity
2929
import androidx.xr.scenecore.Entity
3030
import androidx.xr.scenecore.scene
3131

32+
@Suppress("RestrictedApi") // b/416288516 - session.config and session.configure() are incorrectly restricted
3233
fun configureAnchoring(session: Session) {
3334
// [START androidxr_arcore_anchoring_configure]
3435
val newConfig = session.config.copy(

xr/src/main/java/com/example/xr/arcore/Hands.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,14 @@ import androidx.xr.runtime.Session
2525
import androidx.xr.runtime.SessionConfigureConfigurationNotSupported
2626
import androidx.xr.runtime.SessionConfigurePermissionsNotGranted
2727
import androidx.xr.runtime.SessionConfigureSuccess
28-
import androidx.xr.runtime.internal.GltfEntity
2928
import androidx.xr.runtime.math.Pose
3029
import androidx.xr.runtime.math.Quaternion
3130
import androidx.xr.runtime.math.Vector3
31+
import androidx.xr.scenecore.GltfModelEntity
3232
import androidx.xr.scenecore.scene
3333
import kotlinx.coroutines.launch
3434

35+
@Suppress("RestrictedApi") // b/416288516 - session.config and session.configure() are incorrectly restricted
3536
fun ComponentActivity.configureSession(session: Session) {
3637
// [START androidxr_arcore_hand_configure]
3738
val newConfig = session.config.copy(
@@ -66,7 +67,7 @@ fun ComponentActivity.collectHands(session: Session) {
6667

6768
fun ComponentActivity.renderPlanetAtHandPalm(leftHandState: Hand.State) {
6869
val session: Session = null!!
69-
val palmEntity: GltfEntity = null!!
70+
val palmEntity: GltfModelEntity = null!!
7071
// [START androidxr_arcore_hand_entityAtHandPalm]
7172
val palmPose = leftHandState.handJoints[HandJointType.PALM] ?: return
7273

@@ -86,7 +87,7 @@ fun ComponentActivity.renderPlanetAtHandPalm(leftHandState: Hand.State) {
8687

8788
fun ComponentActivity.renderPlanetAtFingerTip(rightHandState: Hand.State) {
8889
val session: Session = null!!
89-
val indexFingerEntity: GltfEntity = null!!
90+
val indexFingerEntity: GltfModelEntity = null!!
9091

9192
// [START androidxr_arcore_hand_entityAtIndexFingerTip]
9293
val tipPose = rightHandState.handJoints[HandJointType.INDEX_TIP] ?: return

xr/src/main/java/com/example/xr/arcore/Planes.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import androidx.xr.runtime.math.Pose
2626
import androidx.xr.runtime.math.Ray
2727
import androidx.xr.scenecore.scene
2828

29+
@Suppress("RestrictedApi") // b/416288516 - session.config and session.configure() are incorrectly restricted
2930
fun configurePlaneTracking(session: Session) {
3031
// [START androidxr_arcore_planetracking_configure]
3132
val newConfig = session.config.copy(

0 commit comments

Comments
 (0)