Status Update
Comments
ca...@gmail.com <ca...@gmail.com> #2
This is a particularly hard device to come by - do you happen to have access to the device? If so could you provide us with the output of: adb shell dumpsys media.camera > info.txt
Thanks!
yb...@google.com <yb...@google.com> #3
Stacktrace:
Caused by: java.lang.IllegalArgumentException: Can not get supported output size under supported maximum for the format: 34
at androidx.camera.camera2.internal.SupportedSurfaceCombination.getSupportedOutputSizes(SupportedSurfaceCombination.java:355)
at androidx.camera.camera2.internal.SupportedSurfaceCombination.getSuggestedResolutions(SupportedSurfaceCombination.java:197)
at androidx.camera.camera2.internal.Camera2DeviceSurfaceManager.getSuggestedResolutions(Camera2DeviceSurfaceManager.java:198)
at androidx.camera.core.CameraX.calculateSuggestedResolutions(CameraX.java:943)
at androidx.camera.core.CameraX.bindToLifecycle(CameraX.java:293)
at androidx.camera.lifecycle.ProcessCameraProvider.bindToLifecycle(ProcessCameraProvider.java:227)
Below are some findings based on our debugging
When Dex is connected
previewConfig.getMaxResolution() is returning "731x411" as maxSize.
Inside Preview.Builder.build() -> Default_MAX_resolution is set to "CameraX.getSurfaceManager().getPreviewSize()" which is 731x411
this is being picked as maxSize.
While rendering maxSize is 731x411 and minSize is 640x480 and below are available outputSizes
0 = {Size@11860} "4032x3024"
1 = {Size@11861} "3984x2988"
2 = {Size@11862} "4032x2268"
3 = {Size@11863} "3024x3024"
4 = {Size@11864} "2976x2976"
5 = {Size@11865} "3840x2160"
6 = {Size@11866} "3264x2448"
7 = {Size@11867} "4032x1960"
8 = {Size@11868} "2880x2160"
9 = {Size@11869} "3264x1836"
10 = {Size@11870} "2160x2160"
11 = {Size@11871} "2560x1440"
12 = {Size@11872} "2224x1080"
13 = {Size@11873} "2048x1152"
14 = {Size@11874} "1920x1080"
15 = {Size@11875} "1440x1080"
16 = {Size@11876} "1088x1088"
17 = {Size@11877} "1280x720"
18 = {Size@11878} "1024x768"
19 = {Size@11879} "1056x704"
20 = {Size@11880} "960x720"
21 = {Size@11881} "960x540"
22 = {Size@11882} "720x720"
23 = {Size@11883} "800x450"
24 = {Size@11884} "720x480"
25 = {Size@11885} "640x480"
26 = {Size@11886} "352x288"
27 = {Size@11887} "320x240"
28 = {Size@11888} "256x144"
29 = {Size@11889} "176x144"
and couldn't find any size in this range.
When Dex not connected
minsize = 640x480
maxsize = 1920x1080
0 = {Size@11836} "4032x3024"
1 = {Size@11837} "3984x2988"
2 = {Size@11838} "4032x2268"
3 = {Size@11839} "3024x3024"
4 = {Size@11840} "2976x2976"
5 = {Size@11841} "3840x2160"
6 = {Size@11842} "3264x2448"
7 = {Size@11843} "4032x1960"
8 = {Size@11844} "2880x2160"
9 = {Size@11845} "3264x1836"
10 = {Size@11846} "2160x2160"
11 = {Size@11847} "2560x1440"
12 = {Size@11848} "2224x1080"
13 = {Size@11849} "2048x1152"
14 = {Size@11850} "1920x1080"
15 = {Size@11851} "1440x1080"
16 = {Size@11852} "1088x1088"
17 = {Size@11853} "1280x720"
18 = {Size@11854} "1024x768"
19 = {Size@11855} "1056x704"
20 = {Size@11856} "960x720"
21 = {Size@11857} "960x540"
22 = {Size@11858} "720x720"
23 = {Size@11859} "800x450"
24 = {Size@11860} "720x480"
25 = {Size@11861} "640x480"
26 = {Size@11862} "352x288"
27 = {Size@11863} "320x240"
28 = {Size@11864} "256x144"
29 = {Size@11865} "176x144"
and we have 12 available sizes in this range
Camera2DeviceSurfaceManager.java:: getPreviewSize()
mCameraSupportedSurfaceCombinationMap.get(cameraId).getSurfaceDefinition().getPreviewSize() = "1920x1080"
cameraId=0
ca...@gmail.com <ca...@gmail.com> #4
The issue root cause is that CameraX will default filter out sizes smaller than 640x480. For Preview, the max size will be limited to under display size. I checked the HW spec info for the issue related devices. Display size of FUJITSU F-04J/F-05J is 360x640. That will result int that no size exists in the conditions that is larger or equal to 640x480 and smaller or equal to 360x640.
A temporary workaround for this situation is to use Preview.Builder#setTargetResolution() to set a size smaller than 640x480 to bypass the problem.
For device FUJITSU arrowsM04, I checked its HW spec info and its display size I found is 1280x720. It seems that the problem should not exist in the device.
Could you confirm that the problem exist on arrowsM04 device? What will be the returned value when using Display#getRealSize to obtain the display size?
sl...@gmail.com <sl...@gmail.com> #5
> A temporary workaround for this situation is to use Preview.Builder#setTargetResolution() to set a size smaller than 640x480 to bypass the problem.
OK. I will try it.
> Could you confirm that the problem exist on arrowsM04 device?
We receive the crash report (Crashlytics) that this crash has occurred on arrowsM04.
We don't have this device so we can't confirm that the problem really exist on arrowsM04.
> What will be the returned value when using Display#getRealSize to obtain the display size?
We can't investigate it for the same reason.
Thank you.
sl...@gmail.com <sl...@gmail.com> #6
This issue happened on devices that the display size is smaller than 640x480. In original auto-resolution mechanism, supported sizes smaller than 640x480 will be default filter out.
The auto-resolution mechanism encodes the guaranteed configurations tables in CameraDevice#createCaptureSession(SessionConfiguration). It defines that the PREVIEW size is the small one of the device display size and 1080p. The PREVIEW size will be the maximal size limitation for Preview use case. The reason it limits the size to display size and 1080p is the stream output in display size or 1080p has been able to provide good enough preview quality. Therefore, auto-resolution mechanism will limit the selected size to be smaller than the small one of the device display size and 1080p.
With above two conditions, in this issue, all sizes smaller than 640x480 have been filter out, therefore, there is no size smaller than the display size 320x240 can be selected to use. And cause the exception.
Solution:
When the display size is smaller than 640x480, auto-resolution mechanism won't filter out those small sizes smaller than 640x480. This makes those small size be left and can be selected for the Preview use case on small display devices.
The solution has been merged and will be included in next CameraX release.
sl...@gmail.com <sl...@gmail.com> #7
Hello.
This crash still occurs.
- CAMERAX VERSION: 1.0.0-beta4
- ANDROID OS BUILD NUMBER: Android 7.1.1
- DEVICE NAME: FUJITSU F-02H
We receive following crash report from FUJITSU F-02H. So far We have received this crash report only from F-02H.
java.lang.IllegalArgumentException
Can not get supported output size under supported maximum for the format: 34
androidx.camera.camera2.internal.SupportedSurfaceCombination.getSupportedOutputSizes (SupportedSurfaceCombination.java:349)
androidx.camera.camera2.internal.SupportedSurfaceCombination.getSuggestedResolutions (SupportedSurfaceCombination.java:197)
androidx.camera.camera2.internal.Camera2DeviceSurfaceManager.getSuggestedResolutions (Camera2DeviceSurfaceManager.java:198)
androidx.camera.core.CameraX.calculateSuggestedResolutions (CameraX.java:949)
androidx.camera.core.CameraX.bindToLifecycle (CameraX.java:351)
androidx.camera.lifecycle.ProcessCameraProvider.bindToLifecycle (ProcessCameraProvider.java:230)
(our application's package name).CameraFragment.bindCameraUseCases (CameraFragment.java:174)
yb...@google.com <yb...@google.com> #8
Could you help to provide the following information to clarify the issue?
1. Is the full name of the device Fujitsu Arrows NX F-02H that has a 1440x2560 display?
2. Please help to provide the supported output sizes of ImageFormat.PRIVATE that is obtained by StreamConfigurationMap#getOutputSizes(int).
ap...@google.com <ap...@google.com> #9
- Is the full name of the device Fujitsu Arrows NX F-02H that has a 1440x2560 display?
Yes
- Please help to provide the supported output sizes of ImageFormat.PRIVATE that is obtained by StreamConfigurationMap#getOutputSizes(int).
Since we don't have this device, we'll try to collect this information in the next version of our app. The next version will be released later this month.
ap...@google.com <ap...@google.com> #10
Hello.
- Please help to provide the supported output sizes of ImageFormat.PRIVATE that is obtained by StreamConfigurationMap#getOutputSizes(int).
We have collected the output of the device where the crash occurs.
Device1
- Model : arrows Be F-05J
- Android Version : 7.1.1
- Supported output sizes of ImageFormat.PRIVATE
CameraId 0: 480x480
CameraId 1: 2048x1536 ,1920x1080 ,1280x720 ,960x720 ,640x480 ,320x240 ,176x144
Device2
- Model : Fujitsu arrows M04
- Android Version : 7.1.1
- Supported output sizes of ImageFormat.PRIVATE
CameraId 0: 480x480
CameraId 1: 2048x1536 ,1920x1080 ,1280x720 ,960x720 ,640x480 ,320x240 ,176x144
Additional Information
CameraX version : 1.0.0-beta04
We collect the supported output sizes by following code.
val errorString = buildString {
append("The supported output sizes of ImageFormat.PRIVATE: ")
(requireContext().getSystemService(Context.CAMERA_SERVICE) as CameraManager).apply {
cameraIdList.forEachIndexed { index, cameraId ->
val msg = if (VERSION.SDK_INT >= VERSION_CODES.M) {
val configurationMap =
getCameraCharacteristics(cameraId).get(CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP)
val sizes = configurationMap?.getOutputSizes(ImageFormat.PRIVATE)
"CameraId $index: ${sizes?.joinToString(" ,")}"
} else {
"CameraId $index: This device version is under M."
}
append(msg)
}
}
}
ap...@google.com <ap...@google.com> #11
ap...@google.com <ap...@google.com> #12
I tried to find the device specs and both 720x1280
size display. For the camera id 0 device, it is a different case that the display size is larger than 640x480
but the device only supports a 480x480
size. The case also caused the same IllegalArgumentException and was also fixed by 1.0.0-beta04
release. Before 480x480
size would be filtered out and then caused the IllegalArgumentException. After it was merged, the 640x480
size threshold was removed and then the 480x480
size would be kept and selected to use.
It looks like 1.0.0-beta04
release had been used to collect the supported sizes information. But the issue should have been fixed by 1.0.0-beta04
release. Did you only check the device model name to collect the supported sizes information or collect the information when the IllegalArgumentException issue happens again?
CameraX's 1.0.0-beta04
version. Maybe you can also consider to upgrade to the latest 1.0.0-rc01
version for your application. Thanks.
na...@google.com <na...@google.com> #13
Did you only check the device model name to collect the supported sizes information or collect the information when the IllegalArgumentException issue happens again?
We collect informations only from the device on which IllegalArgumentException happened.
Our latest app uses CameraX version 1.0.0-beta10
and this issue still occurres.
However we don't receive crash report from Fujitsu arrows Be F-05J
or Fujitsu arrows M04
so far. (This doesn't mean this issue is fixed on these devices because our app is heavily rely on camera so these device's user wouldn't use our app anymore.)
Instead, we receive crash report from
- Model : Fujitsu F-03K
- Android Version : 7.1.2
- Supported output sizes of ImageFormat.PRIVATE
CameraId 0 : 480x480
CameraId 1 : 2048x1536 ,1920x1080 ,1280x720 ,960x720 ,640x480 ,320x240 ,176x144
ap...@google.com <ap...@google.com> #14
I missed some settings when I simulated the issue by robolectric test so that I was not able to reproduce it. Now, I can reproduce the issue if the device only supports one 480x480 resolution. I'm working on the solution and target to make it included in next release.
ap...@google.com <ap...@google.com> #15
Branch: androidx-main
commit 69d15dff7bb857ee33a0f643ff42a0f8bc475ab2
Author: charcoalchen <charcoalchen@google.com>
Date: Fri Jan 08 18:30:03 2021
Fixed IllegalArgumentException issue happened when all preview supported sizes are smaller than 640x480 and display size is larger than 640x480.
Do not filter out sizes smaller than 640x480 when all preview supported sizes are smaller than 640x480 and display size is larger than 640x480.
Relnote:"Fixed IllegalArgumentException issue happened when all preview supported sizes are smaller than 640x480 and display size is larger than 640x480."
Bug: 150506192
Test: SupportedSurfaceCombinationTest
Change-Id: I2a63ce8e2ad42a9cc060c8635ac3603bf440b1ec
M camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/SupportedSurfaceCombination.java
M camera/camera-camera2/src/test/java/androidx/camera/camera2/internal/SupportedSurfaceCombinationTest.java
ap...@google.com <ap...@google.com> #16
ap...@google.com <ap...@google.com> #17
Branch: androidx-main
commit 9d4954bde8fc18c7b728af02c02e3bf0e4482079
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Tue Oct 04 12:23:23 2022
Support property reading and writing in Kotlin code generation.
When generating Kotlin code don't use JVM getter and setters for a Kotlin property, instead use the property syntax to get and set the 'field'. This CL only identifies when a setter / getter is a synthetic method for a property and doesn't do any extra work to recognize the backing field is for a property, it also relies on XProcessing and certain Kotlin language aspects.
* XProcessing API for inspecting fields from Kotlin properties only considers properties with backing-fields.
* XProcessing in KSP exposes synthetic getter and setter for properties as part of method inspection.
* Kotlin enforces getter to have same visibility as property, but setter can be different
* Kotlin disallows getter-like and setter-like functions that would conflict with the property's JVM generated ones.
Thus this CL changes the getter and setter codegen logic to be based on the language being emitted and the new CallType that is identified by exposing a `isKotlinPropertyMethod()` in `XMethodElement`.
Bug: 127483380
Test: KotlinCodeGenTest
Change-Id: I64786d7a2026ab1788ad403db62da2e2fcf5cc6a
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/java/JavaCodeBlock.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/kotlin/KotlinCodeBlock.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/XMethodElement.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/javac/JavacMethodElement.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/javac/kotlin/KotlinClassMetadataUtils.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/KspMethodElement.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/synthetic/KspSyntheticPropertyMethodElement.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XTypeElementTest.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/PojoProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/CallType.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/Field.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/FieldGetter.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/FieldSetter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/FieldReadWriteWriter.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/EntityNameMatchingVariationsTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/Fts3TableEntityProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/Fts4TableEntityProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/PojoProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/TableEntityProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/verifier/DatabaseVerifierTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/KotlinCodeGenTest.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_internalVisibility.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_variableProperty.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_variableProperty_java.kt
ap...@google.com <ap...@google.com> #18
Branch: androidx-main
commit 0cb41981b356abc62acab56634bda240d5809064
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Wed Oct 12 13:26:54 2022
Migrate QueryParameterAdapter implementations to XPoet
The migrated adapters are:
* BasicQueryParameterAdapter
* ArrayQueryParameterAdapter
* CollectionQueryParameterAdapter
A notable change is that nullability of the array and collection parameters have to be considered. Instead of prohibit this CL simply accepts them by binding a null arg when the param is null, essentially tackling
Also fixed a bug in KspArrayType.asTypeName() where the KTypeName didn't had right nullability, fixed it by using the KsTypeKotlinPoetExt (it was a missed migration).
New XPoet API:
* XCodeBlock.ofTernaryIf() - For generating inline if expressions with Java's ternary operator and Kotlin if/else.
Bug: 72246856
Bug: 127483380
Test: NullableCollectionQueryParamTest + KotlinCodeGenTest
Change-Id: I5e5b6a73733f2bbc8d111cdfa724720757ab38c5
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/NullableCollectionQueryParamTest.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XCodeBlock.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XTypeName.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/KotlinPoetExt.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/KspArrayType.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XAnnotationValueTest.kt
M room/room-compiler/src/main/kotlin/androidx/room/ext/javapoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/parameter/ArrayQueryParameterAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/parameter/BasicQueryParameterAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/parameter/CollectionQueryParameterAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/QueryWriter.kt
M room/room-compiler/src/test/kotlin/androidx/room/solver/query/QueryWriterTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/KotlinCodeGenTest.kt
M room/room-compiler/src/test/test-data/daoWriter/output/javac/ComplexDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/javac/DeletionDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/ComplexDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/DeletionDao.java
A room/room-compiler/src/test/test-data/kotlinCodeGen/arrayParameterAdapter.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/basicParameterAdapter_string.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/collectionParameterAdapter_string.kt
ap...@google.com <ap...@google.com> #19
Branch: androidx-main
commit dd774999930afba89226586051679f1e622b6649
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Tue Oct 11 22:07:14 2022
Migrate CoroutineResultBinder to XPoet
This change deals with generating suspend overrides in Kotlin codegen which differs from Java in that the override function has the suspend modifier, does not return Any and does not have an extra Continuation param.
There is an API change too: The CancellationSignal parameter in CoroutinesRoom.execute() was incorrectly nonnull instead of nullable, nullable should have been the acceptable type since the generated code uses DBUtil.createCancellationSignal() which will return null in older APIs and is simply piped into other APIs that accept null cancellation signals such as RoomDatabase.query(), this is now fixed. This is a compatible nullability change in a restricted API is only used by Room's generated code.
Bug: 127483380
Test: KotlinCodeGenTest
Change-Id: I4eb7a8a038aac6b3675cb9431287942eb24a866d
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/KotlinPoetExt.kt
M room/room-compiler/src/main/kotlin/androidx/room/ext/javapoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/MethodProcessorDelegate.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/CoroutineFlowResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/CoroutineFlowResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/CoroutineResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/GuavaListenableFutureQueryResultBinder.kt
M room/room-compiler/src/test/kotlin/androidx/room/testing/test_util.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/KotlinCodeGenTest.kt
M room/room-compiler/src/test/test-data/common/input/CoroutinesRoom.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/coroutineResultBinder.kt
M room/room-ktx/api/restricted_current.txt
M room/room-ktx/src/main/java/androidx/room/CoroutinesRoom.kt
ap...@google.com <ap...@google.com> #20
Branch: androidx-main
commit 76bf256f733dbd67b4848467d2c11489e382a594
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Sun Oct 16 12:31:34 2022
Migrate PreparedStatementWriter and PreparedQueryAdapter to XPoet
Migrates the simple path of prepared queries (thanks to that parameter adapters being migrated), specifically: InstantPreparedQueryResultBinder -> PreparedQueryAdapter, along with PreparedStatementWriter.
With this migration other prepared query binders can be migrated in parallel (Rx, Guava, etc...).
XPoet API Change:
* In XFunSpec.builder() renamed isOverridden to isOverride. (The typo was getting on my nerve...)
Bug: 127483380
Test: KotlinCodeGenTest + existing.
Change-Id: Ifa97d552282ca02488b1b7603b7b62fbae994d94
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XFunSpec.kt
M room/room-compiler/src/main/kotlin/androidx/room/ext/javapoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/prepared/binder/CallablePreparedQueryResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/prepared/binder/InstantPreparedQueryResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/prepared/binder/PreparedQueryResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/prepared/result/PreparedQueryResultAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/result/InsertOrUpsertMethodAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/AutoMigrationWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/DaoWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/EntityInsertionAdapterWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/PreparedStatementWriter.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/KotlinCodeGenTest.kt
M room/room-compiler/src/test/test-data/daoWriter/output/javac/DeletionDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/javac/UpdateDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/DeletionDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/UpdateDao.java
A room/room-compiler/src/test/test-data/kotlinCodeGen/preparedQueryAdapter.kt
ap...@google.com <ap...@google.com> #21
Branch: androidx-main
commit 274fb308c905bde29f7c1ab53743ecc0f60f94ba
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Sun Oct 16 16:52:13 2022
Migrate DaoWriter raw query codegen to XPoet
A small but noticeable change is that we no longer assign the SupportSQLiteQuery param to a `final` local variable since for a while Room has been generating overrides with `final` parameters.
Also fixes the usage of a MemberName in EntityCursorConverterWriter, it was converted in aosp/2234531, but no Kotlin codegen test that used it was written until now.
Bug: 127483380
Test: KotlinCodeGenTest + existing.
Change-Id: Id3b5aea4a095da6fa9996abd82c4cc43bfa1aea3
M room/room-compiler/src/main/kotlin/androidx/room/ext/javapoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/ProcessorErrors.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/RawQueryMethodProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/RawQueryMethod.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/DaoWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/EntityCursorConverterWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/QueryWriter.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/RawQueryMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/KotlinCodeGenTest.kt
M room/room-compiler/src/test/test-data/daoWriter/output/javac/ComplexDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/ComplexDao.java
A room/room-compiler/src/test/test-data/kotlinCodeGen/rawQuery.kt
ap...@google.com <ap...@google.com> #22
Branch: androidx-main
commit d45c2f9ef88fdf5db441a1aa06b25406414d32cf
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Wed Oct 19 10:36:37 2022
Migrate Kotlin delegating method binders to XPoet
When generating Kotlin there is no need to override and implement bridge functions for DefaultImpls and type args of boxed primitives. These two set of binders are only needed when generating Java and are entirely skipped in Kotlin. However, this change does migrate the binders to XPoet for migration completeness as we want to minimize JavaPoet usages in room-compiler.
Additionally add com.google.testparameterinjector:test-parameter-injector to the repo, useful for parametrized test methods (as opposed to the entire class).
Bug: 127483380
Test: KotlinCodeGenTest + DaoPrimitiveTest.kt + existing.
Change-Id: I85f675fb72b9956bc49f7153f234ff6a49efedd7
M gradle/libs.versions.toml
M gradle/verification-keyring.keys
M gradle/verification-metadata.xml
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/DaoBoxedPrimitiveDelegateTest.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XTypeName.kt
M room/room-compiler/build.gradle
M room/room-compiler/src/main/kotlin/androidx/room/processor/DaoProcessor.kt
A room/room-compiler/src/main/kotlin/androidx/room/solver/KotlinBoxedPrimitiveMethodDelegateBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/KotlinDefaultMethodDelegateBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/Dao.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/KotlinBoxedPrimitiveMethodDelegate.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/KotlinDefaultMethodDelegate.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/DaoWriter.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/KotlinCodeGenTest.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/delegatingFunctions_boxedPrimitiveBridge.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/delegatingFunctions_defaultImplBridge.kt
ap...@google.com <ap...@google.com> #23
Branch: androidx-main
commit 147eede76bdff7b75de37ef6d416c669fa93ad8f
Author: elifbilgin <elifbilgin@google.com>
Date: Thu Oct 27 17:00:24 2022
Removing old documentation that left an import for `com.squareup.javapoet.CodeBlock` and replacing with XCodeBlock.
Bug: 127483380
Test: N/A
Change-Id: I286a629926ad811272c42c3c709034d4a7255477
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/SingleStatementTypeConverter.kt
ap...@google.com <ap...@google.com> #24
Branch: androidx-main
commit 6e6b63a7001c445ac8742b39d38584aa842022c3
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Thu Oct 27 19:04:31 2022
Convert DeleteOrUpdateMethodAdapter to XPoet
Convert the simple path for @Update, @Delete and @Upsert shortcut methods to generate Kotlin, i.e. the path that uses the instant binders. @Upsert was mostly done since it shares its adapter with @Insert but the binder needed converting and since it uses update too it had to be done in at the same time.
Bug: 127483380
Test: KotlinCodeGenTest
Change-Id: I4b606c3fa71a02c6f112a836590d31c17fb4f2e1
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/CallableDeleteOrUpdateMethodBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/DeleteOrUpdateMethodBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/InstantDeleteOrUpdateMethodBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/InstantUpsertMethodBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/result/DeleteOrUpdateMethodAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/result/InsertOrUpsertMethodAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/DaoWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/EntityDeletionAdapterWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/EntityUpdateAdapterWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/EntityUpsertionAdapterWriter.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/KotlinCodeGenTest.kt
M room/room-compiler/src/test/test-data/daoWriter/output/javac/DeletionDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/javac/UpdateDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/javac/UpsertDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/DeletionDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/UpdateDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/UpsertDao.java
A room/room-compiler/src/test/test-data/kotlinCodeGen/deleteOrUpdateMethodAdapter.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/insertOrUpsertMethodAdapter.kt
ap...@google.com <ap...@google.com> #25
Branch: androidx-main
commit 28bdcef38f2e56f7fc1500d8d727db83da60d4c0
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Thu Oct 20 16:43:15 2022
Migrate TransactionMethodBinder and TransactionMethodAdapter to XPoet
Migrate transaction binders and adapters for wrapping concrete DAO functions in a transaction, including suspending transactions.
New XPoet API:
* XTypeName.getConsumerSuperName - to create a wildcard type name for a consumer (super type of)
* XTypeName.getProducerExtendsName - to create a wildcard type name for a producer (sub type of)
Bug: 127483380
Bug: 249984508
Test: KotlinCodeGenTest
Change-Id: Ib0413d7d465f4b53af8106ff064ec772cb1fa2aa
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XTypeName.kt
M room/room-compiler/src/main/kotlin/androidx/room/ext/javapoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/MethodProcessorDelegate.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/result/InsertOrUpsertMethodAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/transaction/binder/CoroutineTransactionMethodBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/transaction/binder/InstantTransactionMethodBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/transaction/binder/TransactionMethodBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/transaction/result/TransactionMethodAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/DaoWriter.kt
M room/room-compiler/src/test/kotlin/androidx/room/testing/test_util.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/KotlinCodeGenTest.kt
A room/room-compiler/src/test/test-data/common/input/RoomDatabaseExt.kt
D room/room-compiler/src/test/test-data/common/input/RoomDatabaseKt.java
M room/room-compiler/src/test/test-data/daoWriter/output/javac/ComplexDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/ComplexDao.java
A room/room-compiler/src/test/test-data/kotlinCodeGen/transactionMethodAdapter_abstractClass.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/transactionMethodAdapter_interface.kt
ap...@google.com <ap...@google.com> #26
Branch: androidx-main
commit c14ab25b89149316c422c2ad4c13cc0bf03b82c9
Author: elifbilgin <elifbilgin@google.com>
Date: Tue Oct 11 19:19:59 2022
Generating Kotlin code in ListQueryResultAdapter.kt.
Bug: 127483380
Test: KotlinCodeGenTest.kt
Change-Id: I3578568e4814ca12500b1f7f8227cac8d3d89fab
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XTypeName.kt
M room/room-compiler/src/main/kotlin/androidx/room/ext/codegenpoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/ListQueryResultAdapter.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/KotlinCodeGenTest.kt
M room/room-compiler/src/test/test-data/daoWriter/output/javac/ComplexDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/ComplexDao.java
A room/room-compiler/src/test/test-data/kotlinCodeGen/queryResultAdapter_list.kt
ap...@google.com <ap...@google.com> #27
Branch: androidx-main
commit 8aab02df135e53b45adb90c24607c47a025011d4
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Thu Nov 03 11:12:49 2022
Migrate Relation and RelationCollectorFunctionWriter to XPoet
Migrate the relationship code writers of @Relation fields to XPoet to generate Kotlin code. This CL refactors the writer to accommodate for Kotlin's nullability checks in types along with moving some of the generated code to runtime helpers.
First the nullability of the parent and child relation columns have to be accounted when generating code that reads the 'key' column. The solution implemented is to use column readers when reading keys as these are null-aware as opposed to the hardcoded cursor get functions used. The readers are always available since the key type is based on the matching fields affinity and not the actual field type and thus they are all built-in supported types (String, Long, etc). One special type is ByteBuffer which is supported via a built-in converter for BLOB affinity. To support always finding the converter Context.fork() was updated to receive forced built-in converter states.
Second, the generated code to recursively fetch relationships when exceeding the max binding args amount was moved to runtime helpers functions in RelationUtil. This makes them easier to maintain and reduces the amount of code generation logic in the writer. However, the fetch functions are a bit redundant with each other as they need to support various map types, specifically HashMap, LongSparseArray and ArrayMap. This also means room-runtime has a new compileOnly dependency on androidx.collection to support having these runtime helper functions. The function to be use is still determine by room-compiler and the availability of androidx.collection types in the project's classpath.
XProcessing change:
* Fixed requireType(XTypeName) in KSP to not simply use KTypeName as String since that might contain the `?` suffix when nullable and will fail lookup. Instead find the type using the canonical name and then make nullable or non null based on XTypeName.nullability.
New XPoet API:
* XCodeBlock.indent() and XCodeBlock.unindent() - For adding and removing code indent, useful for lambdas.
* XTypeName.rawTypeName - For getting the raw type name of a parametrized type name. Even though there is no XParametrizedTypeName,the function is available to all type names returning itself if not parametrized.
Bug: 127483380
Test: DaoRelationshipKotlinCodeGenTest + existing
Change-Id: I2baf26703b1cc57e14af23e7ac452028a389d9ed
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XCodeBlock.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XTypeName.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/java/JavaCodeBlock.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/java/JavaFunSpec.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/kotlin/KotlinCodeBlock.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/kotlin/KotlinFunSpec.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/XProcessingEnv.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/codegen/XTypeNameTest.kt
M room/room-compiler/src/main/kotlin/androidx/room/ext/xpoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/ext/xtype_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/Context.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/CustomConverterProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/MapQueryResultAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/PojoRowAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/ByteBufferColumnTypeAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/Relation.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/RelationCollector.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/DatabaseWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/RelationCollectorFunctionWriter.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/QueryMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/solver/BuiltInConverterFlagsTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/testing/test_util.kt
A room/room-compiler/src/test/kotlin/androidx/room/writer/BaseDaoKotlinCodeGenTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DaoKotlinCodeGenTest.kt
A room/room-compiler/src/test/kotlin/androidx/room/writer/DaoRelationshipKotlinCodeGenTest.kt
A room/room-compiler/src/test/test-data/common/input/collection/ArrayMap.java
A room/room-compiler/src/test/test-data/common/input/collection/LongSparseArray.java
A room/room-compiler/src/test/test-data/kotlinCodeGen/relations.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/relations_arrayMap.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/relations_byteBufferKey.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/relations_longSparseArray.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/relations_nullable.kt
M room/room-runtime/api/restricted_current.txt
M room/room-runtime/build.gradle
A room/room-runtime/src/main/java/androidx/room/util/RelationUtil.kt
ap...@google.com <ap...@google.com> #28
Branch: androidx-main
commit 35a9063a3822179d22a3fdfdc7d041269d3c359d
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Mon Nov 07 16:04:03 2022
Migrate SQLiteOpenHelperWriter and ValidationWriter impls to XPoet.
This migrations allow Room to generate the RoomOpenHelper.Delegate in Kotlin and moves it back to be an inner class of the database impl, instead of a separate class.
This CL in part reverts aosp/2290293.
Also, renamed the param name of most RoomOpenHelper.Delegate functions from 'database' to 'db', aligning with the other functions, even though this is regarded as an incompatible change, these functions are only called from generated code that up until now was Java code, thus it is a safe change.
Bug: 127483380
Test: DatabaseKotlinCodeGenTest + existing
Relnote: Revert the API changes in aosp/2290293, but also renamed the db param name of most RoomOpenHelper.Delegate.
Change-Id: I1b11d32c24d1489b8f03a8fc723252e8501f2fa7
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XFunSpec.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/java/JavaFunSpec.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/kotlin/KotlinFunSpec.kt
M room/room-compiler/src/main/kotlin/androidx/room/DatabaseProcessingStep.kt
M room/room-compiler/src/main/kotlin/androidx/room/ext/xpoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/DatabaseWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/FtsTableInfoValidationWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/SQLiteOpenHelperWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/TableInfoValidationWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/ValidationWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/ViewInfoValidationWriter.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DatabaseKotlinCodeGenTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DatabaseWriterTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/SQLiteOpenHelperWriterTest.kt
M room/room-compiler/src/test/test-data/databasewriter/output/ComplexDatabase.java
D room/room-compiler/src/test/test-data/databasewriter/output/ComplexDatabase_Impl_OpenHelperDelegate.java
M room/room-compiler/src/test/test-data/kotlinCodeGen/database_propertyDao.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/database_simple.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/database_withFtsAndView.kt
D room/room-runtime/api/current.ignore
M room/room-runtime/api/current.txt
M room/room-runtime/api/public_plus_experimental_current.txt
M room/room-runtime/api/restricted_current.ignore
M room/room-runtime/api/restricted_current.txt
M room/room-runtime/src/main/java/androidx/room/RoomDatabase.kt
M room/room-runtime/src/main/java/androidx/room/RoomOpenHelper.kt
M room/room-testing/src/main/java/androidx/room/testing/MigrationTestHelper.kt
ap...@google.com <ap...@google.com> #29
Branch: androidx-main
commit 7e7bb0bd279d754b7cdd96e93d8f930989160bb6
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Mon Nov 07 10:54:49 2022
Migrate DatabaseWriter to XPoet
This migrations allow Room to generate the database implementation in Kotlin.
Some notable changes:
* getAutoMigrations() was changed to not use Arrays.asList() and instead just add to an ArrayList. Keeps the XPoet part equivalent for both languages.
* For Java Dao impl getters emit memoization logic, but for Kotlin we'll just use Lazy, making the getter way simpler.
* This changes adds overriding abstract dao property, but it has a few flaws. Follow-up bug filled.
New XPoet API:
* Created the fallback API for XPropertySpec to allow access to the actual builder when the code generation diverges too much between languages. Used to add 'volatile' modifier in Java and for property overriding.
Bug: 127483380
Test: DatabaseKotlinCodeGenTest + existing
Change-Id: I723023639b276368e87c6abe3dc3b807bc419b42
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XPropertySpec.kt
M room/room-compiler/src/main/kotlin/androidx/room/DatabaseProcessingStep.kt
M room/room-compiler/src/main/kotlin/androidx/room/ext/xpoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/ext/xtype_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/parser/SqlParser.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/AmbiguousColumnIndexAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/EntityRowAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/MultiTypedPagingSourceQueryResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/PositionalDataSourceQueryResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/StringColumnTypeAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/AutoMigration.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/AutoMigrationWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/DatabaseWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/FtsTableInfoValidationWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/SQLiteOpenHelperWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/TableInfoValidationWriter.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/DeleteOrUpdateShortcutMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/InsertOrUpsertShortcutMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/QueryMethodProcessorTest.kt
A room/room-compiler/src/test/kotlin/androidx/room/writer/DatabaseKotlinCodeGenTest.kt
M room/room-compiler/src/test/test-data/databasewriter/output/ComplexDatabase.java
A room/room-compiler/src/test/test-data/kotlinCodeGen/database_propertyDao.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/database_simple.kt
M room/room-runtime/src/main/java/androidx/room/Room.kt
ap...@google.com <ap...@google.com> #30
Branch: androidx-main
commit 4183f5c0af2b47c63e050b4c684bfe95c7b43fa6
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Sat Nov 05 11:36:03 2022
Temporarily generate RoomOpenHelper.Delegate in its own Java file.
Generating the RoomOpenHelper.Delegate in its own file helps us migrate DatabaseWriter to XPoet so it can generate Kotlin code without having to also migrate SQLiteOpenHelperWriter.
Since the delegate is no longer an inner class two API had to be opened up in RoomDatabase to be called from the delegate. These are temporary and will be removed once the delegate is moved back to an inner class.
Bug: 127483380
Test: Existing
Relnote: Add restricted temporary API in RoomDatabase to be accessed by generated OpenHelper Delegate.
Change-Id: I2f206155ba48a235c580596dcad8bd3179a3ca24
M room/room-compiler/src/main/kotlin/androidx/room/DatabaseProcessingStep.kt
M room/room-compiler/src/main/kotlin/androidx/room/ext/xpoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/DatabaseWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/SQLiteOpenHelperWriter.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DatabaseWriterTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/SQLiteOpenHelperWriterTest.kt
M room/room-compiler/src/test/test-data/databasewriter/output/ComplexDatabase.java
A room/room-compiler/src/test/test-data/databasewriter/output/ComplexDatabase_Impl_OpenHelperDelegate.java
A room/room-runtime/api/current.ignore
M room/room-runtime/api/current.txt
M room/room-runtime/api/public_plus_experimental_current.txt
M room/room-runtime/api/restricted_current.ignore
M room/room-runtime/api/restricted_current.txt
M room/room-runtime/src/main/java/androidx/room/RoomDatabase.kt
ap...@google.com <ap...@google.com> #31
Branch: androidx-main
commit e695d18e07c066ffd30d901023a19c425615eadd
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Tue Nov 08 21:12:14 2022
Migrate the remaining converters from the NullAwareTypeAdapterStore to XPoet
Also add more tests for custom type converters, including provides ones. This lead me to find that the getter for the provided converter was not quite right and ended up refactoring similar to dao impl getters, where we use a kotlin.Lazy when generating Kotlin otherwise the getter has memoization logic. Due to the lazy, Dao impl constructors had to be moved to the primary constructor, hence all Kotlin codegen tests update.
New XPoet API:
* XTypeSpec.Builder.setPrimaryConstructor() - For setting the primary constructor of a type, note that this has no real effect when generating Java, but will do when generating Kotlin.
Bug: 127483380
Test: DaoKotlinCodeGenTest + existing
Change-Id: Id07edb2af23f02a920cdcd6a132d5a04b6f0c4db
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XFunSpec.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XTypeSpec.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/java/JavaTypeSpec.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/kotlin/KotlinTypeSpec.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/transaction/binder/CoroutineTransactionMethodBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/CompositeTypeConverter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/CustomTypeConverterWrapper.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/NoOpConverter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/NullAwareTypeConverters.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/TypeConverter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/UpCastTypeConverter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/DaoWriter.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DaoKotlinCodeGenTest.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/abstractClassWithParam.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/arrayParameterAdapter.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/basicParameterAdapter_string.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/collectionParameterAdapter_string.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/coroutineResultBinder.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/delegatingFunctions_boxedPrimitiveBridge.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/delegatingFunctions_defaultImplBridge.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/deleteOrUpdateMethodAdapter.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/insertOrUpsertMethodAdapter.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_boolean.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_byteArray.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_customTypeConverter.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_customTypeConverter_composite.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_customTypeConverter_nullAware.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_customTypeConverter_provided.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_customTypeConverter_upcast.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_embedded.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_enum.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_internalVisibility.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_primitives.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_primitives_nullable.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_string.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_uuid.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_variableProperty.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_variableProperty_java.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/preparedQueryAdapter.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/queryResultAdapter_list.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/rawQuery.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/relations.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/relations_arrayMap.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/relations_byteBufferKey.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/relations_longSparseArray.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/relations_nullable.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/transactionMethodAdapter_abstractClass.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/transactionMethodAdapter_interface.kt
ap...@google.com <ap...@google.com> #32
Branch: androidx-main
commit 917948e6651180b64a251926b9aba9b02f65cd50
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Tue Nov 15 20:09:58 2022
Cleanup usage of XType.typeName and XTypeElement.className
This CL handles most of room-compiler usages, but there are still more left in room-compiler-processing and various other non-converter type adapters.
New API in XProcessing:
* XType.isTypeVariable - To check if the type represents an unresolved type variable.
New XPoet API:
* XTypeName.isBoxedPrimitive - To check if the type is a boxed primitive.
* XTypeName.equalsIgnoreNullability - For comparing type names while ignoring nullability.
* XTypeName.toString - A version of toString() that takes the code language to print JPoet or KPoet names.
* Added boxed primitives
Bug: 127483380
Bug: 247247366
Bug: 247248619
Bug: 248280754
Bug: 249173483
Test: Existing
Change-Id: Idbadc464a5222644cc2ec0452a3855d5232b570f
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/PoetExt.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XTypeName.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/DeclarationCollector.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/XExecutableElement.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/XFieldElement.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/XMemberContainer.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/XProcessingEnv.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/XType.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/XTypeElement.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/XTypeParameterElement.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/javac/JavacType.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/javac/JavacTypeElement.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/KspFileMemberContainer.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/KspType.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/KspTypeArgumentType.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/KspTypeElement.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/synthetic/KspSyntheticFileMemberContainer.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/codegen/XTypeNameTest.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XProcessingEnvTest.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XTypeTest.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/ksp/KspTypeNamesGoldenTest.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/ksp/synthetic/KspSyntheticFileMemberContainerTest.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/util/TestExtensions.kt
M room/room-compiler/src/main/kotlin/androidx/room/ext/xpoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/ext/xtype_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/parser/SqlParser.kt
M room/room-compiler/src/main/kotlin/androidx/room/preconditions/Checks.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/AutoMigrationProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/Context.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/CustomConverterProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/DaoProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/DatabaseProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/FieldProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/FtsTableEntityProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/InsertionMethodProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/PojoProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/ProcessorErrors.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/QueryMethodProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/RawQueryMethodProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/ShortcutMethodProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/TableEntityProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/UpdateMethodProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/UpsertionMethodProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/NullAwareTypeConverterStore.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/CursorQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/MultiTypedPagingSourceQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/prepared/result/PreparedQueryResultAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/MultimapQueryResultAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/PojoRowAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/result/InsertOrUpsertMethodAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/transaction/binder/CoroutineTransactionMethodBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/transaction/binder/InstantTransactionMethodBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/BoxedBooleanToBoxedIntConverter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/EnumColumnTypeAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/NullAwareTypeConverters.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/StringColumnTypeAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/UpCastTypeConverter.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/Field.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/RawQueryMethod.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/RelationCollector.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/DaoWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/DatabaseWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/EntityCursorConverterWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/EntityDeletionAdapterWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/EntityInsertionAdapterWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/EntityUpdateAdapterWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/PreparedStatementWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/QueryWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/RelationCollectorFunctionWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/TypeWriter.kt
M room/room-compiler/src/test/kotlin/androidx/room/ext/ElementExtTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/parser/SQLTypeAffinityTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/AutoMigrationProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/CustomConverterProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/DaoProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/DatabaseProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/DeleteOrUpdateShortcutMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/EntityNameMatchingVariationsTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/FieldProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/Fts3TableEntityProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/Fts4TableEntityProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/InsertOrUpsertShortcutMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/PojoProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/QueryMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/RawQueryMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/TableEntityProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/autovalue/AutoValuePojoProcessorDelegateTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/solver/Signatures.kt
M room/room-compiler/src/test/kotlin/androidx/room/solver/TypeAdapterStoreTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/solver/TypeConverterStoreTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/testing/test_util.kt
ap...@google.com <ap...@google.com> #33
Branch: androidx-main
commit 7acd1f3d757bbbf51f4aae31141465f9426cebbf
Author: elifbilgin <elifbilgin@google.com>
Date: Tue Nov 15 15:20:40 2022
Generating Kotlin in ArrayQueryResultAdapter.
Bug: 127483380
Test: KotlinCodeGenTest.kt
Change-Id: I855161d2695deecdce90ab8d170db35500905eb7
M room/room-compiler/src/main/kotlin/androidx/room/ext/xpoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/ArrayQueryResultAdapter.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DaoKotlinCodeGenTest.kt
M room/room-compiler/src/test/test-data/daoWriter/output/javac/ComplexDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/ComplexDao.java
A room/room-compiler/src/test/test-data/kotlinCodeGen/queryResultAdapter_array.kt
ap...@google.com <ap...@google.com> #34
Branch: androidx-main
commit 77b07ae76aeec7ee7b59cd0297e7bc2777efa4ff
Author: elifbilgin <elifbilgin@google.com>
Date: Tue Nov 15 15:14:01 2022
Refactoring TypeWriter.
Old version was generating the incorrect suppression tags for Kotlin (same as Java)
Bug: 127483380
Test: ./gradlew :room:room-compiler:test
Change-Id: I5aeac62b7f062832dd4925a31b84370f55e99679
M room/room-compiler/src/main/kotlin/androidx/room/writer/TypeWriter.kt
M room/room-compiler/src/test/test-data/autoMigrationWriter/output/kotlin/AutoMigrationWithProvidedSpec.kt
M room/room-compiler/src/test/test-data/autoMigrationWriter/output/kotlin/ValidAutoMigrationWithDefault.kt
M room/room-compiler/src/test/test-data/autoMigrationWriter/output/kotlin/ValidAutoMigrationWithoutDefault.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/abstractClassWithParam.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/arrayParameterAdapter.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/basicParameterAdapter_string.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/collectionParameterAdapter_string.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/coroutineResultBinder.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/database_propertyDao.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/database_simple.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/database_withFtsAndView.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/delegatingFunctions_boxedPrimitiveBridge.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/delegatingFunctions_defaultImplBridge.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/deleteOrUpdateMethodAdapter.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/entityRowAdapter.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/insertOrUpsertMethodAdapter.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_boolean.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_byteArray.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_customTypeConverter.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_customTypeConverter_composite.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_customTypeConverter_nullAware.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_customTypeConverter_provided.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_customTypeConverter_upcast.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_embedded.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_enum.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_internalVisibility.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_primitives.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_primitives_nullable.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_string.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_uuid.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_variableProperty.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_variableProperty_java.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/preparedQueryAdapter.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/queryResultAdapter_list.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/queryResultAdapter_map.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/queryResultAdapter_map_ambiguousIndexAdapter.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/rawQuery.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/relations.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/relations_arrayMap.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/relations_byteBufferKey.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/relations_longSparseArray.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/relations_nullable.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/transactionMethodAdapter_abstractClass.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/transactionMethodAdapter_interface.kt
ap...@google.com <ap...@google.com> #35
Branch: androidx-main
commit 581ce0b5ddb3830d6a515b3ea81feaf04070ff69
Author: elifbilgin <elifbilgin@google.com>
Date: Tue Nov 22 12:55:08 2022
Generating Kotlin in GuavaOptionalQueryResultAdapter.
Bug: 127483380
Test: KotlinCodeGenTest.kt
Change-Id: I2932ab180f62d411b83f6890c87b51fbe6f38004
M room/room-compiler/src/main/kotlin/androidx/room/ext/xpoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/GuavaOptionalQueryResultAdapter.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DaoKotlinCodeGenTest.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/queryResultAdapter_guavaOptional.kt
ap...@google.com <ap...@google.com> #36
Branch: androidx-main
commit 428c531bbcda8f5bee17da99348d78a29c54cd0b
Author: elifbilgin <elifbilgin@google.com>
Date: Tue Nov 08 15:59:11 2022
Generating Kotlin in OptionalQueryResultAdapter.
Bug: 127483380
Test: KotlinCodeGenTest.kt
Change-Id: I77186932f0a8b3d6da800356cf0daa3ea42136cc
M room/room-compiler/src/main/kotlin/androidx/room/ext/xpoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/OptionalQueryResultAdapter.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DaoKotlinCodeGenTest.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/queryResultAdapter_optional.kt
ap...@google.com <ap...@google.com> #37
Branch: androidx-main
commit 268572539eda5a3eddc49fb63e5dc9ac87179e37
Author: elifbilgin <elifbilgin@google.com>
Date: Tue Nov 08 13:56:40 2022
Generating Kotlin in ImmutableListQueryResultAdapter.
Bug: 127483380
Test: KotlinCodeGenTest.kt
Change-Id: I3c072df6f6cc6ddf83a6c527892bff1227d46e7e
M room/room-compiler/src/main/kotlin/androidx/room/ext/xpoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/ImmutableListQueryResultAdapter.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DaoKotlinCodeGenTest.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/queryResultAdapter_immutable_list.kt
ap...@google.com <ap...@google.com> #38
Branch: androidx-main
commit 906a064761e91002d1a5be0d9f92fdbfde519823
Author: elifbilgin <elifbilgin@google.com>
Date: Tue Nov 22 16:53:15 2022
Generating Kotlin in GuavaImmutableMultimapQueryResultAdapter.
Bug: 127483380
Test: KotlinCodeGenTest.kt
Change-Id: I932739d8323c0dac51f4e28f8e9fe8251206e677
M room/room-compiler/src/main/kotlin/androidx/room/ext/xpoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/GuavaImmutableMultimapQueryResultAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/GuavaOptionalQueryResultAdapter.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DaoKotlinCodeGenTest.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/queryResultAdapter_guavaImmutableMultimap.kt
ap...@google.com <ap...@google.com> #39
Branch: androidx-main
commit 4c09727d0759740ce5632fce389558a2558d49f1
Author: elifbilgin <elifbilgin@google.com>
Date: Tue Nov 22 16:15:47 2022
Generating Kotlin in GuavaImmutableMapQueryResultAdapter.
Bug: 127483380
Test: KotlinCodeGenTest.kt
Change-Id: I2a6fa079dea28c68805a1d6e4a62b8555b217516
M room/room-compiler/src/main/kotlin/androidx/room/ext/xpoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/ImmutableListQueryResultAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/ImmutableMapQueryResultAdapter.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DaoKotlinCodeGenTest.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/queryResultAdapter_guavaImmutableMap.kt
ap...@google.com <ap...@google.com> #40
Branch: androidx-main
commit 4defed070d5031434f7a04bed92b76d5cd37a350
Author: elifbilgin <elifbilgin@google.com>
Date: Thu Dec 01 15:14:20 2022
Converting paging sources in the compiler tests to Kotlin.
Bug: 127483380
Test: N/A
Change-Id: Ic15d9c19e8eab66ec616983037ebd0ea095dce0e
M room/room-compiler/src/test/test-data/common/input/LimitOffsetListenableFuturePagingSource.kt
A room/room-compiler/src/test/test-data/common/input/LimitOffsetPagingSource.kt
M room/room-compiler/src/test/test-data/common/input/LimitOffsetRx2PagingSource.kt
M room/room-compiler/src/test/test-data/common/input/LimitOffsetRx3PagingSource.kt
M room/room-compiler/src/test/test-data/common/input/ListenableFuturePagingSource.kt
M room/room-compiler/src/test/test-data/common/input/PagingSource.kt
M room/room-compiler/src/test/test-data/common/input/Rx2PagingSource.kt
M room/room-compiler/src/test/test-data/common/input/Rx3PagingSource.kt
ap...@google.com <ap...@google.com> #41
Branch: androidx-main
commit 190bd087cd58bcb7eb3b208f55b4afa09e31aec0
Author: elifbilgin <elifbilgin@google.com>
Date: Wed Nov 23 12:15:09 2022
Generating Kotlin in MultiTypedPagingSourceQueryResultBinder.
Bug: 127483380
Test: TypeAdapterStoreTest.kt, DaoKotlinCodeGenTest.kt
Change-Id: Id592fe870ef1a3896f144e13c73e081d1d45e54e
M room/room-compiler/src/main/kotlin/androidx/room/ext/xpoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/ListenableFuturePagingSourceQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/MultiTypedPagingSourceQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/PagingSourceQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/RxJava2PagingSourceQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/RxJava3PagingSourceQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/MultiTypedPagingSourceQueryResultBinder.kt
M room/room-compiler/src/test/kotlin/androidx/room/solver/TypeAdapterStoreTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/testing/test_util.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DaoKotlinCodeGenTest.kt
M room/room-compiler/src/test/test-data/common/input/LimitOffsetListenableFuturePagingSource.kt
D room/room-compiler/src/test/test-data/common/input/LimitOffsetPagingSource.java
M room/room-compiler/src/test/test-data/common/input/LimitOffsetPagingSource.kt
M room/room-compiler/src/test/test-data/common/input/LimitOffsetRx2PagingSource.kt
M room/room-compiler/src/test/test-data/common/input/LimitOffsetRx3PagingSource.kt
M room/room-compiler/src/test/test-data/common/input/ListenableFuturePagingSource.kt
M room/room-compiler/src/test/test-data/common/input/PagingSource.kt
M room/room-compiler/src/test/test-data/common/input/Rx2PagingSource.kt
M room/room-compiler/src/test/test-data/common/input/Rx3PagingSource.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/multiTypedPagingSourceResultBinder.kt
ap...@google.com <ap...@google.com> #42
Branch: androidx-main
commit bd1249f0b3581425c22e58d8592bab96e1440d7e
Author: elifbilgin <elifbilgin@google.com>
Date: Wed Dec 14 13:44:53 2022
Generating Kotlin in DataSourceFactoryQueryResultBinder and PositionalDataSourceQueryResultBinder.
Bug: 127483380
Test: KotlinCodeGenTest.kt
Change-Id: I471f9c2814f3d70b91fc244346fd989c6d69ecbe
M room/room-compiler/src/main/kotlin/androidx/room/ext/xpoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/DataSourceFactoryQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/DataSourceFactoryQueryResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/PositionalDataSourceQueryResultBinder.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/QueryMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/RawQueryMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/testing/test_util.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DaoKotlinCodeGenTest.kt
M room/room-compiler/src/test/test-data/common/input/DataSource.kt
D room/room-compiler/src/test/test-data/common/input/PositionalDataSource.java
A room/room-compiler/src/test/test-data/common/input/PositionalDataSource.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/dataSource.kt
ap...@google.com <ap...@google.com> #43
Branch: androidx-main
commit 1f7665431be7c1caaeb8d7740723ec1befde3afb
Author: elifbilgin <elifbilgin@google.com>
Date: Mon Nov 21 17:21:44 2022
Generating Kotlin in the remaining files.
This CL mainly focused on RxCallableQueryResultBinder, BaseObservableQueryResultBinder and TransactionWrapper to generate Kotlin. However, many other cases have also been handled, including shortcut methods, prepared queries, all rxjava2, rxjava3 and ListenableFuture return values.
Bug: 127483380
Test: KotlinCodeGenTest.kt
Change-Id: Iff93bb2ee7b3cb0f5a20774470bc7909349f0ce4
M room/room-compiler/src/main/kotlin/androidx/room/ext/xpoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/MethodProcessorDelegate.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/TransactionMethodProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/RxTypes.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/CoroutineFlowResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/GuavaListenableFutureQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/ListenableFuturePagingSourceQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/LiveDataQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/PagingSourceQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/QueryResultBinderProviderWithRequiredArtifact.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/RxCallableQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/RxJava2PagingSourceQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/RxJava3PagingSourceQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/RxQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/prepared/binder/CallablePreparedQueryResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/prepared/binderprovider/GuavaListenableFuturePreparedQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/prepared/binderprovider/RxPreparedQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/BaseObservableQueryResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/CoroutineFlowResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/CoroutineResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/GuavaListenableFutureQueryResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/LiveDataQueryResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/RxCallableQueryResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/RxQueryResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/TransactionWrapper.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/CallableDeleteOrUpdateMethodBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/CallableInsertMethodBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/CallableUpsertMethodBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/GuavaListenableFutureDeleteOrUpdateMethodBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/GuavaListenableFutureInsertMethodBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/GuavaListenableFutureUpsertMethodBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/RxCallableDeleteOrUpdateMethodBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/RxCallableInsertMethodBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/RxCallableUpsertMethodBinderProvider.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/DeleteOrUpdateShortcutMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/InsertOrUpsertShortcutMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/QueryMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/RawQueryMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/TransactionMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/solver/TypeAdapterStoreTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/testing/test_util.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DaoKotlinCodeGenTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DaoWriterTest.kt
M room/room-compiler/src/test/test-data/common/input/CoroutinesRoom.kt
M room/room-compiler/src/test/test-data/common/input/GuavaRoom.java
M room/room-compiler/src/test/test-data/common/input/Rx2Room.java
M room/room-compiler/src/test/test-data/common/input/Rx3Room.java
D room/room-compiler/src/test/test-data/common/input/coroutines/Channel.java
M room/room-compiler/src/test/test-data/common/input/coroutines/Channel.kt
M room/room-compiler/src/test/test-data/common/input/coroutines/ReceiveChannel.kt
M room/room-compiler/src/test/test-data/common/input/rxjava2/Completable.java
A room/room-compiler/src/test/test-data/common/input/rxjava2/EmptyResultSetException.java
M room/room-compiler/src/test/test-data/common/input/rxjava2/Maybe.java
M room/room-compiler/src/test/test-data/common/input/rxjava2/Single.java
M room/room-compiler/src/test/test-data/common/input/rxjava3/Completable.java
A room/room-compiler/src/test/test-data/common/input/rxjava3/EmptyResultSetException.java
M room/room-compiler/src/test/test-data/common/input/rxjava3/Flowable.java
M room/room-compiler/src/test/test-data/common/input/rxjava3/Maybe.java
M room/room-compiler/src/test/test-data/common/input/rxjava3/Single.java
M room/room-compiler/src/test/test-data/daoWriter/output/javac/ComplexDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/javac/DeletionDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/javac/UpdateDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/ComplexDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/DeletionDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/UpdateDao.java
A room/room-compiler/src/test/test-data/kotlinCodeGen/coroutines.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/guavaCallable.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/liveDataCallable.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/paging_dataSource.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/rx2CallableQuery.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/rx2PreparedCallableQuery.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/rx3CallableQuery.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/rx3PreparedCallableQuery.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/shortcutMethods_rxJava.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/shortcutMethods_suspend.kt
M room/room-rxjava3/src/main/java/androidx/room/rxjava3/EmptyResultSetException.java
ap...@google.com <ap...@google.com> #44
Branch: androidx-main
commit 2c9e6af2d1d7fbaec41ebe0605c0b1ca441d848c
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Wed Dec 21 12:46:57 2022
Fix some issues attempting to generate Kotlin in Room integration test.
* Use method `name` instead of `jvmName` when target language is Kotlin
* Rx shortcut queries of Completable must use nullable Void as typearg for Callable.
* EnumColumnTypeAdapter should use type element XClassName when generating switch and when cases, avoids emitting '?' when the `out` is nullable due to null-aware conversion.
* Use begin and end control flow functions when generating the `lazy` DAO property in the database impl.
Bug: 127483380
Test: Existing
Change-Id: I9569a7505eb5e5599b80b32ff7aeb6edd8e112b6
M room/integration-tests/kotlintestapp/src/androidTest/java/InvalidationTrackerExt.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/DatabaseProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/RawQueryMethodProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/RxCallableDeleteOrUpdateMethodBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/RxCallableInsertMethodBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/RxCallableUpsertMethodBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/CustomTypeConverterWrapper.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/EnumColumnTypeAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/Constructor.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/CustomTypeConverter.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/RawQueryMethod.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/DaoWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/DatabaseWriter.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/RawQueryMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/solver/Signatures.kt
M room/room-compiler/src/test/kotlin/androidx/room/solver/TypeAdapterStoreTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DaoKotlinCodeGenTest.kt
M room/room-compiler/src/test/test-data/daoWriter/output/javac/DeletionDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/javac/UpdateDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/DeletionDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/UpdateDao.java
M room/room-compiler/src/test/test-data/kotlinCodeGen/callableQuery_rx2.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/callableQuery_rx3.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/database_propertyDao.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/database_simple.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/database_withFtsAndView.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/preparedCallableQuery_rx2.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/preparedCallableQuery_rx3.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/shortcutMethods_rx2.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/shortcutMethods_rx3.kt
ap...@google.com <ap...@google.com> #45
Branch: androidx-main
commit 63239ab080e845cec39acc65fbd102fe9510413a
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Wed Dec 21 16:36:29 2022
Use internal visibility modifier in Room generated overrides for Kotlin codegen.
For Java internal visibility overrides are converted to public, there is no compiler check for exposing internal types. Also, AutoMigrations in Kotlin will be `internal` by default as opposed to public.
Bug: 127483380
Bug: 262615155
Test: Existing + DatabaseKotlinCodeGenTest.database_internalVisibility
Change-Id: I63aa5a5dfe21dd1f30fc999815038cc457429d49
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/VisibilityModifier.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/java/JavaFunSpec.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/kotlin/KotlinFunSpec.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/KotlinPoetExt.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/AutoMigrationWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/DaoWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/DatabaseWriter.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DaoKotlinCodeGenTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DatabaseKotlinCodeGenTest.kt
M room/room-compiler/src/test/test-data/autoMigrationWriter/output/kotlin/AutoMigrationWithProvidedSpec.kt
M room/room-compiler/src/test/test-data/autoMigrationWriter/output/kotlin/ValidAutoMigrationWithDefault.kt
M room/room-compiler/src/test/test-data/autoMigrationWriter/output/kotlin/ValidAutoMigrationWithoutDefault.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/database_internalVisibility.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_customTypeConverter_internalVisibility.kt
ap...@google.com <ap...@google.com> #46
Branch: androidx-main
commit aa2b688d0597b37ec9e73904eb68d94f83b83fd3
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Wed Dec 21 17:19:46 2022
Disallow abstract properties as DAO getters or DAO queries in Kotlin codegen.
Queries that are declared as a property and Room overrides the getter function give a false notion that the property is immutable or has a fixed stored result, that it won't change, however the getter is not pure, it can return different results if called at different times based on the data in the database. Therefore, this change disallows them when generating Kotlin.
Even though a DAO property in the abstract Database is a more appropriate case since Room generated code does cache the created DAO instance, it is encoding implementation logic. Kotlin codegen is greatly simplified when disallowed.
Bug: 127483380
Bug: 257967987
Test: DatabaseProcessorTest and DaoProcessorTest
Relnote: Disallow abstract properties as DAO getters or DAO queries in Kotlin codegen, instead they should be rewritten as functions to avoid the false notion that the property value is immutable and has a fixed stored result.
Change-Id: If6a13382b351fbcf9072a40c496d600cd329fd38
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/dao/BooksDao.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/AmbiguousColumnResolverTest.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/InternalsTest.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/InvalidationTrackerFlowTest.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/ItemWithNullableConstructor.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/JvmNameInDaoTest.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/ListenableFuturePagingSourceTest.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/MultiTypedPagingSourceTest.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/NullableCollectionQueryParamTest.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/Rx2PagingSourceTest.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/Rx3PagingSourceTest.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/SuspendingQueryTest.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/SyncTriggersConcurrencyTest.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/testutil/PagingDb.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/DaoProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/DatabaseProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/ProcessorErrors.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/DatabaseWriter.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/DaoProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/DatabaseProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DatabaseKotlinCodeGenTest.kt
D room/room-compiler/src/test/test-data/kotlinCodeGen/database_propertyDao.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/database_withFtsAndView.kt
ap...@google.com <ap...@google.com> #47
Branch: androidx-main
commit 960274cef62fbb0674de42eb4ea5444940a4b15f
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Thu Dec 22 13:54:59 2022
Disallow non-null Void for ListenableFuture, and type args in general.
Since the Void class cannot be instantiated and 'null' is always returned, it is an error to declare a type arg as non-null Void and instead should be declared as nullable, e.g. ListenableFuture<Void?>.
Also, while inspecting usages of COMMON_TYPES.VOID I notice we had a missing `makeNullable` for Rx prepared queries with Completable. This change fixes that and makes the CallablePreparedQueryResultBinder gen code simpler.
Bug: 127483380
Test: Various @Test nonNullVoidGuava()
Change-Id: Ie91d084974d73ebfe81d6ca548b30e41b8626b23
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/dao/BooksDao.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/ProcessorErrors.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/GuavaListenableFutureQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/prepared/binder/CallablePreparedQueryResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/prepared/binderprovider/GuavaListenableFuturePreparedQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/prepared/binderprovider/RxPreparedQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/RxCallableQueryResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/GuavaListenableFutureDeleteOrUpdateMethodBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/GuavaListenableFutureInsertMethodBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/GuavaListenableFutureUpsertMethodBinderProvider.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/DeleteOrUpdateShortcutMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/InsertOrUpsertShortcutMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/QueryMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/RawQueryMethodProcessorTest.kt
M room/room-compiler/src/test/test-data/daoWriter/output/javac/DeletionDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/javac/UpdateDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/DeletionDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/UpdateDao.java
ap...@google.com <ap...@google.com> #48
Branch: androidx-main
commit a92310aafb4b4179b34ecb3bb4eacd7ece310266
Author: elifbilgin <elifbilgin@google.com>
Date: Tue Dec 20 07:34:17 2022
Removing usages of $S, $T, $N, $L, $W and `toJavaPoet()` across all files in Room.
Bug: 127483380
Test: Existing tests
Change-Id: I27bfd88931f04370eb54a6f6bb49c384edefe18d
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XFunSpec.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XPropertySpec.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XTypeSpec.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/java/JavaFunSpec.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/java/JavaTypeSpec.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/kotlin/KotlinFunSpec.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/kotlin/KotlinTypeSpec.kt
M room/room-compiler/src/main/kotlin/androidx/room/ext/xpoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/TypeWriter.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/CustomConverterProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/DaoProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/InsertOrUpsertShortcutMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/PojoProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/QueryMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/TableEntityProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/solver/CustomTypeConverterResolutionTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/solver/TypeAdapterStoreTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/solver/query/QueryWriterTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DaoWriterTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DefaultsInDaoTest.kt
M room/room-runtime/src/main/java/androidx/room/EntityUpsertionAdapter.kt
ap...@google.com <ap...@google.com> #49
Branch: androidx-main
commit c1172018f847f8e5dc003c311fb1db39478c0b5e
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Mon Jan 23 20:08:36 2023
Fix suspend vararg Kotlin overrides in XPoet
Also apply spread operator when calling super / delegate function in concrete @Transaction DAO functions, this is needed because unlike Java, Kotlin does not treat equally vararg parameters with its array representation.
Bug: 127483380
Bug: 253268357
Test: DaoKotlinCodeGenTest
Change-Id: I6de00f405a7693101ccbe5468c551d6a688c19c9
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/JavaPoetExt.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/KotlinPoetExt.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/KspExecutableElement.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XExecutableElementTest.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/TransactionMethodProcessor.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DaoKotlinCodeGenTest.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/coroutines.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/shortcutMethods_suspend.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/transactionMethodAdapter_abstractClass.kt
ap...@google.com <ap...@google.com> #50
Branch: androidx-main
commit 856cad743cb01aef3ebbda03aebc6ee0a3ec0d13
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Mon Jan 23 20:13:18 2023
Fix various miss usages of non-null return type queries that are asserted to return null.
Bug: 127483380
Test: Existing
Change-Id: I59388b991a71dd895459dd23c9d237e067f90766
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/dao/BooksDao.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/BooksDaoTest.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/DeferredBooksDaoTest.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/DependencyDaoTest.kt
M room/integration-tests/kotlintestapp/src/main/java/androidx/room/integration/kotlintestapp/dao/DependencyDao.kt
ap...@google.com <ap...@google.com> #51
Branch: androidx-main
commit d62dc3503f7b3ce001aea49bd212724cb15a6e4b
Author: elifbilgin <elifbilgin@google.com>
Date: Fri Feb 03 11:22:25 2023
Removing automigration related warnings as well as nullable collection parameter warnings in preparation for turning on the Kotlin CodeGen testapp.
Test: AutoMigrationWriterTest.kt, BoxedNonNullTypesTest.kt
Bug: 127483380
Change-Id: I6833210feb3dbfa05cac7d3b96eaf467d3365fa7
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/BoxedNonNullTypesTest.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/AutoMigrationWriter.kt
M room/room-compiler/src/test/test-data/autoMigrationWriter/output/java/AutoMigrationWithProvidedSpec.java
M room/room-compiler/src/test/test-data/autoMigrationWriter/output/java/ValidAutoMigrationWithDefault.java
M room/room-compiler/src/test/test-data/autoMigrationWriter/output/java/ValidAutoMigrationWithoutDefault.java
M room/room-compiler/src/test/test-data/autoMigrationWriter/output/kotlin/AutoMigrationWithProvidedSpec.kt
M room/room-compiler/src/test/test-data/autoMigrationWriter/output/kotlin/ValidAutoMigrationWithDefault.kt
M room/room-compiler/src/test/test-data/autoMigrationWriter/output/kotlin/ValidAutoMigrationWithoutDefault.kt
ap...@google.com <ap...@google.com> #52
Branch: androidx-main
commit f748a172bc0cdddab04240280a1a8305b5e3b848
Author: elifbilgin <elifbilgin@google.com>
Date: Thu Mar 02 10:27:43 2023
Duplicating all AutoMigration related tests in the Kotlin test app, in Kotlin.
Bug: 127483380
Test: AutoMigrationTest.kt, ProvidedAutoMigrationSpecTest.kt
Change-Id: Ifbee2f1e01ea4d81579e5c1a17dab9f14c339a39
A room/integration-tests/kotlintestapp/schemas-ksp/androidx.room.integration.kotlintestapp.migration.AutoMigrationDb/1.json
A room/integration-tests/kotlintestapp/schemas-ksp/androidx.room.integration.kotlintestapp.migration.AutoMigrationDb/2.json
A room/integration-tests/kotlintestapp/schemas-ksp/androidx.room.integration.kotlintestapp.migration.AutoMigrationDb/3.json
A room/integration-tests/kotlintestapp/schemas-ksp/androidx.room.integration.kotlintestapp.migration.EmbeddedAutoMigrationDb/1.json
A room/integration-tests/kotlintestapp/schemas-ksp/androidx.room.integration.kotlintestapp.migration.EmbeddedAutoMigrationDb/2.json
A room/integration-tests/kotlintestapp/schemas-ksp/androidx.room.integration.kotlintestapp.migration.ProvidedAutoMigrationSpecTest.ProvidedAutoMigrationDb/1.json
A room/integration-tests/kotlintestapp/schemas-ksp/androidx.room.integration.kotlintestapp.migration.ProvidedAutoMigrationSpecTest.ProvidedAutoMigrationDb/2.json
A room/integration-tests/kotlintestapp/schemas/androidx.room.integration.kotlintestapp.migration.AutoMigrationDb/1.json
A room/integration-tests/kotlintestapp/schemas/androidx.room.integration.kotlintestapp.migration.AutoMigrationDb/2.json
A room/integration-tests/kotlintestapp/schemas/androidx.room.integration.kotlintestapp.migration.AutoMigrationDb/3.json
A room/integration-tests/kotlintestapp/schemas/androidx.room.integration.kotlintestapp.migration.EmbeddedAutoMigrationDb/1.json
A room/integration-tests/kotlintestapp/schemas/androidx.room.integration.kotlintestapp.migration.EmbeddedAutoMigrationDb/2.json
A room/integration-tests/kotlintestapp/schemas/androidx.room.integration.kotlintestapp.migration.ProvidedAutoMigrationSpecTest.ProvidedAutoMigrationDb/1.json
A room/integration-tests/kotlintestapp/schemas/androidx.room.integration.kotlintestapp.migration.ProvidedAutoMigrationSpecTest.ProvidedAutoMigrationDb/2.json
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/migration/AutoMigrationDb.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/migration/AutoMigrationTest.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/migration/EmbeddedAutoMigrationDb.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/migration/ProvidedAutoMigrationSpecTest.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/Album.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/AlbumNameAndBandName.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/AlbumWithSongs.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/Artist.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/Playlist.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/PlaylistSongXRef.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/PlaylistWithSongs.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/ReleasedAlbum.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/Song.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/AutoMigrationWriter.kt
M room/room-testing/build.gradle
A room/room-testing/schemas/androidx.room.testing.kotlintestapp.migration.SimpleAutoMigrationDb/1.json
A room/room-testing/schemas/androidx.room.testing.kotlintestapp.migration.SimpleAutoMigrationDb/2.json
A room/room-testing/src/androidTest/java/androidx/room/testing/kotlintestapp/migration/AutoMigrationAndMigrationTest.kt
A room/room-testing/src/androidTest/java/androidx/room/testing/kotlintestapp/migration/SimpleAutoMigrationDb.kt
ap...@google.com <ap...@google.com> #53
Branch: androidx-main
commit 9802ded90ece9749211346118239bce19a8573d7
Author: elifbilgin <elifbilgin@google.com>
Date: Mon Mar 13 16:08:00 2023
Duplicating tests into the kotlin test app that test conflict in DAOs.
Bug: 127483380
Test: DaoConflictStrategyTest.kt, DaoNameConflictTest.kt
Change-Id: Ia2feeda6f862805672caa6866c6fc819dd0dc0d8
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/TestDatabase.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/dao/PetDao.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/dao/ToyDao.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/DaoConflictStrategyTest.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/DaoNameConflictTest.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/TestUtil.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/Day.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/Pet.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/PetAndOwner.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/PetUser.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/PetWithToyIds.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/PetWithUser.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/Toy.kt
ap...@google.com <ap...@google.com> #54
Branch: androidx-main
commit bfc8f1bd124699a3061c61238e5c8f22bb4d194f
Author: elifbilgin <elifbilgin@google.com>
Date: Mon Mar 06 19:42:35 2023
Duplicating all Multimap related tests in the Kotlin test app, in Kotlin.
Bug: 127483380
Test: MultimapQueryTest.kt
Change-Id: Iee3534d141fa52b2fb331e12930fc221cc171fd9
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/TestDatabase.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/dao/MusicDao.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/MultimapQueryTest.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/TestObserver.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/TestUtil.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/AlbumNameAndBandName.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/Image.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/ImageFormat.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/PlaylistMultiSongXRefView.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/PlaylistWithSongTitles.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/ReleasedAlbum.kt
ap...@google.com <ap...@google.com> #55
Branch: androidx-main
commit bfa6a0036c4db067a6df9e033c1dcb478a84969f
Author: elifbilgin <elifbilgin@google.com>
Date: Fri Mar 17 13:54:11 2023
Duplicating ProvidedTypeConverterTest in the Kotlin test app, in Kotlin.
Bug: 127483380
Test: ProvidedTypeConverterTest.kt
Change-Id: Ia5e305a0cd60a058d55c0255283e40f994efc3c0
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/dao/RobotsDao.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/ProvidedTypeConverterTest.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/TestUtil.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/Cluster.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/Hivemind.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/Pet.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/Robot.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/RobotAndHivemind.kt
Description