Unpleasant surprise from Eclipse

    In some cases, Eclipse adds the source code from the jni directory to apk.

    An extremely unpleasant occasion to write this note.
    I think everyone imagines what a problem it might be to publish apk containing its own source code.
    This was discovered by accident.
    In the process of developing apk, our project weighed 19 megabytes.
    Before the release, we rethought project management and made several changes to the directory structure.
    In particular, they transferred the source code from jni to an external directory.
    And suddenly, during the assembly, the project lost 13 megabytes. At the same time, fully maintaining operability.
    Such a change in project behavior cannot be ignored. And we began to delve - what has changed.
    What was our surprise when, when unpacking apk from previous versions (yes, we store all signed assemblies), it turned out that they contained all the contents of the jni directory! Those same 6 megabytes.
    When we moved the source codes to a level higher than the project, they left the collector’s area of ​​responsibility and stopped adding to apk.
    At the moment, we have not figured out why Eclipse adds jni to the package during assembly, but we already consider it important to inform the community about this feature.

    I am extremely glad that we discovered this situation before the full publication and the beginning of promotion.
    It’s scary to imagine what you can run into by publishing your own source code. But it’s even worse to publish the source code for licensed private libraries.

    In fairness, in order not to give another reason to curse Eclipse:
    Eclipse in this text should be read as ADT. After all, it is not the Eclipse package that it collects, but ADT.

    Also popular now: