build.gradle 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. apply plugin: 'groovy'
  2. apply plugin: 'maven'
  3. repositories {
  4. mavenCentral()
  5. }
  6. dependencies {
  7. compile gradleApi()
  8. compile localGroovy()
  9. compile 'org.ow2.asm:asm:5.2'
  10. compile 'com.android.tools.build:gradle:2.1.0'
  11. }
  12. group = "com.android.ares"
  13. version = '2.3.0'
  14. uploadArchives {
  15. /**
  16. * 请在根目录中添加local.properties文件,如果存在该文件,在该文件最后追加如下内容(包括用户名、密码、仓库地址)
  17. * userName=admin
  18. * password=*****
  19. * url=http://10.0.18.175/nexus/content/repositories/android/
  20. */
  21. def url = "https://nexus.uddream.cn/android"
  22. def userName = "admin"
  23. def password = "admin"
  24. File file = project.rootProject.file("local.properties")
  25. if (file.exists()) {
  26. Properties properties = new Properties()
  27. properties.load(file.newDataInputStream())
  28. url = properties.getProperty("url")
  29. userName = properties.getProperty("userName")
  30. password = properties.getProperty("password")
  31. }
  32. repositories.mavenDeployer {
  33. repository(url: url) {
  34. authentication(userName: userName, password: password)
  35. pom.artifactId = "gradle-agent"
  36. }
  37. }
  38. }