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 Android sample project that embeds JSON as asset #181

Open
Goooler opened this issue Mar 17, 2023 · 4 comments
Open

Add Android sample project that embeds JSON as asset #181

Goooler opened this issue Mar 17, 2023 · 4 comments
Labels
enhancement New feature or request PR welcome

Comments

@Goooler
Copy link
Contributor

Goooler commented Mar 17, 2023

Like OSS Licenses Gradle Plugin did, we can generate build configs which contain pom infos for Apps to display, to replace oss-licenses-plugin as it doesn't support CC, but had been supported in this plugin.

@JakeWharton
Copy link
Collaborator

We generate a JSON file that you can use to generate whatever you want or embed directly into assets. We can add a sample of this at some point.

@Goooler
Copy link
Contributor Author

Goooler commented Mar 17, 2023

Good to know!

@JakeWharton JakeWharton changed the title Can we support generating build config? Add Android sample projec that embeds JSON as asset Mar 18, 2023
@JakeWharton JakeWharton changed the title Add Android sample projec that embeds JSON as asset Add Android sample project that embeds JSON as asset Mar 18, 2023
@erikeelde
Copy link

erikeelde commented May 11, 2023

I had the same problem. I started out using the example from https://www.jbamberger.de/development/2021/07/03/android-generating-asset-files.html which worked really well for a while. As it recently broke (with gradle 8 if I'm not mistaken) I started looking into fixing it and stumbled across your comment here.
I ended up publishing a plugin to the gradle plugin portal - usage can be found in the git repo: https://github.com/premex-ab/gross. I relies on the output of the licensee plugin. You can use it to either generate code or have it copy the artifacts.json file over to assets.

@JakeWharton
Copy link
Collaborator

Looks good! You're using all the right mechanisms to get the file into the APK's assets correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request PR welcome
Projects
None yet
Development

No branches or pull requests

3 participants