优化APK输出路径设置,改为配置形式。
This commit is contained in:
		| @@ -2,6 +2,11 @@ | ||||
| // | ||||
|  | ||||
| android { | ||||
| 	def winbollProps = new Properties() | ||||
|     def winbollPropsFile = rootProject.file("${winbollFilePath}") | ||||
|     assert(winbollPropsFile.exists()) | ||||
|     winbollProps.load(new FileInputStream(winbollPropsFile)) | ||||
|      | ||||
|     // 读取秘钥配置文件 | ||||
|     // | ||||
|     def keyProps = new Properties() | ||||
| @@ -232,10 +237,12 @@ android { | ||||
|                                 } | ||||
|                             } //  if(variant.buildType.name == "release"){ | ||||
|                              | ||||
|                             // 如果公共目录存在就拷贝到公共目录并重命名为app.apk | ||||
|                             // 如果配置了APK额外输出路径,就复制一份拷贝到额外路径。 | ||||
|                             // | ||||
|                             File outCommonDir = new File("/sdcard/AppProjects") | ||||
|                             String commandAPKName = "app.apk" | ||||
| 							if(winbollProps['ExtraAPKOutputPath'] != null ) { | ||||
|                                 File apkFile = new File(winbollProps['ExtraAPKOutputPath']) | ||||
| 								File outCommonDir = apkFile.getParentFile(); | ||||
|                                 String commandAPKName = apkFile.getName(); | ||||
|                                 if(outCommonDir.exists()) { | ||||
|                                     copy{ | ||||
|                                         from file.outputFile | ||||
| @@ -246,6 +253,7 @@ android { | ||||
|                                         println "Output APK (Common): " + outCommonDir.getAbsolutePath() + "/${commandAPKName}" | ||||
|                                     } | ||||
|                                 } | ||||
| 						    } | ||||
|                              | ||||
|                          | ||||
|                     } | ||||
|   | ||||
| @@ -1,8 +1,8 @@ | ||||
| #Created by .winboll/winboll_app_build.gradle | ||||
| #Mon Sep 15 02:06:44 HKT 2025 | ||||
| #Mon Sep 15 17:31:47 HKT 2025 | ||||
| stageCount=6 | ||||
| libraryProject=libappbase | ||||
| baseVersion=15.9 | ||||
| publishVersion=15.9.5 | ||||
| buildCount=23 | ||||
| buildCount=44 | ||||
| baseBetaVersion=15.9.6 | ||||
|   | ||||
| @@ -1,8 +1,8 @@ | ||||
| #Created by .winboll/winboll_app_build.gradle | ||||
| #Mon Sep 15 02:06:44 HKT 2025 | ||||
| #Mon Sep 15 17:31:47 HKT 2025 | ||||
| stageCount=6 | ||||
| libraryProject=libappbase | ||||
| baseVersion=15.9 | ||||
| publishVersion=15.9.5 | ||||
| buildCount=23 | ||||
| buildCount=44 | ||||
| baseBetaVersion=15.9.6 | ||||
|   | ||||
| @@ -3,6 +3,9 @@ | ||||
| ## library project to WinBoLL Nexus Maven Repository. | ||||
| ## | ||||
|  | ||||
| ## WinBoLL Extra APK file Output Path | ||||
| #ExtraAPKOutputPath=/sdcard/AppProjects/app.apk | ||||
|  | ||||
| ## WinBoLL Nexus UserName | ||||
| #Nexus.name=nexustestuser1 | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 ZhanGSKen
					ZhanGSKen