build.gradle 1.7 KB

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