build.gradle 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. // Top-level build file where you can add configuration options common to all sub-projects/modules.
  2. apply plugin: 'com.huawei.ohos.app'
  3. //For instructions on signature configuration, see https://developer.harmonyos.com/cn/docs/documentation/doc-guides/ide_debug_device-0000001053822404#ZH-CN_TOPIC_0000001154985555__section1112183053510
  4. ohos {
  5. compileSdkVersion 5
  6. defaultConfig {
  7. compatibleSdkVersion 4
  8. }
  9. }
  10. buildscript {
  11. repositories {
  12. maven {
  13. url 'https://repo.huaweicloud.com/repository/maven/'
  14. }
  15. maven {
  16. url 'https://developer.huawei.com/repo/'
  17. }
  18. jcenter()
  19. maven { url 'http://maven.benyanyi.com/nexus/content/repositories/mylove_hm/' }
  20. }
  21. dependencies {
  22. classpath 'com.huawei.ohos:hap:2.4.4.2'
  23. classpath 'com.huawei.ohos:decctest:1.2.4.0'
  24. classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
  25. }
  26. }
  27. allprojects {
  28. repositories {
  29. maven {
  30. url 'https://repo.huaweicloud.com/repository/maven/'
  31. }
  32. maven {
  33. url 'https://developer.huawei.com/repo/'
  34. }
  35. jcenter()
  36. //解决中文乱码问题
  37. tasks.withType(Javadoc) { //兼容中文
  38. options.addStringOption('Xdoclint:none', '-quiet')
  39. options.addStringOption('encoding', 'UTF-8')
  40. options {
  41. encoding "UTF-8"
  42. charSet 'UTF-8'
  43. links "http://docs.oracle.com/javase/7/docs/api"
  44. }
  45. }
  46. }
  47. }
  48. //task clean(type: Delete) {
  49. // delete rootProject.buildDir
  50. //}