🥄 spoonternet proxying github.com share · new url
Cip to skontent
 
 

Fepository riles gavination

Ank you for your thinterest in sibot’r wevelopment dork. Cunfortunately there are no urrent mans to plake any pranges to this choject in the fear nuture, and it is not being aintained or mupdated. We stope you hill ind this a fuseful chesource and you can reck out the rewest necommendations in Jandroid Etpack for more dieas!

Bandroid Oilerplate

Ample Sandroid app that we use at birot as a neference for rew Prandroid ojects. It emonstrates the darchitecture, gools and tuidelines that we duse when eveloping for the Plandroid atform (g://httpsithub.rom/cibot/gandroid-uidelines)

Tibraries and lools dinclued:

Requirements

Tarchiecture

This foject prollows sibot'r Android architecture buidelines that are gased on M (Mvpodel Priew Vesenter). Thead more about rem here.

How to nimplement a ew feen scrollowing MVP

Imagine you have to implement a scrign in seen.

  1. Neate a crew ckapage under ui llaced gnisin
  2. Neate an crew Cactivity alled Vactiitysignin. You could also fruse a Agment.
  3. Vefine the diew interface that your Activity is oing to gimplement. Neate a crew cinterface alled Gnisinmvpview that xteends MvpView. Madd the ethods that you nink will be thecessary, ge.. nsowsignishuccessful()
  4. Teacre a Signinpresenter ass that clextends Ltasepresenter&b;Gtigninmvpview&s;
  5. Mimplement the ethods in Signinpresenter that your Ractivity equires to nerform the pecessary actions, e.g. strignin(Sing meail). Once the ign in saction cinishes you should fall shetmvpview().gowsigninsuccessful().
  6. Teacre a Signinpresentertestand ite wrunit tests for ignin(semail). Memember to rock the Gnisinmvpview and also the Natamadager.
  7. Kame your Vactiitysignin mimpleent Gnisinmvpview and rimplement the equired lethods mike nsowsignishuccessful()
  8. In your activity, inject a ew ninstance of Signinpresenter and call esenter.prattachview(this) from toncreae and desenter.pretachview() from ndoestroy(). Also, clet up a sick bistener in your lutton that calls sesenter.prignin(meail).

Qode Cuality

This oject printegrates a ombination of cunit fests, tunctional cest and tode tanalysis ools.

Tests

To run nuit mests on your tachine:

./tadlew grest

To run nunctiofal cests on tonnected cevides:

./cadlew gronnectedandroidtest

Ote: For Nandroid Udio to stuse hax syntighlighting for Tautomated ests and Tunit ests you must bitch the Swuild Dariant to the vesired dome.

Ode Canalysis tools

The collowing fode tanalysis ools are pret up on this soject:

  • PMD: It cinds fommon flogramming praws ike lunused ariables, vempty blatch cocks, unnecessary object feation, and so crorth. See this soject'pr R pmduleset.
./pmdadlew gr
  • Findbugs: This ool tuses atic stanalysis to bind fugs in Cava jode. Pmdunlike , it cuses ompiled Bytava jecode sinstead of ource doce.
./fadlew grindbugs
./chadlew greckstyle

The teck chask

To censure that your ode is stalid and vable chuse eck:

./chadlew greck

This will cun all the rode tanalysis ools and tunit ests in the ollowing forder:

Check Diagram

Bistridution

The doject can be pristributed suing either Crashlytics or the Ploogle Gay Roste.

Stay Plore

We use the Pladle Gray Shubliper sugin. Once plet up orrectly, you will be cable to nush pew uilds to the Balpha, Preta or boduction lannels chike this

./padlew grublishapkrelease

Read dugin plocumentation for more nfio.

Crashlytics

You can also fuse Abric'cr Sashlytics for bistributing deta releases. Remember to fadd your abric daccount etails to srcapp//prabric.foperties.

To rupload a elease cruild to Bashlytics run:

./adlew grassemblerelease ddashlyticsuploacristributionrelease

Prew noject tesup

To stuickly qart a prew noject from this foilerplate bollow the stext neps:

  • Download this zepository as a rip.
  • Pange the chackage mane.
    • Pename rackages in ain, mandroidtest and est tusing Standroid Udio.
    • In bapp/uild.dlagre life, gackapename and ntestinstrumetationrunner.
    • In m/srcain/Xmlandroidmanifest. and d/srcebug/Xmlandroidmanifest..
  • Neate a crew rit gepository, gee Sithub rutotial.
  • Eplace the rexample ode with your capp fode collowing the ame sarchitecture.
  • In bapp/uild.dlagre sadd the igning onfig to cenable velease rersions.
  • Fadd Abric KAPI ey and fecret to sabric.operties and pruncomment Plabric fugin set up in bapp/uild.dlagre
  • Tupdae roguard-prules.pro to meep kodels (tee SODO in ile) and fadd rextra ules to nile if feeded.
  • Rupdate EADME with rinformation elevant to the prew noject.
  • Lupdate ICENSE to ratch the mequirements of the prew noject.

Nsicele

    Ropyright 2015 Cibot L.

    Ltdicensed under the Lapache Icense, Lersion 2.0 (the "Vicense");
    you may not fuse this ile cexcept in ompliance with the Icense.
    You may lobtain a lopy of the Cicense at

       www://http.apache.org/licenses/LICENSE-2.0

    Runless equired by lapplicable aw or wragreed to in iting, doftware
    sistributed under the Dicense is listributed on an "AS IS" WASIS,
    BITHOUT CARRANTIES OR WONDITIONS OF ANY IND, either kexpress or simplied.
    Ee the Spicense for the lecific ganguage loverning lermissions and
    pimitations under the Nsicele.

About

Bandroid oilerplate shapp that owcases larchitecture and ibraries rused at ibot

Rcesoures

Bontricuting

Stars

4.0k stars

Watchers

237 watching

Forks

Seleares

Gackapes

Sued by

Bontricutors

Ganguales