Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove obsoleted tests and platformDir from Paparazzi config #1457

Merged
merged 2 commits into from
May 29, 2024

Conversation

jrodbx
Copy link
Collaborator

@jrodbx jrodbx commented May 29, 2024

Historically, Environment.platformDir referenced build.prop and the framework resources bundled under the corresponding $ANDROID_HOME/platforms/$VERSION/ directory.

Now that we've migrated to Google's layoutlib published artifacts, build.prop is provided by layoutlib-runtime and the framework resources by layoutlib-resources, removing the need for Environment.platformDir.

Consequently, four plugin tests are obsoleted and removed:

  • a check to see if a missing $ANDROID_HOME/platforms/$VERSION/ folder is detected (by @luis-cortes)
  • a check supporting upcoming sandboxed versions of the Android platform (by @alexvanyo)
  • two checks determining whether compile and target SDKs have been set differently or left to the default (same) by the developer.

This last bullet point is important. In the past, if the IDE release of LayoutLib did not yet support a given Android SDK level, Paparazzi provided a limited escape hatch to allow the developer to downgrade the platform SDK used by Paparazzi like so:

Paparazzi(
  environment = detectEnvironment().run {
    copy(compileSdkVersion = 33, platformDir = platformDir.replace("34", "33"))
  },
)

Here's a recent example of this: #1288 (comment)

With the move to Google's Layoutlib, this facility is no longer available. Still, it's likely (hopeful?) that Google will publish LayoutLib versions often enough (i.e., faster than the IDE release cycle) to allow quicker adoption of newer SDK levels in Paparazzi.

Base automatically changed from jrod/2024-05-28/jellyfish-cleanup to master May 29, 2024 15:55
@jrodbx jrodbx force-pushed the jrod/2024-05-29/moar-jellyfish-cleanup branch from 9259893 to 3e67547 Compare May 29, 2024 15:56
@jrodbx jrodbx merged commit 479f843 into master May 29, 2024
14 checks passed
@jrodbx jrodbx deleted the jrod/2024-05-29/moar-jellyfish-cleanup branch May 29, 2024 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants