build.gradle 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. apply plugin: 'com.android.library'
  2. apply plugin: 'com.jfrog.artifactory'
  3. apply plugin: 'maven-publish'
  4. def libraryGroupId = 'hr.tacitus.components'
  5. def libraryArtifactId = 'tankers-components'
  6. def libraryVersion = '0.0.4'
  7. android {
  8. compileSdkVersion 25
  9. buildToolsVersion "25.0.3"
  10. defaultConfig {
  11. minSdkVersion 19
  12. targetSdkVersion 25
  13. versionCode 1
  14. versionName libraryVersion
  15. testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
  16. }
  17. buildTypes {
  18. release {
  19. minifyEnabled false
  20. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  21. }
  22. }
  23. }
  24. dependencies {
  25. compile 'com.android.support.constraint:constraint-layout:1.0.2'
  26. compile fileTree(dir: 'libs', include: ['*.jar'])
  27. androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
  28. exclude group: 'com.android.support', module: 'support-annotations'
  29. })
  30. compile 'com.android.support:appcompat-v7:25.+'
  31. testCompile 'junit:junit:4.12'
  32. }
  33. publishing {
  34. publications {
  35. aar(MavenPublication) {
  36. groupId libraryGroupId
  37. version libraryVersion
  38. artifactId libraryArtifactId
  39. artifact("$buildDir/outputs/aar/app-release.aar")
  40. }
  41. }
  42. }
  43. artifactory {
  44. contextUrl = 'http://knut-hetzner.ddns.net:8081/artifactory'
  45. publish {
  46. repository {
  47. repoKey = 'libs-release-local'
  48. username = artifactory_username
  49. password = artifactory_password
  50. }
  51. defaults {
  52. publications('aar')
  53. publishArtifacts = true
  54. properties = ['qa.level': 'basic', 'q.os': 'android', 'dev.team': 'core']
  55. publishPom = true
  56. }
  57. }
  58. }