Status Update
Comments
au...@google.com <au...@google.com> #2
The issue is reproducible with core-ktx 1.2.0 and 1.3.0-rc01.
da...@google.com <da...@google.com> #3
The Typeface.weight is not a weight of the underlying font file. It is a display style. On older APIs, the display style is adjusted if the Typeface is created from single font. However, after moving to CustomFallbackBuilder, that adjustment is removed since it can crate Typeface from multiple style font files.
Looks like it is good to set display style by ResourcesCompat.getFont for backward compatibility.
au...@google.com <au...@google.com> #4
Hi Nona,
Can you please schedule a release after you merge the fix?
da...@google.com <da...@google.com> #5
Branch: androidx-master-dev
commit 3d6aa2e9b3243dcc4de1f54bd8d40339bd69cb05
Author: Seigo Nonaka <nona@google.com>
Date: Wed May 27 17:38:05 2020
Adjust the Typeface display style with the style of given font
This behavir is implicitly done by Typeface.Builder and
Typeface.createXXX function but not to be done by
Typeface.CustomFallbackBuilder since it is designed to be working
with multiple font files which has different style.
Looks like the style argument is ignored on older API implementation.
Bug: 156853883
Bug: 152023266
Test: ResourcesCompatTest#testGetFont_adjustDisplayStyle passes on 29
Test: ./gradlew core:core:connectedAndroidTest on API 29, 28, 23
Change-Id: I3a377c339a7aed50973cf11df86ddf0069f4ec25
A core/core/src/androidTest/assets/fonts/thin_italic.ttf
A core/core/src/androidTest/assets/fonts/thin_italic.ttx
M core/core/src/androidTest/java/androidx/core/content/res/ResourcesCompatTest.java
A core/core/src/androidTest/res/font/thin_italic.ttf
M core/core/src/main/java/androidx/core/graphics/TypefaceCompatApi29Impl.java
hm...@google.com <hm...@google.com> #7
Any way I can tell what version this will land in?
hm...@google.com <hm...@google.com> #9
Great—works as expected, thanks!
da...@google.com <da...@google.com> #10
The library is from androidx, we are using
I did also notice the compile classpath is fine, after all it compiles correctly and the APIs do resolve in the IDE, but at runtime it fails.
da...@google.com <da...@google.com> #11
So far we have found that from alpha12 (good version) to alpha13 (bad version) of androidx.sqlite, one change that affected the metadata was the upgrade from Gradle 8.11.1 to 8.12, this is a diff of the metadata:
Notice the removal of the org.gradle.libraryelements
attribute. The attribute is also missing with Gradle 8.13-rc1
ow...@google.com <ow...@google.com>
hm...@google.com <hm...@google.com> #12
Update on libraryelements attribute missing in jvm target publications with Gradle 8.12 - Jetbrain are saying it will be fixed after
By the way I have noticed a weird behaviour - if you do ./gradlew publish in your project libraryelements is not there for jvm publications but if you do ./gradlew publishJvmPublicationToMavenRepository it's there
Daniel, Owen, let me know if this is enough info to proceed further with a fix.
hm...@google.com <hm...@google.com> #13
For the issue of the android publications where "org.gradle.libraryelements" = "jar" instead of "aar" - that was fixed in AGP 8.10 canary 7. Please feel free to try it out and report back. Thank you
da...@google.com <da...@google.com>
au...@google.com <au...@google.com> #14
FYI danysantiago@ we have upgraded to 8.10.0-alpha07 in androidx.
Description
Applying the newer AGP KMP plugin to androidx.sqlite breaks the Gradle metadata such that a JVM project depending on the artifact will attempt (and fail) to use the android artifact instead of the JVM one.
This was originally reported in SQLite KMP b/396148592
Here is a diff on the metadata, left is before AGP KMP is used (i.e. after reverting the changes in this CL ) and right is with AGP KMP applied: https://diff.googleplex.com/#key=EY2FqaJWQbUQ
Let me know if you need a sample project, but if you create a new JVM or Kotlin project and depend on
androidx.sqlite:sqlite:2.5.0-beta01
and try to use classes from it, it will fail at runtime with a class not found exception. When inspecting the deps via:dependencies
you will notice it attempts to use the-android
artifact instead of the-jvm
one: