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