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

[bundletool] Remove com/sun/jna content #9162

Merged
merged 4 commits into from
Aug 12, 2024
Merged

Conversation

pjcollins
Copy link
Member

Context: c89de29

Various symbol and signing checks have been failing after bumping
bundletool.jar to version 1.17.0. We can fix these by stripping out the
offending content from bundletool.jar.

Context: c89de29

Various symbol and signing checks have been failing after bumping
bundletool.jar to version 1.17.0. We can fix these by stripping out the
offending content from bundletool.jar.
@pjcollins pjcollins marked this pull request as ready for review August 1, 2024 19:48
@pjcollins
Copy link
Member Author

it looks like this is still working, seems best to continue to modify this jar before tests run against it rather than trying to change it in post build-signing stage

Copy link
Member

@jonathanpeppers jonathanpeppers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If bundletool.jar appears to still work, let's try this for now.

@pjcollins pjcollins merged commit 9be9159 into main Aug 12, 2024
58 checks passed
@pjcollins pjcollins deleted the dev/pjc/remove-jna-bundletool branch August 12, 2024 18:07
@jonathanpeppers
Copy link
Member

Posting what I found, regarding usage of com.sun.jna:

.\gradlew dependencies
...
+--- com.android.tools:common:31.3.0-alpha14
...
|    +--- net.java.dev.jna:jna-platform:5.6.0
|    |    \--- net.java.dev.jna:jna:5.6.0

If I remove com.android.tools:common:31.3.0-alpha14, I get a few compile errors:

> .\gradlew build

> Task :compileJava
D:\src\bundletool\src\main\java\com\android\tools\build\bundletool\device\Device.java:25: error: package com.android.sdklib does not exist
import com.android.sdklib.AndroidVersion;
                         ^
D:\src\bundletool\src\main\java\com\android\tools\build\bundletool\device\Device.java:42: error: cannot find symbol
  public abstract AndroidVersion getVersion();
                  ^
  symbol:   class AndroidVersion
  location: class Device
D:\src\bundletool\src\main\java\com\android\tools\build\bundletool\device\DdmlibDevice.java:81: error: cannot find symbol
  public AndroidVersion getVersion() {
         ^
  symbol:   class AndroidVersion
  location: class DdmlibDevice
3 errors

> Task :compileJava FAILED

FAILURE: Build failed with an exception.

So, perhaps com.android.tools:common is only used for looking up an attached device's version. But generally deploying aab's seems to be working on CI.

I don't offhand see what would use com.sun.jna, so let's merge and try it out.

jonathanpeppers pushed a commit that referenced this pull request Aug 12, 2024
Context: c89de29

Various symbol and signing checks have been failing after bumping
bundletool.jar to version 1.17.0. We can fix these by stripping out the
offending content from bundletool.jar.
@github-actions github-actions bot locked and limited conversation to collaborators Sep 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants