You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

build.gradle 2.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. // AndroidProject 版本:v13.1
  2. // 导入配置文件
  3. apply from : 'configs.gradle'
  4. buildscript {
  5. // 导入通用的 Maven 库配置
  6. apply from : 'maven.gradle'
  7. repositories {
  8. // 阿里云云效仓库(Gradle 插件):https://maven.aliyun.com/mvn/guide
  9. maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
  10. addCommonMaven(repositories)
  11. google()//新增这一行
  12. }
  13. // Studio 插件推荐:https://github.com/getActivity/StudioPlugins
  14. dependencies {
  15. // Gradle 插件版本说明:https://developer.android.google.cn/studio/releases/gradle-plugin.html#updating-plugin
  16. // noinspection GradleDependency
  17. classpath 'com.android.tools.build:gradle:4.1.2'
  18. // AOP 配置插件:https://github.com/HujiangTechnology/gradle_plugin_android_aspectjx
  19. classpath 'com.hujiang.aspectjx:gradle-android-plugin-aspectjx:2.0.10'
  20. classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
  21. classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
  22. classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.5.4"
  23. classpath 'com.jakewharton.hugo:hugo-plugin:1.2.1'
  24. }
  25. }
  26. allprojects {
  27. repositories {
  28. // 友盟远程仓库:https://info.umeng.com/detail?id=443&cateId=1
  29. maven { url 'https://repo1.maven.org/maven2' }
  30. addCommonMaven(repositories)
  31. google()//新增这一行
  32. }
  33. tasks.withType(JavaCompile) {
  34. // 设置全局编码
  35. options.encoding = 'UTF-8'
  36. }
  37. tasks.withType(Javadoc) {
  38. // 设置文档编码
  39. options {
  40. encoding 'UTF-8'
  41. charSet 'UTF-8'
  42. links 'http://docs.oracle.com/javase/7/docs/api'
  43. }
  44. }
  45. // 将构建文件统一输出到项目根目录下的 build 文件夹
  46. setBuildDir(new File(rootDir, "build/${path.replaceAll(':', '/')}"))
  47. }
  48. task clean(type: Delete) {
  49. delete rootProject.buildDir
  50. }
  51. ext {
  52. compileSdkVersion = 26
  53. buildToolsVersion = "26.0.2"
  54. minSdkVersion = 21
  55. targetSdkVersion = 22
  56. sourceCompatibility = JavaVersion.VERSION_1_7
  57. }