Fixed
Status Update
Comments
il...@google.com <il...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit ef1265ecca338a7bb3929def8085236d45ace500
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Thu Jun 29 11:16:59 2023
Update Room Gradle plugin APIs to not always require per-variant configurations.
Most Room users don't have per-variant schemas which means having per-variant schema directories can decrease the user experience, specially as users migrate from the current annotation processor option approach to the plugin as per-variant directories where also not needed then if not necessary. This change updates the plugin APIs to accept a global location for all variants without creating multiple directories, enabling smoother migrations but also flexible enough to configure flavors or build type schemas while still retaining the benefits of the plugin (reproducible and cacheable builds).
The API is updated to contain overloads for configuring a single schema location or per-variant locations:
```
room {
// For all variants
schemaLocation("$projectDir/schemas/")
// For a specific variant
schemaLocation("variantName", ("$projectDir/schemas/variantName")
}
```
and an example usage assuming two build flavors: ‘demo’ and ‘full’ and the two default build types ‘debug’ and ‘release’:
```
room {
// Applies to demoDebug only
schemaLocation("demoDebug", ("$projectDir/schemas/demoDebug")
// Applies to demoDebug and demoRelease
schemaLocation("demo", ("$projectDir/schemas/demo")
// Applies to demoDebug and fullDebug
schemaLocation("debug", ("$projectDir/schemas/debug")
}
```
Bug: 278266663
Test: RoomGradlePluginTest
Change-Id: I09d6f9a77d3737bef2ce73193344a8b31f5059a8
M room/room-gradle-plugin/src/main/java/androidx/room/gradle/RoomExtension.kt
M room/room-gradle-plugin/src/main/java/androidx/room/gradle/RoomGradlePlugin.kt
M room/room-gradle-plugin/src/test/java/androidx/room/gradle/RoomGradlePluginTest.kt
https://android-review.googlesource.com/2644711
Branch: androidx-main
commit ef1265ecca338a7bb3929def8085236d45ace500
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Thu Jun 29 11:16:59 2023
Update Room Gradle plugin APIs to not always require per-variant configurations.
Most Room users don't have per-variant schemas which means having per-variant schema directories can decrease the user experience, specially as users migrate from the current annotation processor option approach to the plugin as per-variant directories where also not needed then if not necessary. This change updates the plugin APIs to accept a global location for all variants without creating multiple directories, enabling smoother migrations but also flexible enough to configure flavors or build type schemas while still retaining the benefits of the plugin (reproducible and cacheable builds).
The API is updated to contain overloads for configuring a single schema location or per-variant locations:
```
room {
// For all variants
schemaLocation("$projectDir/schemas/")
// For a specific variant
schemaLocation("variantName", ("$projectDir/schemas/variantName")
}
```
and an example usage assuming two build flavors: ‘demo’ and ‘full’ and the two default build types ‘debug’ and ‘release’:
```
room {
// Applies to demoDebug only
schemaLocation("demoDebug", ("$projectDir/schemas/demoDebug")
// Applies to demoDebug and demoRelease
schemaLocation("demo", ("$projectDir/schemas/demo")
// Applies to demoDebug and fullDebug
schemaLocation("debug", ("$projectDir/schemas/debug")
}
```
Bug: 278266663
Test: RoomGradlePluginTest
Change-Id: I09d6f9a77d3737bef2ce73193344a8b31f5059a8
M room/room-gradle-plugin/src/main/java/androidx/room/gradle/RoomExtension.kt
M room/room-gradle-plugin/src/main/java/androidx/room/gradle/RoomGradlePlugin.kt
M room/room-gradle-plugin/src/test/java/androidx/room/gradle/RoomGradlePluginTest.kt
as...@google.com <as...@google.com>
jb...@google.com <jb...@google.com> #3
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.room:room-gradle-plugin:2.6.0-alpha03
ap...@google.com <ap...@google.com> #5
Project: platform/frameworks/support
Branch: androidx-main
commit cd77b4bbe312dd8892dfbb3c662344d13a96c82d
Author: Julia McClellan <juliamcclellan@google.com>
Date: Thu Apr 14 15:31:46 2022
Deep link in activity destination in navigation lint
Test: Included tests of API version and the lint rule
Bug: 178403185
Change-Id: Ic15a5ec165620b7ef5b3f03538cc83b5576add8d
A navigation/navigation-runtime-lint/src/main/java/androidx/navigation/runtime/lint/DeepLinkInActivityDestinationDetector.kt
A navigation/navigation-runtime-lint/src/test/java/androidx/navigation/runtime/lint/ApiLintVersionsTest.kt
M settings.gradle
A navigation/navigation-runtime-lint/build.gradle
M navigation/navigation-runtime/build.gradle
A navigation/navigation-runtime-lint/src/main/java/androidx/navigation/runtime/lint/NavigationRuntimeIssueRegistry.kt
A navigation/navigation-runtime-lint/src/test/java/androidx/navigation/runtime/lint/DeepLinkInActivityDestinationDetectorTest.kt
A navigation/navigation-runtime-lint/src/main/resources/META-INF/services/com.android.tools.lint.client.api.IssueRegistry
https://android-review.googlesource.com/2064176
Branch: androidx-main
commit cd77b4bbe312dd8892dfbb3c662344d13a96c82d
Author: Julia McClellan <juliamcclellan@google.com>
Date: Thu Apr 14 15:31:46 2022
Deep link in activity destination in navigation lint
Test: Included tests of API version and the lint rule
Bug: 178403185
Change-Id: Ic15a5ec165620b7ef5b3f03538cc83b5576add8d
A navigation/navigation-runtime-lint/src/main/java/androidx/navigation/runtime/lint/DeepLinkInActivityDestinationDetector.kt
A navigation/navigation-runtime-lint/src/test/java/androidx/navigation/runtime/lint/ApiLintVersionsTest.kt
M settings.gradle
A navigation/navigation-runtime-lint/build.gradle
M navigation/navigation-runtime/build.gradle
A navigation/navigation-runtime-lint/src/main/java/androidx/navigation/runtime/lint/NavigationRuntimeIssueRegistry.kt
A navigation/navigation-runtime-lint/src/test/java/androidx/navigation/runtime/lint/DeepLinkInActivityDestinationDetectorTest.kt
A navigation/navigation-runtime-lint/src/main/resources/META-INF/services/com.android.tools.lint.client.api.IssueRegistry
Description
Component used: Navigation Version used: 2.3.2
It has been recommended that using <deeplink> inside an <activity> tag on navigation graph should not be used as it has unintended side effects (as per this issue - https://issuetracker.google.com/issues/174934674 ). Would it be possible to deprecate this feature so that new developers are also aware of this issue? Or a lint warning would also help convey that this is not the correct approach going forward.