build.gradle 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. /*
  2. * The MIT License (MIT)
  3. * Copyright (c) 2015 xiaocong@gmail.com
  4. *
  5. * Permission is hereby granted, free of charge, to any person obtaining a copy
  6. * of this software and associated documentation files (the "Software"), to deal
  7. * in the Software without restriction, including without limitation the rights
  8. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  9. * copies of the Software, and to permit persons to whom the Software is
  10. * furnished to do so, subject to the following conditions:
  11. *
  12. * The above copyright notice and this permission notice shall be included in all
  13. * copies or substantial portions of the Software.
  14. *
  15. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  16. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  17. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  18. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  19. * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  20. * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
  21. * OR OTHER DEALINGS IN THE SOFTWARE.
  22. */
  23. buildscript {
  24. repositories {
  25. mavenCentral()
  26. }
  27. }
  28. plugins {
  29. id 'com.gladed.androidgitversion' version '0.4.14'
  30. }
  31. apply plugin: 'com.android.application'
  32. android {
  33. compileSdkVersion 34
  34. // version code history
  35. // 1: original version
  36. // 2: update all dependencies to latest
  37. // 6: input method, battery,rotation monitor
  38. androidGitVersion {
  39. baseCode 1
  40. }
  41. defaultConfig {
  42. applicationId "com.github.uiautomator"
  43. minSdkVersion 19
  44. targetSdkVersion 32
  45. versionCode androidGitVersion.code()
  46. versionName androidGitVersion.name()
  47. }
  48. signingConfigs {
  49. release {
  50. storeFile file("../release.keystore")
  51. storePassword "uiautomator-release-2015"
  52. keyAlias "uiautomator"
  53. keyPassword "uiautomator"
  54. }
  55. }
  56. buildTypes {
  57. release {
  58. minifyEnabled false
  59. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  60. signingConfig signingConfigs.release
  61. }
  62. }
  63. android {
  64. lintOptions {
  65. abortOnError false
  66. }
  67. }
  68. defaultConfig {
  69. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  70. }
  71. packagingOptions {
  72. exclude 'LICENSE.txt'
  73. exclude 'META-INF/LICENSE'
  74. exclude 'META-INF/NOTICE'
  75. }
  76. // fix try-with-resource warning
  77. // ref: https://stackoverflow.com/questions/40408628/try-with-resources-requires-api-level-19-okhttp
  78. compileOptions {
  79. sourceCompatibility JavaVersion.VERSION_1_8
  80. targetCompatibility JavaVersion.VERSION_1_8
  81. }
  82. }
  83. dependencies {
  84. implementation fileTree(dir: 'libs', include: ['*.jar'])
  85. // server
  86. implementation 'androidx.appcompat:appcompat:1.2.0'
  87. implementation 'org.nanohttpd:nanohttpd:2.3.1'
  88. implementation 'com.squareup.okhttp3:okhttp:3.11.0'
  89. implementation 'commons-cli:commons-cli:1.3.1'
  90. // test
  91. androidTestImplementation 'androidx.test:runner:1.3.0'
  92. androidTestImplementation 'androidx.test:rules:1.3.0'
  93. androidTestImplementation 'androidx.core:core:1.3.0'
  94. androidTestImplementation 'androidx.annotation:annotation:1.1.0'
  95. androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.3.0'
  96. androidTestImplementation 'com.github.briandilley.jsonrpc4j:jsonrpc4j:1.5.0'
  97. androidTestImplementation 'com.fasterxml.jackson.core:jackson-core:2.5.3'
  98. androidTestImplementation 'com.fasterxml.jackson.core:jackson-annotations:2.5.3'
  99. androidTestImplementation 'com.fasterxml.jackson.core:jackson-databind:2.5.3'
  100. implementation project(':permission')
  101. androidTestImplementation 'junit:junit:4.12'
  102. androidTestImplementation 'junit:junit:4.12'
  103. }
  104. repositories {
  105. mavenCentral()
  106. }