File tree Expand file tree Collapse file tree 1 file changed +15
-14
lines changed
Expand file tree Collapse file tree 1 file changed +15
-14
lines changed Original file line number Diff line number Diff line change @@ -92,20 +92,6 @@ android {
9292 }
9393 }
9494
95- // 使用更简单的方法来自定义文件名,避免兼容性问题
96- applicationVariants. all { variant ->
97- variant. outputs. all { output ->
98- // 使用更安全的方法获取 ABI 信息
99- def abiName = output. getFilter(" ABI" )
100- def fileName = " OpenListF-v${ variant.versionName} "
101- if (abiName != null && ! abiName. isEmpty()) {
102- fileName + = " _${ abiName} "
103- }
104- fileName + = " .apk"
105- outputFileName = fileName
106- }
107- }
108-
10995// kotlin {
11096// jvmToolchain = 17
11197// }
@@ -130,6 +116,21 @@ android {
130116 }
131117}
132118
119+ androidComponents {
120+ onVariants { variant ->
121+ variant. outputs. forEach { output ->
122+ def abi = output. filters. find { it. filterType. name() == " ABI" }?. identifier
123+ def versionName = variant. versionName. get()
124+ def fileName = " OpenListF-v${ versionName} "
125+ if (abi != null && ! abi. isEmpty()) {
126+ fileName + = " _${ abi} "
127+ }
128+ fileName + = " .apk"
129+ output. outputFileName. set(fileName)
130+ }
131+ }
132+ }
133+
133134flutter {
134135 source ' ../..'
135136}
You can’t perform that action at this time.
0 commit comments