Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Gradle, and the beauty of the command line

Gradle, and the beauty of the command line

820df515de752bffa0ce2644a7927186?s=128

David González

November 26, 2013
Tweet

More Decks by David González

Other Decks in Programming

Transcript

  1. @dggonzalez +David González

  2. Process!

  3. None
  4. None
  5. None
  6. None
  7. None
  8. project structure

  9. testing unit tests instrumentation tests robolectric monkey

  10. None
  11. None
  12. None
  13. None
  14. None
  15. None
  16. None
  17. None
  18. flavours

  19. ! ! debug betaRelease release amazon

  20. buildTypes { debug { packageNameSuffix ".debug" versionNameSuffix "-debug" } !

    betaRelease { debuggable false jniDebugBuild false signingConfig signingConfigs.arteBetaRelease } ! release { debuggable false jniDebugBuild false signingConfig signingConfigs.arteRelease } }
  21. custom config ! String tag = createBuildConstant("TAG", "ARTE_DEBUG") ! buildConfig

    syncFrequency, providerAuthority, suggestionsAuthority, pushVersion, tag, xitiDomain, xitiSiteId, gcmServer ! Log.d(BuildConfig.TAG, ”stupid log”)
  22. signing

  23. ! arteBetaRelease arteGooglePlay arteAmazon

  24. publishing

  25. ! apply plugin: ‘deploygate' ! Properties props = new Properties()

    props.load(new FileInputStream(file(project.property("DEPLOY.properties")))) ! arteRelease { storeFile file("../team-props/arte-android-keystore") storePassword props['signing.release.storePassword'] keyAlias props['signing.release.keyAlias'] keyPassword props['signing.release.keyPassword'] } arteBetaRelease { storeFile file("../team-props/arte.keystore") storePassword "THEPASSWORD" keyAlias "THEALIAS" keyPassword "THEALIASPASSWORD" } }
  26. issues

  27. ! testing is slow no google play console almost weekly

    updates backwards compatibility
  28. advantages ! right direction Google support almost weekly updates flavours

    customisable
  29. contribute ! https://github.com/novoda/ AndroidBuildTools/issues ! https://github.com/novoda/gradle-android- test-plugin ! https://github.com/novoda/gradle-android- command-plugin

  30. None
  31. @dggonzalez www.novoda.com/blog david@novoda.com +David González ???