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

add aidl parcelables into aar #16

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

0xera
Copy link
Collaborator

@0xera 0xera commented Oct 21, 2024

Closes #15

Comment on lines 81 to 77
attribute(Usage.USAGE_ATTRIBUTE, objects.named(Usage::class.java, Usage.JAVA_RUNTIME))
attribute(Usage.USAGE_ATTRIBUTE, objects.named(Usage::class.java, Usage.JAVA_API))
Copy link
Member

Choose a reason for hiding this comment

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

The second call overwrites the first, which one do you want to use and why? See comments in source code just above

Looks like you used JAVA_API in artifactsOf() for AIDL, so this could be left as JAVA_RUNTIME

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

sorry, forgot to remove first line. i have tried to left only JAVA_RUNTIME but in that case i cannot access to aidl files.

@0xera 0xera changed the title add aidl parcelables into aar Draft: add aidl parcelables into aar Oct 22, 2024
@natario1
Copy link
Member

I approved before seeing there was a new commit 😄 I guess you're still working on this.

I spent quite some time earlier to investigate why we need a special combination of API and RUNTIME, but I could not figure it out. In my understanding when you set the usage attribute in artifactsOf(), you kind of override the usage attribute given to the configuration. I'll check with your changes

attribute(Usage.USAGE_ATTRIBUTE, objects.named(Usage::class.java, Usage.JAVA_RUNTIME))
}
}
val configurationApi = configurations.create(nameOf(greasifiedName, "api")) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

aidl parcelable files from project dependencies can be accessed only via greaseApi configuration

@0xera 0xera changed the title Draft: add aidl parcelables into aar add aidl parcelables into aar Oct 24, 2024
@0xera
Copy link
Collaborator Author

0xera commented Oct 25, 2024

I dont have any other idea, so i have just added api configuration for special cases when we need include aidl parcelables from project dependencies in fat aat

@0xera
Copy link
Collaborator Author

0xera commented Oct 29, 2024

@natario1 what do you think about this solution?

@natario1
Copy link
Member

I'll take a look tomorrow!

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.

seems not support AIDL yet,does there has any schedule of that?
2 participants