build.gradle 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. // Top-level build file where you can add configuration options common to all sub-projects/modules.
  2. buildscript {
  3. repositories {
  4. jcenter()
  5. google()
  6. }
  7. dependencies {
  8. classpath 'com.android.tools.build:gradle:3.4.1'
  9. // NOTE: Do not place your application dependencies here; they belong
  10. // in the individual module build.gradle files
  11. }
  12. }
  13. allprojects {
  14. repositories {
  15. google()
  16. jcenter()
  17. maven { url "https://jitpack.io" }
  18. }
  19. }
  20. task clean(type: Delete) {
  21. delete rootProject.buildDir
  22. }
  23. gradle.projectsEvaluated {
  24. tasks.withType(JavaCompile) {
  25. options.compilerArgs << "-Xmaxerrs" << "500" // or whatever number you want
  26. }
  27. }
  28. //static def generateVersionCode() {
  29. // def result = "git rev-list HEAD --count".execute().text.trim() //unix
  30. // if(result.empty) result = "PowerShell -Command git rev-list HEAD --count".execute().text.trim() //windows
  31. // if(result.empty) throw new RuntimeException("Could not generate versioncode on this platform? Cmd output: ${result.text}")
  32. // return result.toInteger()
  33. //}
  34. //static def generateVersionName() {
  35. // def result = "git describe".execute().text.trim() //unix
  36. // if(result.empty) result = "PowerShell -Command git describe".execute().text.trim() //windows
  37. // if(result.empty) throw new RuntimeException("Could not generate versioncode on this platform? Cmd output: ${result.text}")
  38. // return result
  39. //}