equal
deleted
inserted
replaced
|
1 License sources |
|
2 =============== |
|
3 |
|
4 Setup |
|
5 ===== |
|
6 |
|
7 Add the dependency to your project |
|
8 |
|
9 ```kotlin title="build.gradle.kts" |
|
10 dependencies { |
|
11 implementation("com.geekorum.aboutoss:core:<latest-version>") |
|
12 } |
|
13 ``` |
|
14 |
|
15 OSS Licenses Gradle Plugin |
|
16 -------------------------- |
|
17 |
|
18 The [OSS Licenses Gradle Plugin](https://github.com/google/play-services-plugins/tree/main/oss-licenses-plugin) stores license information in Android resources. |
|
19 |
|
20 Create a [GmsLicenseInfoRepository](api/core/com.geekorum.aboutoss.core.gms/-gms-license-info-repository/index.html) to retrieves it. |
|
21 |
|
22 The `GmsLicenseInfoRepository` is only available on Android platform. |
|
23 |
|
24 ```kotlin |
|
25 val licenseInfoRepository = GmsLicenseInfoRepository( |
|
26 appContext = application |
|
27 ) |
|
28 ``` |
|
29 |
|
30 |
|
31 Licensee |
|
32 -------- |
|
33 |
|
34 [licensee](https://github.com/cashapp/licensee) report file can be used as a source of license information. |
|
35 |
|
36 Create a [LicenseeLicenseInfoRepository](api/core/com.geekorum.aboutoss.core.licensee/-licensee-license-info-repository/index.html) to read the report file. |
|
37 |
|
38 |
|
39 ```kotlin title="on iOS and Desktop" |
|
40 val licenseInfoRepository = LicenseeLicenseInfoRepository() |
|
41 ``` |
|
42 |
|
43 ```kotlin title="on Android" |
|
44 val licenseInfoRepository = LicenseeLicenseInfoRepository( |
|
45 assetManager = application.assets |
|
46 ) |
|
47 ``` |
|
48 |
|
49 LicensePlist |
|
50 ------------ |
|
51 |
|
52 On iOS, [LicensePlist](https://github.com/mono0926/LicensePlist) can be use to automatically generates a Plist of all your dependencies. |
|
53 |
|
54 Use [LicensePlistLicenseInfoRepository](api/core/com.geekorum.aboutoss.core.licenseplist/-license-plist-license-info-repository/index.html) |
|
55 to parse license information stored in your resources bundle. |
|
56 |
|
57 The `LicensePlistLicenseInfoRepository` is only available on iOS platform. |
|
58 |
|
59 ```kotlin |
|
60 val licenseInfoRepository = LicensePlistLicenseInfoRepository() |
|
61 ``` |
|
62 |