android端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

99 rivejä
3.8 KiB

  1. plugins {
  2. id 'com.android.application'
  3. }
  4. android {
  5. compileSdkVersion 30
  6. defaultConfig {
  7. applicationId "com.nsgk.ruralWeb"
  8. minSdkVersion 24
  9. targetSdkVersion 30
  10. versionCode 1
  11. versionName "1.0.0.1"
  12. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  13. // App首页链接地址
  14. buildConfigField "String", "APP_HOME_URL", "\"${project.properties.appHomeUrl}\""
  15. // App启动页版权文本
  16. buildConfigField "String", "APP_COMPYRIGHT", "\"${project.properties.appCopyright}\""
  17. // App启动页厂商名称
  18. buildConfigField "String", "APP_VENDOR", "\"${project.properties.appVendor}\""
  19. // App图标
  20. buildConfigField "String", "APP_ICON", "\"${project.properties.appIconKey}\""
  21. // App更新下载地址
  22. buildConfigField "String", "APP_UPDATE_URL", "\"${project.properties.appUpdateUrl}\""
  23. // AndroidManifest.xml占位符
  24. manifestPlaceholders = [
  25. // App名称
  26. APP_NAME: "${project.properties.appName}",
  27. // App图标
  28. APP_ICON: "@mipmap/ic_launcher_${project.properties.appIconKey}",
  29. // App圆角图标
  30. APP_ROUND_ICON: "@mipmap/ic_launcher_${project.properties.appIconKey}_round",
  31. // 高德key
  32. AMAP_KEY: "${project.properties.amapKey}",
  33. ]
  34. }
  35. signingConfigs {
  36. release {
  37. v1SigningEnabled true
  38. v2SigningEnabled true
  39. storeFile file(project.properties.storeFile)
  40. storePassword project.properties.storePassword
  41. keyAlias project.properties.keyAlias
  42. keyPassword project.properties.keyPassword
  43. }
  44. }
  45. buildTypes {
  46. release {
  47. minifyEnabled false
  48. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  49. signingConfig signingConfigs.release
  50. resValue("string", "app_home_url", "\"${project.properties.appHomeUrl}\"")
  51. resValue("string", "app_copyright", "\"${project.properties.appCopyright}\"")
  52. resValue("string", "app_vendor", "\"${project.properties.appVendor}\"")
  53. resValue("string", "app_name2", "\"${project.properties.appName}\"")
  54. resValue("string", "app_update_url", "\"${project.properties.appUpdateUrl}\"")
  55. }
  56. debug {
  57. signingConfig signingConfigs.release
  58. resValue("string", "app_home_url", "\"${project.properties.appHomeUrl}\"")
  59. resValue("string", "app_copyright", "\"${project.properties.appCopyright}\"")
  60. resValue("string", "app_vendor", "\"${project.properties.appVendor}\"")
  61. resValue("string", "app_name2", "\"${project.properties.appName}\"")
  62. resValue("string", "app_update_url", "\"${project.properties.appUpdateUrl}\"")
  63. }
  64. }
  65. compileOptions {
  66. sourceCompatibility JavaVersion.VERSION_1_8
  67. targetCompatibility JavaVersion.VERSION_1_8
  68. }
  69. buildFeatures {
  70. viewBinding true
  71. }
  72. }
  73. dependencies {
  74. implementation 'androidx.appcompat:appcompat:1.2.0'
  75. implementation 'com.google.android.material:material:1.2.1'
  76. testImplementation 'junit:junit:4.+'
  77. androidTestImplementation 'androidx.test.ext:junit:1.1.2'
  78. androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
  79. implementation 'com.github.Justson.AgentWeb:agentweb-core:v4.1.9-androidx' // (必选)
  80. implementation 'com.github.Justson.AgentWeb:agentweb-filechooser:v4.1.9-androidx'
  81. implementation 'androidx.preference:preference:1.1.1'
  82. implementation 'cn.hutool:hutool-all:5.5.4'
  83. compile fileTree(include: ['*.jar'], dir: 'libs')
  84. //compile 'com.amap.api:location:latest.integration'
  85. }