Chandela
Chandela

Reputation: 312

How to scan all open source libraries used in a project?

I want to scan all the libraries used in the android project. So that I can mention those libraries in a list whenever I remove or add new libraries in my project.

Like I added some libraries in-app dependencies and i want all of them to list down with their version name on one screen. So that I can mention used libraries with their licences in-app.

I want to identify that process in an automated way. So that whenever I add or remove the library from Gradle it will reflect the same on app.

Upvotes: 3

Views: 4565

Answers (3)

Andrew
Andrew

Reputation: 10222

https://github.com/mikepenz/AboutLibraries seems to be better than the Google tools.

implementation "com.mikepenz:aboutlibraries-core:7.1.0"
implementation "com.mikepenz:aboutlibraries:7.1.0"

Upvotes: 7

Giorgos Neokleous
Giorgos Neokleous

Reputation: 1767

Google has a plugin called play-services-oss-licenses.

The plugin even offers an activity to launch to show to the user all of them.

Steps:

  • Add in your root gradle file:
classpath 'com.google.android.gms:oss-licenses-plugin:0.10.1'
  • Add the plugin into your main module's gradle file:
apply plugin: 'com.google.android.gms.oss-licenses-plugin'
  • Add the library itself in your application's dependencies:
implementation 'com.google.android.gms:play-services-oss-licenses:17.0.0'
  • Launch the activity by calling:
startActivity(new Intent(this, OssLicensesMenuActivity.class));

Find more and how it works at the official documentation here.

Upvotes: 1

Karthik
Karthik

Reputation: 67

You can check all the libraries used in the android project using Analyzer APK optiopn.

Check Analyzer APK in Android Studio- you will be given a prompt to select your APK from the filesystem.

enter image description here

Upvotes: -2

Related Questions