Android 模拟点击工具

build.gradle 4.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. apply plugin: 'com.android.application'
  2. apply plugin: 'kotlin-android'
  3. apply plugin: 'kotlin-android-extensions'
  4. android {
  5. signingConfigs {
  6. release {
  7. storeFile file('D:\\Android\\auto_click\\autoclick.jks')
  8. storePassword 'kuxuan'
  9. keyAlias = 'autoclick'
  10. keyPassword 'kuxuan'
  11. }
  12. }
  13. compileSdkVersion 30
  14. defaultConfig {
  15. applicationId "com.kuxuan.autoclick"
  16. minSdkVersion 21
  17. targetSdkVersion 30
  18. versionCode 266
  19. versionName "v2.0.66"
  20. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  21. }
  22. buildTypes {
  23. release {
  24. minifyEnabled false
  25. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  26. }
  27. }
  28. applicationVariants.all {
  29. //判断是release还是debug版本
  30. def buildType = it.buildType.name
  31. def fileName
  32. def outputFile
  33. //下面的channel是获取渠道号,你获取渠道号不一定会和我的代码一样,因为有可能你的渠道名称的规则和我的不一样,我的规则是${渠道名}-${applicationId},所以我是这样取的。
  34. // def channel = it.productFlavors[0].name.split("-")[0]
  35. //获取当前时间的"YYYY-MM-dd"格式。
  36. def createTime = new Date().format("YYYY-MM-dd", TimeZone.getTimeZone("GMT+08:00"))
  37. it.outputs.each {
  38. outputFile = it.outputFile
  39. //我此处的命名规则是:渠道名_项目名_版本名_创建时间_构建类型.apk
  40. fileName = "群发工具-${createTime}-${defaultConfig.versionName}.apk"
  41. // fileName = "${channel}_项目名称_v${defaultConfig.versionName}_${createTime}-${buildType}.apk"
  42. //将名字打印出来,以便及时查看是否满意。
  43. println "文件名:-----------------${fileName}"
  44. //重新对apk命名。(适用于Gradle4.0以下版本)
  45. // it.outputFile = new File(outputFile.parent, fileName)
  46. //重新对apk命名。(适用于Gradle4.0(含)以上版本)如果你Gradle版本是4.x则将上面的一行代码注释,解开注释下面的这一行。
  47. it.outputFileName = fileName
  48. }
  49. }
  50. compileOptions {
  51. sourceCompatibility JavaVersion.VERSION_1_8
  52. targetCompatibility JavaVersion.VERSION_1_8
  53. }
  54. }
  55. dependencies {
  56. implementation fileTree(dir: 'libs', include: ['*.jar'])
  57. implementation 'androidx.appcompat:appcompat:1.0.2'
  58. implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
  59. testImplementation 'junit:junit:4.13.2'
  60. androidTestImplementation 'androidx.test:runner:1.1.1'
  61. androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
  62. implementation "androidx.core:core-ktx:1.0.1"
  63. implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
  64. implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.1"
  65. implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.1"
  66. //工具集
  67. api 'com.blankj:utilcodex:1.31.0'
  68. implementation 'androidx.recyclerview:recyclerview:1.2.0'
  69. implementation 'com.google.code.gson:gson:2.8.9'
  70. //butterknife
  71. implementation 'com.jakewharton:butterknife:10.2.1'
  72. annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.1'
  73. //eventBus
  74. implementation 'org.greenrobot:eventbus:3.2.0'
  75. implementation 'androidx.annotation:annotation:1.1.0'
  76. // RxJava依赖
  77. implementation 'io.reactivex.rxjava2:rxjava:2.1.3'
  78. implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
  79. //日志拦截器依赖
  80. implementation 'com.squareup.okhttp3:okhttp:4.9.0'
  81. implementation 'com.squareup.okhttp3:logging-interceptor:3.5.0'
  82. // retrofit依赖
  83. implementation 'com.squareup.retrofit2:retrofit:2.5.0'
  84. // RxJava和Retrofit混用的适配器
  85. implementation 'com.squareup.retrofit2:adapter-rxjava2:2.5.0'
  86. //gson转换器依赖
  87. implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
  88. //gson依赖
  89. implementation 'com.google.code.gson:gson:2.8.5'
  90. // 直播业务需要cardview
  91. //noinspection GradleCompatible
  92. implementation 'com.android.support:cardview-v7:28.0.0'
  93. // //多文件上传 下载 带进度 框架
  94. // implementation 'com.github.zhouxu88:OkHttp3_MultiFile:v1.0'
  95. implementation project(':library')
  96. }