build.gradle 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. // Top-level build file where you can add configuration options common to all sub-projects/modules.
  2. apply from: "config.gradle"
  3. buildscript {
  4. apply from : 'maven.gradle'
  5. repositories {
  6. maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
  7. addCommonMaven(repositories)
  8. //佳博SDK仓库
  9. maven {
  10. url "http://118.31.6.84:8081/repository/maven-public/"
  11. allowInsecureProtocol true
  12. }
  13. }
  14. dependencies {
  15. classpath "com.android.tools.build:gradle:4.2.0"
  16. // NOTE: Do not place your application dependencies here; they belong
  17. // in the individual module build.gradle files
  18. }
  19. }
  20. allprojects {
  21. repositories {
  22. flatDir {
  23. dirs 'libs'
  24. }
  25. addCommonMaven(repositories)
  26. //佳博SDK仓库
  27. maven {
  28. url "http://118.31.6.84:8081/repository/maven-public/"
  29. allowInsecureProtocol true
  30. }
  31. }
  32. tasks.withType(JavaCompile) {
  33. // 设置全局编码
  34. options.encoding = 'UTF-8'
  35. }
  36. tasks.withType(Javadoc) {
  37. // 设置文档编码
  38. options {
  39. encoding 'UTF-8'
  40. charSet 'UTF-8'
  41. links 'http://docs.oracle.com/javase/7/docs/api'
  42. }
  43. }
  44. // 将构建文件统一输出到项目根目录下的 build 文件夹
  45. setBuildDir(new File(rootDir, "build/${path.replaceAll(':', '/')}"))
  46. }
  47. task clean(type: Delete) {
  48. delete rootProject.buildDir
  49. }