question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Custom OssLicensesMenuActivity/component and/or full flexibility on display

See original GitHub issue

Problem: If the application theme in the manifest is, for example, a “no action bar theme”, the title can’t be displayed, since I can’t override the theme for OssLicensesMenuActivity. Please let us subclass the activity or at least set a theme on it.

A better option is making the list a component (fragment?) that I can include in my own activity.

The best solution, however, is to have also a method that returns a data structure (list of licenses and dependency-license mapping) so I can display it in my own way. For example, I might want to group by license, i.e., list distinct licenses and, on each item’s subtitle, list the packages using that same license. This would also solve #73, since we would be able to manually add licenses not related to gradle or maven. For example, resources like icons, etc, which may require a notice somewhere, could be added in my custom implementation of the activity. This is the best solution, since it gives us full flexibility on what info is shown and how.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:10
  • Comments:7

github_iconTop GitHub Comments

1reaction
VuHongKycommented, Sep 29, 2021

Why OssLicensesMenuActivity is final and can not be extended? That’s so annoying and take my time! Android is open, so let make it open! Please!

1reaction
alixwarcommented, Aug 10, 2020

By the way (sorry if it’s a dumb question), although the plugin is called “oss-licenses” it isn’t guaranteed that all dependencies listed on it are actually open-source, right?

I can confirm that it’s not guaranteed in theory but pretty much in practice. Here’s a longer explanation: I was able to display a library with a proprietary license in an app using the OSS license plugin. These preconditions had to be met, however:

  • Artifact is retrieved from a Maven2 repository (typically all public repos require uploaded artifacts to be open source, but you can host your own repo as I did) as the OSS plugin reads from metadata (pom.xml) files that are declared outside of the actual binary.
  • License metadata, https://maven.apache.org/pom.html#Licenses, is defined for this artifact

To include license information that can be picked up by the OSS plugin you would need to explicitly define the pom.xml metadata when publishing to the Maven repository as the native Gradle metadata format, https://docs.gradle.org/current/userguide/publishing_gradle_module_metadata.html, does not support license information (at least it’s not clearly defined).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Andor - The Best Show At The Worst Time - YouTube
Andor is without doubt the best Star Wars show that Disney have managed to produce. Yeah, that's not exactly a high benchmark, ...
Read more >
LEGO Star Wars: Andor - Cassian Andor - Custom Minifigure
LEGO Star Wars: Andor - Cassian Andor - Custom Minifigure -. 3 views 8 minutes ago. CasamusLEGO Custom Minifigures ... Show more. Show...
Read more >
Andor Season Finale Offers Path Forward for Star Wars
It brings his character's season one journey full circle, and inches him that much closer to the Cassian Andor that steals the Death...
Read more >
Andor - Rotten Tomatoes
Visit our Cookie Notice and Privacy Policy to learn more. We and our partners process data to provide: Store and/or access information on...
Read more >
'Andor' costume designer Michael Wilkinson talks Star Wars chic
I also wanted to show audiences something new and compelling and surprising. "For example, with the Imperial uniforms, it's obviously set in ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found