OptimiseyourAndroidStudiobuilds,bycreatinggeneratedprojects.InspiredbyGradleBuildExperiment.AtooltogenerateareallifeJavaandKotlinAndroidprojecttoanalyzeandimprovebuildtimes.
CreateareallifecomplexityAndroidprojectthatmimicsyourownandobservethebuildtimes.Ifthebuildtimesofthegeneratedprojectarewaysmallerthanyours,itmightbeworthinspectingdeeplyyourbuildconfigsandoptimize.
FeaturesConfigurablenumberofmodulesConfigurablenumberofpackagesConfigurablenumberofclassesConfigurablenumberofintermoduledependenciesAndroidresources(images,strings,activities,layouts)Configurableversionofgradle,kotlin,theandroidgradlepluginExperimentalBazelsupportDownloadTorun,grabthelatestJARandrunjava-jaras-poet.jar.
CommandlineargumentsAndroidStudioPoetsupportsthefollowingcommandlinearguments
Config-justrunjava-jaras-poet.jarMyConfig.jsonFolderwithconfigs-justrunjava-jaras-poet.jar<pathtoafolderwithconfigs>AndroidStudioPoetwillcrawlthefolderrecursivelyandexecuteeachconfiginturn.Build&RunClonetherepo./gradlewaspoet:fatJarjava-jaraspoet/build/libs/aspoet-all.jarHowThegeneratedsourceswillincludethebasicfunctionalityofmethodcallingbothinclassitselfandbetweenthegeneratedclasses,bothinJavaandKotlin
Thegeneratedbuild.gradlefileswillincludeothermodulesasdependencies
YoucancontrolAndroidresources(images,layoutsetc')
Youcancontrolproductflavors
Youcanhavebothsourceandresourcesinter-moduledependencies
ThisisnotanofficialGoogleproduct.
LicenseCopyright2017GoogleInc.LicensedundertheApacheLicense,Version2.0(the"License");youmaynotusethisfileexceptincompliancewiththeLicense.YoumayobtainacopyoftheLicenseathttps://www.apache.org/licenses/LICENSE-2.0Unlessrequiredbyapplicablelaworagreedtoinwriting,softwaredistributedundertheLicenseisdistributedonan"ASIS"BASIS,WITHOUTWARRANTIESORCONDITIONSOFANYKIND,eitherexpressorimplied.SeetheLicenseforthespecificlanguagegoverningpermissionsandlimitationsundertheLicense.
评论