build.gradle 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. apply plugin: 'com.android.library'
  2. //kotlin支持
  3. //apply plugin: 'kotlin-android'
  4. //apply plugin: 'kotlin-android-extensions'
  5. //apply plugin: 'kotlin-kapt'
  6. apply plugin: 'maven'
  7. android {
  8. compileSdkVersion 27
  9. buildToolsVersion "28.0.1"
  10. defaultConfig {
  11. minSdkVersion 14
  12. targetSdkVersion 19
  13. versionCode rootProject.ext.versionCode.pslib_smart
  14. versionName rootProject.ext.versionName.pslib_smart
  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. api fileTree(dir: 'libs', include: ['*.jar'])
  26. api 'com.android.support:appcompat-v7:27.1.1'
  27. //http
  28. api 'com.squareup.okhttp3:okhttp:3.9.0'
  29. }
  30. uploadArchives {
  31. configuration = configurations.archives
  32. repositories {
  33. mavenDeployer {
  34. snapshotRepository(url: MAVEN_REPO_SNAPSHOT_URL) {
  35. authentication(userName: NEXUS_USERNAME, password: NEXUS_PASSWORD)
  36. }
  37. repository(url: MAVEN_REPO_RELEASE_URL) {
  38. authentication(userName: NEXUS_USERNAME, password: NEXUS_PASSWORD)
  39. }
  40. pom.project {
  41. version rootProject.ext.versionName.pslib_smart
  42. artifactId 'pslib-smart'
  43. groupId GROUP_ID
  44. packaging TYPE
  45. description DESCRIPTION_SMART
  46. }
  47. }
  48. }
  49. }
  50. task androidSourcesJar(type: Jar) {
  51. classifier = 'sources'
  52. from android.sourceSets.main.java.srcDirs
  53. }
  54. artifacts {
  55. archives file('ps_lib_smart.aar')
  56. archives androidSourcesJar
  57. }