Fixed
Status Update
Comments
zh...@gmail.com <zh...@gmail.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit e35f66106e6d7ed231d79d69b9c8b93b3394dde8
Author: Yigit Boyar <yboyar@google.com>
Date: Mon Nov 15 10:48:19 2021
Read property accessor meteadata in KAPT
This CL updates KotlinMetadataElement to also read property accessors
and synthesize KmFunction for them so that JavacExecutableElement can
find them.
This does not have any impact right now but will eventually be used to
support internal properties properly.
Note that, accessors are not functions in metadata. As such, I'm
synthesizing a KmFunction from KmAccessor, which may not be 100%
accurate. When in doubt, I preferred 0 flags (instead of flags of
properties etc). Since accessors are not always defined, I also made the
KmValueParameter's name nullable.
I've also added name and jvmName to KmFunction to distinguish between
the name in source vs the name generated by the kotlin compiler. This
will again be used for supporting internal properties once we add
relevant API to XMethodElement.
Bug: 205289020
Test: KotlinMetadataElementTest
Change-Id: If85f0832ee91bcdff25a660b11e1a38e625fc60a
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/javac/kotlin/KotlinClassMetadataUtils.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/FallbackLocationInformationTest.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/javac/kotlin/KotlinMetadataElementTest.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XExecutableElementTest.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/util/NamingUtils.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/javac/kotlin/KotlinMetadataElement.kt
https://android-review.googlesource.com/1893051
Branch: androidx-main
commit e35f66106e6d7ed231d79d69b9c8b93b3394dde8
Author: Yigit Boyar <yboyar@google.com>
Date: Mon Nov 15 10:48:19 2021
Read property accessor meteadata in KAPT
This CL updates KotlinMetadataElement to also read property accessors
and synthesize KmFunction for them so that JavacExecutableElement can
find them.
This does not have any impact right now but will eventually be used to
support internal properties properly.
Note that, accessors are not functions in metadata. As such, I'm
synthesizing a KmFunction from KmAccessor, which may not be 100%
accurate. When in doubt, I preferred 0 flags (instead of flags of
properties etc). Since accessors are not always defined, I also made the
KmValueParameter's name nullable.
I've also added name and jvmName to KmFunction to distinguish between
the name in source vs the name generated by the kotlin compiler. This
will again be used for supporting internal properties once we add
relevant API to XMethodElement.
Bug: 205289020
Test: KotlinMetadataElementTest
Change-Id: If85f0832ee91bcdff25a660b11e1a38e625fc60a
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/javac/kotlin/KotlinClassMetadataUtils.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/FallbackLocationInformationTest.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/javac/kotlin/KotlinMetadataElementTest.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XExecutableElementTest.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/util/NamingUtils.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/javac/kotlin/KotlinMetadataElement.kt
yb...@google.com <yb...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
commit beae10a7c9d4a7daf538c9894539506d7e25a0d6
Author: Yigit Boyar <yboyar@google.com>
Date: Wed Nov 17 16:07:54 2021
Add name property to XMethodElement
Adding back name to XMethodElement that simply delegates to jvmName.
This should land into g3 to ease dagger migration and a followup CL
will make it match the documentation. That is, XMethodElement.name
means the name in source, not java binary.
Bug: 205289020
Test: existing tests
Change-Id: I86422b7ba69efa6f6747f033e6b6cf08514b490c
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/XMethodElement.kt
https://android-review.googlesource.com/1896035
Branch: androidx-main
commit beae10a7c9d4a7daf538c9894539506d7e25a0d6
Author: Yigit Boyar <yboyar@google.com>
Date: Wed Nov 17 16:07:54 2021
Add name property to XMethodElement
Adding back name to XMethodElement that simply delegates to jvmName.
This should land into g3 to ease dagger migration and a followup CL
will make it match the documentation. That is, XMethodElement.name
means the name in source, not java binary.
Bug: 205289020
Test: existing tests
Change-Id: I86422b7ba69efa6f6747f033e6b6cf08514b490c
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/XMethodElement.kt
ah...@gmail.com <ah...@gmail.com> #4
Project: platform/frameworks/support
Branch: androidx-main
commit 20a59c33ba405e6749bd6fa80faa32e4c6fa370f
Author: Yigit Boyar <yboyar@google.com>
Date: Mon Nov 15 08:40:32 2021
Add XMethodElement#name to reflect source name
This CL adds back the name property to XMethodElement. Unlike jvmName,
this property refers to the name in source and might be different from
the JVM name.
Note that, for functions that reference a value class, kotlin generates
a name with - in it, which makes it invalid in java source. As such,
these methods don't show up in KAPT stubs but they do show up in
compiled code. We should probably address that inconsistency in
XProcessing eventually ( b/206517658 ).
A followup CL will update Room to use name where it makes sense to fix
the internals bug.
Bug: 206517658
Bug: 205289020
Test: XExecutableElementTest
Change-Id: I79864ffdde24d7edd7f0c49f668efc920ace3857
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/javac/JavacMethodElement.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/ksp/synthetic/KspSyntheticPropertyMethodElement.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/KspMethodElement.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XExecutableElementTest.kt
https://android-review.googlesource.com/1892715
Branch: androidx-main
commit 20a59c33ba405e6749bd6fa80faa32e4c6fa370f
Author: Yigit Boyar <yboyar@google.com>
Date: Mon Nov 15 08:40:32 2021
Add XMethodElement#name to reflect source name
This CL adds back the name property to XMethodElement. Unlike jvmName,
this property refers to the name in source and might be different from
the JVM name.
Note that, for functions that reference a value class, kotlin generates
a name with - in it, which makes it invalid in java source. As such,
these methods don't show up in KAPT stubs but they do show up in
compiled code. We should probably address that inconsistency in
XProcessing eventually (
A followup CL will update Room to use name where it makes sense to fix
the internals bug.
Bug: 206517658
Bug: 205289020
Test: XExecutableElementTest
Change-Id: I79864ffdde24d7edd7f0c49f668efc920ace3857
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/javac/JavacMethodElement.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/ksp/synthetic/KspSyntheticPropertyMethodElement.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/KspMethodElement.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XExecutableElementTest.kt
yb...@google.com <yb...@google.com> #5
Project: platform/frameworks/support
Branch: androidx-main
commit dd1f1d0c043d8986a98cc7fd08f3e997d0fc264a
Author: Yigit Boyar <yboyar@google.com>
Date: Fri Nov 12 23:19:09 2021
Rename XMethodElement.name to jvmName
This is in preparation for separating method names from their jvm names.
This CL is a no-op simple rename. The followup will introduce name back
which will refer to the name in source code. Moreover, that CL will also
change Room to use name whenever appropriate. For instance, when
matching fields to their setters/getters, we actually want the name, not
jvm name because jvm name of methods might differenciate based on the
visibility of the method.
Separating name vs jvmName has two benefits:
a) Performance. Resolving jvm name is expensive in KSP because it
requires resolving types (to see if they are inline). Note that gaining
this performance for classpath inputs will require changing XProcessing
to not always return fields / methods in their declaration order (make
it an additional API instead).
b) Logically, we always want the name except for java code generation.
Bug: 205289020
Test: existing tests
Change-Id: I7fd61193db833922ee3b7af64f6cf20eb3d244c0
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/ksp/KspTypeNamesGoldenTest.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/DeletionMethodProcessor.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/DaoProcessorTest.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/FallbackLocationInformationTest.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XAnnotationBoxTest.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/synthetic/KspSyntheticPropertyMethodElement.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/RawQueryMethodProcessor.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/InsertionMethodProcessorTest.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/ResolverExt.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/FieldSetter.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XRoundEnvTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/ext/ElementExtTest.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/DeletionMethod.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/UpdateMethodProcessor.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/TableEntityProcessorTest.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/InsertionMethod.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/DaoProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/QueryMethodProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/PojoMethodProcessor.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XNullabilityTest.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/KspClassFileUtility.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/FieldGetter.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/DatabaseProcessorTest.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/CustomTypeConverter.kt
M room/room-compiler/src/main/kotlin/androidx/room/ext/xtype_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/ShortcutMethod.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/PojoMethod.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XProcessingStepTest.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/QueryMethod.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/InternalModifierTest.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/ksp/KspTypeTest.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/MethodProcessorDelegate.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/javac/JavacMethodElement.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/DatabaseProcessor.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XTypeTest.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/FieldReadWriteWriter.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/JavaPoetExt.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/ksp/KSAsMemberOfTest.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XExecutableElementTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/TransactionMethodProcessorTest.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/InsertionMethodProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/DaoWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/Constructor.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/MethodSpecHelperTest.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XElementTest.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XAnnotationTest.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/DaoMethod.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/PojoProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/UpdateMethod.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/DeclarationCollector.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/TypeAliasTest.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/KotlinMetadataTest.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/util/TestExtensions.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XExecutableTypeTest.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/compat/XConvertersTest.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/KspMethodElement.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/QueryMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/ShortcutMethodProcessorTest.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/ShortcutParameterProcessor.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XTypeElementTest.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/KspClassFileUtilityTest.kt
https://android-review.googlesource.com/1891247
Branch: androidx-main
commit dd1f1d0c043d8986a98cc7fd08f3e997d0fc264a
Author: Yigit Boyar <yboyar@google.com>
Date: Fri Nov 12 23:19:09 2021
Rename XMethodElement.name to jvmName
This is in preparation for separating method names from their jvm names.
This CL is a no-op simple rename. The followup will introduce name back
which will refer to the name in source code. Moreover, that CL will also
change Room to use name whenever appropriate. For instance, when
matching fields to their setters/getters, we actually want the name, not
jvm name because jvm name of methods might differenciate based on the
visibility of the method.
Separating name vs jvmName has two benefits:
a) Performance. Resolving jvm name is expensive in KSP because it
requires resolving types (to see if they are inline). Note that gaining
this performance for classpath inputs will require changing XProcessing
to not always return fields / methods in their declaration order (make
it an additional API instead).
b) Logically, we always want the name except for java code generation.
Bug: 205289020
Test: existing tests
Change-Id: I7fd61193db833922ee3b7af64f6cf20eb3d244c0
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/ksp/KspTypeNamesGoldenTest.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/DeletionMethodProcessor.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/DaoProcessorTest.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/FallbackLocationInformationTest.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XAnnotationBoxTest.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/synthetic/KspSyntheticPropertyMethodElement.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/RawQueryMethodProcessor.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/InsertionMethodProcessorTest.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/ResolverExt.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/FieldSetter.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XRoundEnvTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/ext/ElementExtTest.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/DeletionMethod.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/UpdateMethodProcessor.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/TableEntityProcessorTest.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/InsertionMethod.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/DaoProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/QueryMethodProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/PojoMethodProcessor.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XNullabilityTest.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/KspClassFileUtility.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/FieldGetter.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/DatabaseProcessorTest.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/CustomTypeConverter.kt
M room/room-compiler/src/main/kotlin/androidx/room/ext/xtype_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/ShortcutMethod.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/PojoMethod.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XProcessingStepTest.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/QueryMethod.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/InternalModifierTest.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/ksp/KspTypeTest.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/MethodProcessorDelegate.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/javac/JavacMethodElement.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/DatabaseProcessor.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XTypeTest.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/FieldReadWriteWriter.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/JavaPoetExt.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/ksp/KSAsMemberOfTest.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XExecutableElementTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/TransactionMethodProcessorTest.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/InsertionMethodProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/DaoWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/Constructor.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/MethodSpecHelperTest.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XElementTest.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XAnnotationTest.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/DaoMethod.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/PojoProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/UpdateMethod.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/DeclarationCollector.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/TypeAliasTest.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/KotlinMetadataTest.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/util/TestExtensions.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XExecutableTypeTest.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/compat/XConvertersTest.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/KspMethodElement.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/QueryMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/ShortcutMethodProcessorTest.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/ShortcutParameterProcessor.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XTypeElementTest.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/KspClassFileUtilityTest.kt
ah...@gmail.com <ah...@gmail.com> #6
Project: platform/frameworks/support
Branch: androidx-main
commit 7ce58f6d42595983aab61f37ac70032e9171e238
Author: Yigit Boyar <yboyar@google.com>
Date: Mon Nov 15 21:15:55 2021
Support internal properties in Room
This CL fixes a bug in POJO processor where while matching fields to
methods, it was using the jvm name of the method rather than the source
name.
As the JVM name for internal properties get a $pkg suffix, they were not
matching the property
Fixes: 205289020
Test: InternalsTest
RelNote: "Added support for internal properties in Kotlin sources.
This is a slight behavior change in Room where it will use the source
name of functions while matching them to properties as getters/setters
(previously, it was using JVM name of the function which is different
for internal functions/properties).
If you are using custom `@JvmName` annotations to match getters/setters
to private properties, please double check the generated code after the
update"
Change-Id: If653164362c49fd00650d9a953f330afdb309c1c
M room/room-compiler/src/main/kotlin/androidx/room/processor/PojoProcessor.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/InternalsTest.kt
https://android-review.googlesource.com/1893381
Branch: androidx-main
commit 7ce58f6d42595983aab61f37ac70032e9171e238
Author: Yigit Boyar <yboyar@google.com>
Date: Mon Nov 15 21:15:55 2021
Support internal properties in Room
This CL fixes a bug in POJO processor where while matching fields to
methods, it was using the jvm name of the method rather than the source
name.
As the JVM name for internal properties get a $pkg suffix, they were not
matching the property
Fixes: 205289020
Test: InternalsTest
RelNote: "Added support for internal properties in Kotlin sources.
This is a slight behavior change in Room where it will use the source
name of functions while matching them to properties as getters/setters
(previously, it was using JVM name of the function which is different
for internal functions/properties).
If you are using custom `@JvmName` annotations to match getters/setters
to private properties, please double check the generated code after the
update"
Change-Id: If653164362c49fd00650d9a953f330afdb309c1c
M room/room-compiler/src/main/kotlin/androidx/room/processor/PojoProcessor.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/InternalsTest.kt
ap...@google.com <ap...@google.com> #7
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 3e6792c7521cdf41c295a1c0037137ecf9c7a005
Author: Ahmed El-Helw <ahmedre@gmail.com>
Date: Wed Aug 05 00:03:57 2020
[GH] Support opening gzipped databases.
This patch adds a method for creating a database from a gzipped file.
This is only implemented for external files, since assets are
transparently gzipped and extracted by the build tools.
Test: Added a unit test to SQLiteCopyOpenHelperTest.
Fixes: b/146911060
This is an imported pull request fromhttps://github.com/androidx/androidx/pull/49 .
Resolves #49
Github-Pr-Head-Sha: 568196d7b1800e9055de0dae7f509008cbc64c71
GitOrigin-RevId: 5de26bc6b6107d6aa2079f53d303e1216879ffa9
Change-Id: Ibd6b85f03748062a1ced22daf250944d5f07ef5b
M room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/PrepackageTest.java
A room/integration-tests/testapp/src/main/assets/databases/products_v1.db.zip
M room/runtime/api/current.txt
M room/runtime/api/public_plus_experimental_current.txt
M room/runtime/api/restricted_current.txt
M room/runtime/src/main/java/androidx/room/RoomDatabase.java
M room/runtime/src/main/java/androidx/room/SQLiteCopyOpenHelper.java
M room/runtime/src/main/java/androidx/room/SQLiteCopyOpenHelperFactory.java
M room/runtime/src/test/java/androidx/room/BuilderTest.java
M room/runtime/src/test/java/androidx/room/SQLiteCopyOpenHelperTest.kt
https://android-review.googlesource.com/1388184
Branch: androidx-master-dev
commit 3e6792c7521cdf41c295a1c0037137ecf9c7a005
Author: Ahmed El-Helw <ahmedre@gmail.com>
Date: Wed Aug 05 00:03:57 2020
[GH] Support opening gzipped databases.
This patch adds a method for creating a database from a gzipped file.
This is only implemented for external files, since assets are
transparently gzipped and extracted by the build tools.
Test: Added a unit test to SQLiteCopyOpenHelperTest.
Fixes:
This is an imported pull request from
Resolves #49
Github-Pr-Head-Sha: 568196d7b1800e9055de0dae7f509008cbc64c71
GitOrigin-RevId: 5de26bc6b6107d6aa2079f53d303e1216879ffa9
Change-Id: Ibd6b85f03748062a1ced22daf250944d5f07ef5b
M room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/PrepackageTest.java
A room/integration-tests/testapp/src/main/assets/databases/products_v1.db.zip
M room/runtime/api/current.txt
M room/runtime/api/public_plus_experimental_current.txt
M room/runtime/api/restricted_current.txt
M room/runtime/src/main/java/androidx/room/RoomDatabase.java
M room/runtime/src/main/java/androidx/room/SQLiteCopyOpenHelper.java
M room/runtime/src/main/java/androidx/room/SQLiteCopyOpenHelperFactory.java
M room/runtime/src/test/java/androidx/room/BuilderTest.java
M room/runtime/src/test/java/androidx/room/SQLiteCopyOpenHelperTest.kt
ap...@google.com <ap...@google.com> #8
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 1263185ef8c50d4059758e382610345a24f82c53
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Fri Jul 31 19:28:39 2020
Minor changes and API files update for aosp/1384212
Additionally add new copyFromInputStream property to
DatabaseConfiguration for consistency.
Fixes: b/146911060
Relnote: N/A
Test: ./gradlew bOS
Change-Id: I6fca34150c96a7039211ee3db46cf9a714667a9c
M room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/PrepackageTest.java
M room/runtime/api/current.txt
M room/runtime/api/public_plus_experimental_current.txt
M room/runtime/api/restricted_current.txt
M room/runtime/src/main/java/androidx/room/DatabaseConfiguration.java
M room/runtime/src/main/java/androidx/room/RoomDatabase.java
M room/runtime/src/main/java/androidx/room/SQLiteCopyOpenHelper.java
M room/runtime/src/main/java/androidx/room/SQLiteCopyOpenHelperFactory.java
M room/testing/src/main/java/androidx/room/testing/MigrationTestHelper.java
https://android-review.googlesource.com/1384013
Branch: androidx-master-dev
commit 1263185ef8c50d4059758e382610345a24f82c53
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Fri Jul 31 19:28:39 2020
Minor changes and API files update for aosp/1384212
Additionally add new copyFromInputStream property to
DatabaseConfiguration for consistency.
Fixes:
Relnote: N/A
Test: ./gradlew bOS
Change-Id: I6fca34150c96a7039211ee3db46cf9a714667a9c
M room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/PrepackageTest.java
M room/runtime/api/current.txt
M room/runtime/api/public_plus_experimental_current.txt
M room/runtime/api/restricted_current.txt
M room/runtime/src/main/java/androidx/room/DatabaseConfiguration.java
M room/runtime/src/main/java/androidx/room/RoomDatabase.java
M room/runtime/src/main/java/androidx/room/SQLiteCopyOpenHelper.java
M room/runtime/src/main/java/androidx/room/SQLiteCopyOpenHelperFactory.java
M room/testing/src/main/java/androidx/room/testing/MigrationTestHelper.java
Description
Version used: 2.2.3
We got the ability to create room databases from assets or other files in
My current workaround is to manually decompress the gzipped asset into the application's database directory, but there's no reason that the room database builder couldn't handle this step on it's own.