I recently met an alternatively mysterious chap referred to as Nick. Nick was a hobbyist Android developer, and he desired to understand how he ought to publish some of his code as a library for other builders. Having completed the same aspect in advance these 12 months, I excellently assisted.
Nick: Ho ho ho, hello, Max!
Max: Err, hello. Am I now not sure I realize you?
Nick: Oh. No, I don’t understand you either. But what’s up? Besides, I’m Nick, and it’s jolly right to fulfill you!
Max: It’s high-quality to meet you, too, Nick.
Nick: I’ll get right to the point; I was hoping you could help me with a touch Android mission of mine. I’ve been dabbling in Android development, and now I’ve got a few codes that I think different builders might discover useful. I need to submit it as a library, But I’m unsure where to start.
Max: Okay, well, one of the simplest approaches to applying to a website known as Bintray.
Nick: I think I’ve heard of that.
Max: Yeah, a variety of libraries are hosted there. The default source for dependencies in all-new Android Studio tasks is a Bintray repository called JCenter.
To put up your code as a library on Bintray, there are three steps:
Get all the library code into its library module in Android Studio.
Read More Article:
- Mobile Latest Plan to Steal Away AT&T’s Customers
- Google rebrands Android for Work as just Android
- Motorola starts offevolved testing Android
- Thailand’s parliament to ask the crown prince to end up a new king
- Why 47 Companies Stopped Competing And Started
Install an account on Bintray at the side of a repository and a package deal for your library.
Upload some code of yours to the construct—gradle record.
Nick: OK, how long will all that take? Do your thoughts go through it collectively now?
Max: Certain, it shouldn’t take too long.
A library module
Commercial
Nick: The code I want to proportion. It’s just a part of an actual Android app I’ve been working on.
Max: That’s first-rate; we can create a new module within that existing mission and publish handiest that.
Nick: Adequate, so I go to “document”> “New”> “New Module…”, then is it this one, “Android Library”?
Max: Yep, that’s it. Now you want a name and make sure the package deal call of the brand new module is distinctive to that of the app, or it won’t construct.
Nick: OK, properly, the app is known as the Electronic Listing Facility (ELF). However, I will call the library “Naughty or Exceptional,” after which the module call might be “naughty or nice,e” and the bundle called “North pole.Nick.Naughty or nice”.
Max: What does this code do, Nick?
Nick: Ho ho ho, nicely, you notice it’s for checking whether or not a person is at the naughty Listing or the Quality List.