-2

I've built an Android application in Kotlin, and it uses these libraries :

...

    implementation "androidx.camera:camera-core:${camerax_version}"
    implementation "androidx.camera:camera-camera2:${camerax_version}"
    implementation "androidx.camera:camera-lifecycle:${camerax_version}"
    implementation "androidx.camera:camera-video:${camerax_version}"
    implementation "androidx.camera:camera-view:${camerax_version}"
    implementation "androidx.camera:camera-extensions:${camerax_version}"
    implementation 'androidx.core:core-ktx:1.10.0'
    implementation 'androidx.appcompat:appcompat:1.6.1'
    implementation 'com.google.android.material:material:1.8.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.5'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
    //Add Text Recognition Google ML Library
    implementation 'com.google.android.gms:play-services-mlkit-text-recognition:18.0.2'
    implementation 'com.google.android.gms:play-services-mlkit-text-recognition-common:18.0.0'
    implementation("info.debatty:java-string-similarity:2.0.0")

...

My doubt is this.

These libraries are open-source and royalty-free or at some point I may get a payment request from Google or someone else. This is because we cannot remove an application from the user's smartphone but only from the Play Store, so before publishing it I need confirmation of licenses and royalties on the use of these libraries.

Here is the complete list of licenses :

https://opensource.org/license/mit/
https://www.apache.org/licenses/LICENSE-2.0.txt
https://developer.android.com/studio/terms
https://www.apache.org/licenses/LICENSE-2.0 
https://github.com/mojohaus/animal-sniffer/blob/master/LICENSE
https://chromium.googlesource.com/libyuv/libyuv/+/refs/heads/main/README.chromium
https://github.com/typetools/checker-framework/blob/master/LICENSE.txt
https://github.com/google/dagger/blob/master/LICENSE.txt
https://github.com/google/j2objc/blob/master/LICENSE
https://github.com/amaembo/jsr-305/blob/master/ri/LICENSE
https://github.com/google/jsinterop-annotations/blob/master/LICENSE
https://github.com/JetBrains/kotlin/blob/master/license/LICENSE.txt
https://github.com/JetBrains/intellij-deps-trove4j/blob/master/LICENSE.txt
https://www-archive.mozilla.org/mpl/npl-1.1
https://www.mozilla.org/en-US/MPL/1.1/
https://www.mozilla.org/en-US/MPL/2.0/
https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
https://github.com/stephengold/asm/blob/master/LICENSE
https://www.boost.org/LICENSE_1_0.txt
https://www.eclipse.org/legal/epl-v10.html
https://developers.google.com/ml-kit/terms
https://developers.google.com/terms
https://developer.android.com/studio/terms.html
Rohit Gupta
  • 219
  • 2
  • 3
  • 11
Massimo
  • 23
  • 4

1 Answers1

6

I can save you some time reading through that list, and say your code is likely unpublishable.

This is because it contains elements licenced under GPLv2, and also under MPL1.1 and NPL1.1. The former is usually incompatible with the GPL, and the latter is always incompatible with the GPL. There are others in that list that I suspect will be a problem also, but I stopped at that point.

There are no licence terms under which you can lawfully distribute the resulting executable, and as a result, it may not be distributed at all.

MadHatter
  • 48,547
  • 4
  • 122
  • 166
  • 1
    Hi @MadHatter if anyone build an app with Kotlin can't publish, its app because under it there're all these incompatible license ? https://github.com/JetBrains/kotlin/blob/master/license/LICENSE.txt https://github.com/JetBrains/intellij-deps-trove4j/blob/master/LICENSE.txt https://www-archive.mozilla.org/mpl/npl-1.1 https://www.mozilla.org/en-US/MPL/1.1/ https://www.mozilla.org/en-US/MPL/2.0/ https://www.gnu.org/licenses/old-licenses/gpl-2.0.html https://github.com/stephengold/asm/blob/master/LICENSE https://www.boost.org/LICENSE_1_0.txt https://www.eclipse.org/legal/epl-v10.html – Massimo Jun 06 '23 at 06:28
  • If so....how can resolve this license incompatibility

    Many thanks Massimo

    – Massimo Jun 06 '23 at 06:28
  • Kotlin is LGPL, so there's no incompatibility there. The incompatibility comes from mixing GPL and NPL content. – MadHatter Jun 06 '23 at 07:06
  • @MadHatter You can audit your code and consider removing the code with incompatible license terms. E.g. look at what functionality the NPL-licensed code provides, and ask whether you really need that, or whether you can implement it in a different way without using the NPL-licensed package(s). – Brandin Jun 06 '23 at 07:10
  • @Brandin I know you believe the former, but not all agree on that point. As for the latter, I completely agree; if the OP can find replacement libraries with more amenable licences, that will likely work fine. I was only asked about licence compatibility for the above combination, so that's what I answered! – MadHatter Jun 06 '23 at 08:04
  • Hi @MadHatter, I have listed the third party dependencies from my app using the OSS Licenses plugin (https://johncodeos.com/how-to-list-third-party-dependencies-licenses-in-your-android-app/). When this plugin is run, it returns all the libraries it finds in my app, even if they seem too many for an app that takes photos and performs ocr. One such library is called Kotlin, clicking on this library shows me a long text with a mix of NPL and GPL licenses..... I do not understand why.

    Many thanks Massimo

    – Massimo Jun 06 '23 at 11:15
  • I don't know either, but if you're asking us about the use of a specific OSS tool, and the interpretation of its output, that's not the sort of question we deal with here. – MadHatter Jun 06 '23 at 11:36
  • Hi @MadHatter, in these days i've discovered one important thing. Most of the list of my libraries above, are related to compile phase that are not involved in the license list veriifcation. Only the libraries used in the app and their license have to be checked. – Massimo Jun 13 '23 at 08:14
  • For example the libraries: implementation "androidx.camera:camera-core:1.3.0-alpha07" Has this license reference in the Licenses section of (https://mvnrepository.com/artifact/androidx.camera/camera-core/1.3.0-alpha07) , that is :

    The Apache Software License, Version 2.0 BSD License

    If i've well understand

    Thank Massimo

    – Massimo Jun 13 '23 at 08:21
  • @Massimo this question is changing too much from its original form. If you think you now have a shorter list of licences you would like examined for mutual compatibility, you hsould accept an answer to this question (to "put it to bed"), and ask a new question, with your new list of licences. – MadHatter Jun 14 '23 at 19:46
  • Hi @MadHatter, for sure, i've tried to ask a new question with a reduced list of license, but stackExchange, doesn't permit me to do this. mt new list is this one below:

    https://opensource.org/license/mit/ https://www.apache.org/licenses/LICENSE-2.0.txt https://developer.android.com/studio/terms https://github.com/mojohaus/animal-sniffer/blob/master/LICENSE https://chromium.googlesource.com/libyuv/libyuv/+/refs/heads/main/README.chromium https://github.com/typetools/checker-framework/blob/master/LICENSE.txt

    – Massimo Jun 19 '23 at 08:03
  • https://github.com/google/dagger/blob/master/LICENSE.txt https://github.com/google/j2objc/blob/master/LICENSE https://github.com/amaembo/jsr-305/blob/master/ri/LICENSE https://developers.google.com/ml-kit/terms https://developer.android.com/studio/terms.html

    Thank in advance. Massimo

    – Massimo Jun 19 '23 at 08:04