Guest User

Untitled

a guest
Nov 2nd, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.92 KB | None | 0 0
  1. buildscript {
  2. repositories {
  3. google()
  4. jcenter()
  5. }
  6. dependencies {
  7. classpath 'com.android.tools.build:gradle:3.0.0'
  8. classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.5.4"
  9. }
  10. }
  11.  
  12. allprojects {
  13. apply plugin: "com.jfrog.artifactory"
  14.  
  15. repositories {
  16. google()
  17. jcenter()
  18. }
  19. }
  20.  
  21. task clean(type: Delete) {
  22. delete rootProject.buildDir
  23. }
  24.  
  25. artifactory {
  26. contextUrl = "${artifactory_contextUrl}"
  27. publish {
  28. repository {
  29. repoKey = 'libs-release-local'
  30. username = "${artifactory_user}"
  31. password = "${artifactory_password}"
  32. maven = true
  33. }
  34. }
  35. resolve {
  36. repository {
  37. repoKey = 'libs-release'
  38. username = "${artifactory_user}"
  39. password = "${artifactory_password}"
  40. maven = true
  41. }
  42. }
  43. }
  44.  
  45. apply plugin: 'com.android.library'
  46. apply plugin: 'maven-publish'
  47.  
  48. def packageName = 'x.x'
  49. def libraryVersion = 'v1.0.0'
  50.  
  51. android {
  52. compileSdkVersion 26
  53.  
  54. defaultConfig {
  55. minSdkVersion 21
  56. targetSdkVersion 26
  57. versionCode 10000
  58. versionName libraryVersion
  59.  
  60. testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
  61. }
  62.  
  63. buildTypes {
  64. release {
  65. minifyEnabled false
  66. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  67. }
  68. }
  69. }
  70.  
  71. publishing {
  72. publications {
  73. aar(MavenPublication) {
  74. groupId packageName
  75. version = libraryVersion
  76. artifactId "y"
  77.  
  78. artifact("$buildDir/outputs/aar/$archivesBaseName-release.aar")
  79. }
  80. }
  81. }
  82.  
  83. artifactory {
  84. publish {
  85. defaults {
  86. publications('aar')
  87.  
  88. publishArtifacts = true
  89. publishBuildInfo = false
  90. publishPom = true
  91. publishIvy = false
  92. }
  93. }
  94. }
  95.  
  96. dependencies {
  97. implementation fileTree(dir: 'libs', include: ['*.jar'])
  98.  
  99. implementation 'com.android.support:appcompat-v7:26.1.0'
  100. implementation 'com.android.support:support-v4:26.1.0'
  101. implementation 'com.android.support:design:26.1.0'
  102.  
  103. implementation 'com.squareup.okhttp3:okhttp:3.8.1'
  104. implementation 'com.squareup.okhttp3:logging-interceptor:3.8.1'
  105. implementation 'com.squareup.retrofit2:retrofit:2.3.0'
  106. implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
  107.  
  108. testImplementation 'junit:junit:4.12'
  109. androidTestImplementation 'com.android.support.test:runner:1.0.1'
  110. androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
  111. }
  112.  
  113. > Task :minecommon:artifactoryPublish
  114. Deploying build descriptor to: https://artifactory-domain/artifactory/api/build
  115. Build successfully deployed. Browse it in Artifactory under https://artifactory-domain/artifactory/webapp/builds/project-name/1509633107114
  116.  
  117.  
  118. BUILD SUCCESSFUL in 2s
  119. 26 actionable tasks: 1 executed, 25 up-to-date
Add Comment
Please, Sign In to add comment