1

Topic: Android library usage

Colleagues, I write here, instead of to "Mobile devices" therefore as here from mobile not so it is a lot of, and from infrastructure Java it is a lot of. I in an infrastructure am bad while I understand, prompt though words for . Sense: is  application in Android Studio (which variant IntelliJ Idea); there is an indirect library  on github which is planned to usage. The library gathers with the help maven, and also has two classes which are recommended to usage as the interface to library. Attention, a question: how it is the most correct from the java-religious point of view to use indirect libraries? Whether normally to collect library and to take from it only jar-files (to store jar-files in a repository, , not comme il faut, but I am ready to go on it)? Or it is possible to register somehow a way to  as dependence (at me "native" language of a C ++, therefore got used to such variant) and by the button to "collect" to collect at first library, and then actually the project? Here this maven which the indirect library - it simply another  for the assembly gathers, and in Android Studio is used for the same purposes gradle, yes?

2

Re: Android library usage

Hello, Dair, you wrote: whether D> Normally to collect library and to take from it only jar-files (to store jar-files in a repository, , not comme il faut, but I am ready to go on it)? Or it is possible to register somehow a way to  as dependence (at me "native" language of a C ++, therefore got used to such variant) and by the button to "collect" to collect at first library, and then actually the project? The reassembly  is mandatory? Almost for certain collected jar already lies in any public  repositories. To begin with it is possible to look on http://search.maven.org, in the same place will be written what to add in gradle a script to add dependence. For example here page for Guava: http://search.maven.org/#artifactdetail … 1%7Cbundle And generally a useful reference: https://docs.gradle.org/current/usergui … ement.html D> Here this maven which the indirect library - it simply another  for the assembly gathers, and in Android Studio is used for the same purposes gradle, yes? As a whole yes... <<RSDN@Home 1.0.0 alpha 5 rev. 0>>

3

Re: Android library usage

If the library is not present in public repositories (doubtfully) to collect library, to suppose in an internal repository (archiva/artifactory/...) and to connect as dependence through Gradle. It is possible to suppose it is direct in the project and to connect so, but it not so comme il faut. As a last resort it is possible to throw simply source codes near to the, but it is absolutely extreme case.

4

Re: Android library usage

Hello, Dziman, you wrote: D> the Reassembly  is mandatory? No, certainly. To simply me as c to the ++-developer, it sees best practice. In Java, apparently, not so? D> Almost for certain collected jar already lies in any public  repositories. To begin with it is possible to look on http://search.maven.org, in the same place will be written what to add in gradle a script to add dependence. For example here page for Guava: http://search.maven.org/#artifactdetail … 1%7Cbundle And this world storage  dzhava-components the such? Familiarized, abruptly, certainly. "What to add in gradle a script" - explain, please. Well here, let us assume, I will find necessary . I register something in a gradle-script, and.... It in build process downloads to me necessary jar? D> And generally a useful reference: https://docs.gradle.org/current/usergui … ement.html Thanks, I will study.

5

Re: Android library usage

Hello, vsb, you wrote: vsb> If libraries are not present in public repositories (doubtfully) to collect library, to suppose in an internal repository (archiva/artifactory/...) and to connect as dependence through Gradle. About as abruptly, thanks for the marvelous new world. That is, this "an internal repository" - it for that in the company to use the same versions of libraries, yes? Well, it in that  when they are not present in public access, certainly. I correctly understand? vsb> it is possible to suppose it is direct in the project and to connect so, but it not so comme il faut. It in sense jar to suppose in the project? vsb> as a last resort it is possible to throw simply source codes near to the, but it is absolutely extreme case. Clearly, that is, on-design dependences did not make. It is accepted, I will master a public repository.

6

Re: Android library usage

Hello, Dair, you wrote: D> About as abruptly, thanks for the marvelous new world. That is, this "an internal repository" - it for that in the company to use the same versions of libraries, yes? Well, it in that  when they are not present in public access, certainly. I correctly understand? No. At you it is local on a computer there is a directory-cache of all of that that downloaded Maven from a central repository. A trick in that that you there place any library with any id. And then it you use in pom.xml. In yours user home/.m2 on-default.

7

Re: Android library usage

Hello, Dair, you wrote: vsb>> If libraries are not present in public repositories (doubtfully) to collect library, to suppose in an internal repository (archiva/artifactory/...) And to connect as dependence through Gradle. D> About as abruptly, thanks for the marvelous new world. That is, this "an internal repository" - it for that in the company to use the same versions of libraries, yes? Well, it in that  when they are not present in public access, certainly. I correctly understand? Correctly. It is possible to put the projects there. Still normally there do "proxy", i.e. all dependences are swung through it, not important, public they or not the public. It allows not to depend on theoretical falling of public servers (though such on my storage was not) and to have much bigger speed (if the server in a local network). vsb>> It is possible to suppose it is direct in the project and to connect so, but it not so comme il faut. D> It in sense jar to suppose in the project? Yes. vsb>> As a last resort it is possible to throw simply source codes near to the, but it is absolutely extreme case. D> it is clear, that is, on-design dependences did not make. It is accepted, I will master a public repository. There are multimodular projects, but it for the projects, instead of for dependences. Certainly hinders nothing them so to use, but I so did not do.

8

Re: Android library usage

10/20/2016 23:50, Dair writes:> vsb> As a last resort it is possible to throw simply source codes near to the, but> it is absolutely extreme case.> it is clear, that is, on-design dependences did not make. It is accepted,> I will master a public repository. Here a question ideological. If this  in relation to your project exterior, that is its code you are not going to correct - that it is necessary to connect it as the dependence undertaking from a repository (public, corporate, directories in the project, ~/.m2 - not an essence). If thus it would be desirable navigation on its source codes - that standards maven/gradle and their integration in IDEA provide downloading of source codes and javadoc from this a repository if they there are supposed  libraries in a type-source.jar and-javadoc.jar. If they there are not present - IDEA not bad decompiles on the move. If you are going to correct the code of this  under yourselves - that should be made its source codes the unit of the project. Whether there will be this unit (which essence a directory on a disk) to belong to the same project from the point of view of SCM or to be connected as external each time separately but if there are no essential arguments for its selection in the separate project in SCM it is better so not to do (anyway it any more usage question maven/gradle, and the question of storage of the code in SCM) dares. If results of your editings are necessary to other projects in firm -   to the version of this unit in a corporate repository (that it normally worked - from it there should not be a link on parent). - WBR, Serge. Posted via RSDN NNTP Server 2.1 beta