Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
WelfarePurchase
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘明明
WelfarePurchase
Commits
d491b2e5
Commit
d491b2e5
authored
May 08, 2025
by
刘明明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加oss id和key参数 修改阿里云上传路径
parent
8126cfb1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
build.gradle
app/build.gradle
+2
-1
gradle.properties
gradle.properties
+3
-3
No files found.
app/build.gradle
View file @
d491b2e5
...
@@ -62,6 +62,7 @@ android {
...
@@ -62,6 +62,7 @@ android {
flavorDimensions
"market"
flavorDimensions
"market"
def
values
=
new
File
(
'D:\\Halomobi\\HaloDemo\\app\\build-values.txt'
).
readLines
()
def
values
=
new
File
(
'D:\\Halomobi\\HaloDemo\\app\\build-values.txt'
).
readLines
()
println
"------------------------------>需要打包的值'${values}"
values
.
each
{
value
->
values
.
each
{
value
->
productFlavors
.
create
(
"${value}"
)
{
productFlavors
.
create
(
"${value}"
)
{
buildConfigField
"String"
,
"CHANNEL_NAME"
,
"\"${value}\""
buildConfigField
"String"
,
"CHANNEL_NAME"
,
"\"${value}\""
...
@@ -140,7 +141,7 @@ task uploadApkToOss {
...
@@ -140,7 +141,7 @@ task uploadApkToOss {
println
"-----------------------------$apkPath"
println
"-----------------------------$apkPath"
def
ossClient
=
new
OSSClient
(
endpoint
,
accessKeyId
,
accessKeySecret
)
def
ossClient
=
new
OSSClient
(
endpoint
,
accessKeyId
,
accessKeySecret
)
try
{
try
{
def
objectName
=
"apk/${newFileName}"
def
objectName
=
"
market/
apk/${newFileName}"
ossClient
.
putObject
(
bucketName
,
objectName
,
new
File
(
apkPath
))
ossClient
.
putObject
(
bucketName
,
objectName
,
new
File
(
apkPath
))
println
(
"APK上传成功!OSS路径: ${objectName}"
)
println
(
"APK上传成功!OSS路径: ${objectName}"
)
}
catch
(
e
)
{
}
catch
(
e
)
{
...
...
gradle.properties
View file @
d491b2e5
...
@@ -18,9 +18,9 @@ android.enableJetifier=true
...
@@ -18,9 +18,9 @@ android.enableJetifier=true
channelName
=
""
channelName
=
""
taskId
=
"219955634"
taskId
=
"219955634"
OSS_ENDPOINT
=
oss-cn-beijing.aliyuncs.com
OSS_ENDPOINT
=
oss-cn-beijing.aliyuncs.com
OSS_ACCESS_KEY_ID
=
OSS_ACCESS_KEY_ID
=
LTAI5tJyf7SQVPYmExQ9jksS
OSS_ACCESS_KEY_SECRET
=
OSS_ACCESS_KEY_SECRET
=
AFERC2DjfDPaukhE2rG0tnXOvNg1Mw
OSS_BUCKET_NAME
=
OSS_BUCKET_NAME
=
halomobi-file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment