Guest User

Untitled

a guest
Feb 13th, 2019
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.83 KB | None | 0 0
  1. dependencies {
  2. classpath 'com.android.tools.build:gradle:3.2.1'
  3. classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.9.1"
  4. }
  5.  
  6. apply plugin: 'com.android.library'
  7. apply plugin: 'maven-publish'
  8. apply plugin: 'com.jfrog.artifactory'
  9.  
  10. def libraryGroupId = 'com.mycomp.mylib'
  11. def libraryArtifactId = 'mylib'
  12. def libraryVersion = '1.0.0'
  13. ...
  14. publishing {
  15. publications {
  16. aar(MavenPublication) {
  17. groupId libraryGroupId
  18. version libraryVersion
  19. artifactId libraryArtifactId
  20.  
  21. artifact("$buildDir/outputs/aar/${artifactId}-release.aar")
  22. }
  23. }
  24. }
  25.  
  26. artifactory {
  27. contextUrl = 'http://10.220.2.2:8081/artifactory'
  28. publish {
  29. repository {
  30. repoKey = 'libs-release-local'
  31.  
  32. username = artifactory_username
  33. password = artifactory_password
  34. }
  35. defaults {
  36. publications('aar')
  37. publishArtifacts = true
  38. properties = ['qa.level': 'basic', 'q.os': 'android', 'dev.team': 'core']
  39. publishPom = true
  40. }
  41. }
  42.  
  43. Deploying artifact: http://10.220.2.2:8081/artifactory/libs-release-local/com/mycomp/mylib/mylib/1.0.0/mylib-1.0.0.aar
  44. Deploying artifact: http://10.220.2.2:8081/artifactory/libs-release-local/com/mycomp/mylib/mylib/1.0.0/mylib-1.0.0.pom
  45.  
  46. ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.mycomp.mylib:mylib:1.0.0.
  47. Show Details
  48. Affected Modules: app
  49.  
  50. allprojects {
  51. repositories {
  52. google()
  53. jcenter()
  54. maven {
  55. url "http://10.220.2.2:8081/artifactory/libs-release-local"
  56. credentials {
  57. username = "${artifactory_username}"
  58. password = "${artifactory_password}"
  59.  
  60. }
  61. }
  62. }
  63. }
  64.  
  65. implementation "com.mycomp.mylib:mylib:1.0.0"
Add Comment
Please, Sign In to add comment