WordPress for Android - GitHub

文章推薦指數: 80 %
投票人數:10人

properties-example gradle.properties to set up the sample app credentials file. In Android Studio, open the project from the local repository. This will auto- ... Skiptocontent {{message}} wordpress-mobile / WordPress-Android Public Notifications Fork 1.3k Star 2.6k WordPressforAndroid android.wordpress.org GPL-2.0License 2.6k stars 1.3k forks Star Notifications Code Issues 712 Pullrequests 74 Actions Projects 3 Wiki Security Insights More Code Issues Pullrequests Actions Projects Wiki Security Insights Thiscommitdoesnotbelongtoanybranchonthisrepository,andmaybelongtoaforkoutsideoftherepository. trunk Branches Tags Couldnotloadbranches Nothingtoshow {{refName}} default Couldnotloadtags Nothingtoshow {{refName}} default 476 branches 870 tags Code Latestcommit mchowning Mergepullrequest#16332fromwordpress-mobile/fix/prevent-prevew-ca… … 7acb897 Apr22,2022 Mergepullrequest#16332fromwordpress-mobile/fix/prevent-prevew-ca… …che-on-atomic Useexternalbrowserforallatomicpreviewstoavoidcachingissue 7acb897 Gitstats 65,757 commits Files Permalink Failedtoloadlatestcommitinformation. Type Name Latestcommitmessage Committime .buildkite     .bundle     .circleci     .configure-files     .github     .idea     WordPress     aars     config     docs     fastlane     gradle/wrapper     keystore     libs     tools     .configure     .editorconfig     .gitattributes     .gitignore     .ruby-version     CODE-OF-CONDUCT.md     CONTRIBUTING.md     Gemfile     Gemfile.lock     LICENSE.md     README.md     RELEASE-NOTES.txt     build.gradle     gradle.properties-example     gradlew     gradlew.bat     local-builds.gradle-example     settings.gradle     version.properties     Viewcode WordPressforAndroid BuildInstructions OAuth2Authentication BuildandTest Directorystructure GoogleConfiguration Contributing Security GettinginTouch Documentation Resources License README.md WordPressforAndroid Ifyou'rejustlookingtoinstallWordPressforAndroid,youcanfind itonGooglePlay.Ifyou'readeveloperwantingtocontribute,readon. BuildInstructions Makesureyou'veinstalledAndroidStudio. InstallnpmusingNodeVersionManager(nvm),asdescribedinsteponefromtheBlockEditorQuickstartguide cdWordPress-Androidtoentertheworkingdirectory. cpgradle.properties-examplegradle.propertiestosetupthesampleappcredentialsfile. InAndroidStudio,opentheprojectfromthelocalrepository.Thiswillauto-generatelocal.propertieswiththeSDKlocation. Recommended:TheCIusesJDK11tobuildtheappandrunthetests.Sometestswon'tpassontheJDKembeddedinAndroidStudio(JDK8).YoumightwanttosetJAVA_HOMEandJDKlocationinAndroidStudiotoJDK11. GotoTools→AVDManagerandcreateanemulateddevice. Run. Notes: TouseWordPress.comfeatures(logintoWordPress.com,accessReaderandStats,etc)youneedaWordPress.comOAuth2IDandsecret.PleasereadtheOAuth2Authenticationsection. Whileloading/buildingtheappinAndroidStudioignoretheprompttoupdatethegradlepluginversionasthatwillprobablyintroducebuilderrors.Ontheotherhand,feelfreetoupdateifyouareplanningtoworkonensuringthecompatibilityofthenewerversion. OAuth2Authentication InordertouseWordPress.comfunctionsyouwillneedaclientIDand aclientsecretkey.Thesedetailswillbeusedtoauthenticateyour applicationandverifythattheAPIcallsbeingmadearevalid.Youcan createanapplicationorviewdetailsforyourexistingapplicationswith ourWordPress.comapplicationsmanager. Whencreatingyourapplication,youshouldselect"Nativeclient"forthe applicationtype.Theapplicationsmanagercurrentlyrequiresa"redirectURL", butthisisn'tusedformobileapps.Justuse"https://localhost". Onceyou'vecreatedyourapplicationintheapplicationsmanager,you'll needtoeditthe./gradle.propertiesfileandchangethe wp.oauth.app_idandwp.oauth.app_secretfields.Thenyoucancompileand runtheapponadeviceoranemulatorandtrytologinwithaWordPress.com account.NotethatauthenticatingtoWordPress.comviaGoogleisnotsupported indevelopmentbuildsoftheapp,onlyintheofficialrelease. NotethatcredentialscreatedwithourWordPress.comapplicationsmanager allowloginonlyandnotsignup.Newaccountsmustbecreatedusingtheofficialapp orontheweb.LoginisrestrictedtotheWordPress.com accountwithwhichthecredentialswerecreated.Inotherwords,ifthecredentials [email protected],[email protected]. [email protected]"password"grant_typeerror. Forsecurityreasons,someaccount-relatedactionsaren'tsupportedfordevelopment buildswhenusingaWordPress.comaccountwith2-factorauthenticationenabled. ReadmoreaboutOAuth2andtheWordPress.comRESTendpoint. BuildandTest Tobuild,install,andtesttheprojectfromthecommandline: $./gradlewassembleWordPressVanillaDebug#assemblethedebug.apk $./gradlewinstallWordPressVanillaDebug#installthedebug.apkifyouhavean #emulatororanAndroiddeviceconnected $./gradlew:WordPress:testWordPressVanillaDebugUnitTest#assemble,installandrununittests $./gradlew:WordPress:connectedWordPressVanillaDebugAndroidTest#assemble,installandrunAndroidtests Directorystructure . ├──libs#dependenciesusedtobuilddebugvariants ├──tools#scriptcollection ├──gradle.properties#propertiesimportedbythebuildscript ├──WordPress │|--build.gradle#mainbuildscript │  └──src │  ├──androidTest#Androidtestassets,resourcesandcode │  ├──test#Unittests │  ├──main │  │  ├──assets#mainprojectassets │  │  ├──java#mainprojectjavacode │  │  └──res#mainprojectresources │  ├──debug#debugvariant │  └──wasabi#wasabivariantspecificresourcesandmanifest GoogleConfiguration GoogleSign-InisonlyavailableforWordPress.comaccountsthroughtheofficialapp. Contributorscanbuildandruntheappwithoutissue,butGoogleSign-Inwillalwaysfail. GoogleSign-Inrequiresconfigurationfileswhichcontainclientandserverinformation thatcan'tbesharedpublicly.Moredocumentationandguidescanbefoundonthe GoogleIdentityPlatformwebsite. Contributing ReadourContributingGuidetolearnaboutreportingissues,contributingcode,andmorewaystocontribute. Security Ifyouhappentofindasecurityvulnerability,wewouldappreciateyoulettingusknowathttps://hackerone.com/automatticandallowingustorespondbeforedisclosingtheissuepublicly. GettinginTouch Ifyouhavequestionsorjustwanttosayhi,jointheWordPressSlackanddropamessageonthe#mobilechannel. Documentation CodingStyle-guidelinesandvalidationandauto-formattingtools PullRequestGuidelines-branchnamingandhowtowritegoodpullrequests Pleasereadthedocsformore. Resources WordPressMobileBlog WordPressMobileHandbook License WordPressforAndroidisanOpenSourceprojectcoveredbythe GNUGeneralPublicLicenseversion2.Note:code inthelibs/directorycomesfromexternallibraries,whichmight becoveredbyadifferentlicensecompatiblewiththeGPLv2. About WordPressforAndroid android.wordpress.org Topics android java wordpress website app mobile secret read write oauth2-authentication Resources Readme License GPL-2.0License Codeofconduct Codeofconduct Stars 2.6k stars Watchers 214 watching Forks 1.3k forks Releases 478 19.6 Latest Apr18,2022 +477releases Contributors166 +155contributors Languages Kotlin 61.8% Java 37.3% Ruby 0.7% Shell 0.1% HTML 0.1% Python 0.0% Youcan’tperformthatactionatthistime. Yousignedinwithanothertaborwindow.Reloadtorefreshyoursession. Yousignedoutinanothertaborwindow.Reloadtorefreshyoursession.



請為這篇文章評分?