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.
 
 
 

81 line
2.9 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"
  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. // AndroidManifest.xml占位符
  20. manifestPlaceholders = [
  21. // App名称
  22. APP_NAME: "${project.properties.appName}",
  23. // App图标
  24. APP_ICON: "@mipmap/ic_launcher_${project.properties.appIconKey}",
  25. // App圆角图标
  26. APP_ROUND_ICON: "@mipmap/ic_launcher_${project.properties.appIconKey}_round"
  27. ]
  28. }
  29. signingConfigs {
  30. release {
  31. v1SigningEnabled true
  32. v2SigningEnabled true
  33. storeFile file(project.properties.storeFile)
  34. storePassword project.properties.storePassword
  35. keyAlias project.properties.keyAlias
  36. keyPassword project.properties.keyPassword
  37. }
  38. }
  39. buildTypes {
  40. release {
  41. minifyEnabled false
  42. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  43. signingConfig signingConfigs.release
  44. resValue("string", "app_home_url", "\"${project.properties.appHomeUrl}\"")
  45. resValue("string", "app_copyright", "\"${project.properties.appCopyright}\"")
  46. resValue("string", "app_vendor", "\"${project.properties.appVendor}\"")
  47. }
  48. debug {
  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. }
  54. }
  55. compileOptions {
  56. sourceCompatibility JavaVersion.VERSION_1_8
  57. targetCompatibility JavaVersion.VERSION_1_8
  58. }
  59. buildFeatures {
  60. viewBinding true
  61. }
  62. }
  63. dependencies {
  64. implementation 'androidx.appcompat:appcompat:1.2.0'
  65. implementation 'com.google.android.material:material:1.2.1'
  66. testImplementation 'junit:junit:4.+'
  67. androidTestImplementation 'androidx.test.ext:junit:1.1.2'
  68. androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
  69. implementation 'com.github.Justson.AgentWeb:agentweb-core:v4.1.9-androidx' // (必选)
  70. implementation 'com.github.Justson.AgentWeb:agentweb-filechooser:v4.1.9-androidx'
  71. }