Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
GradlePlugin
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
Gradle
GradlePlugin
Commits
14445715
Commit
14445715
authored
May 30, 2023
by
快乐石头111
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改oss key
parent
0fb2d509
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
6 deletions
+4
-6
GradlePlugin.iml
.idea/GradlePlugin.iml
+0
-2
build.gradle
build.gradle
+1
-1
OssUploadTask.groovy
src/main/groovy/com/qmai/android/plugin/OssUploadTask.groovy
+3
-3
No files found.
.idea/GradlePlugin.iml
deleted
100644 → 0
View file @
0fb2d509
<?xml version="1.0" encoding="UTF-8"?>
<module
external.linked.project.id=
"GradlePlugin"
external.linked.project.path=
"$MODULE_DIR$"
external.root.project.path=
"$MODULE_DIR$"
external.system.id=
"GRADLE"
external.system.module.group=
""
external.system.module.version=
"unspecified"
type=
"JAVA_MODULE"
version=
"4"
/>
\ No newline at end of file
build.gradle
View file @
14445715
...
@@ -250,7 +250,7 @@ task hot{
...
@@ -250,7 +250,7 @@ task hot{
}
}
group
'com.qmai.android.plugin'
group
'com.qmai.android.plugin'
version
'1.9
2
'
version
'1.9
3
'
gradlePublish
{
gradlePublish
{
...
...
src/main/groovy/com/qmai/android/plugin/OssUploadTask.groovy
View file @
14445715
...
@@ -39,8 +39,8 @@ class OssUploadTask extends DefaultTask {
...
@@ -39,8 +39,8 @@ class OssUploadTask extends DefaultTask {
// yourEndpoint填写Bucket所在地域对应的Endpoint。以华东1(杭州)为例,Endpoint填写为https://oss-cn-hangzhou.aliyuncs.com。
// yourEndpoint填写Bucket所在地域对应的Endpoint。以华东1(杭州)为例,Endpoint填写为https://oss-cn-hangzhou.aliyuncs.com。
String
endpoint
=
"https://oss-cn-shanghai.aliyuncs.com"
String
endpoint
=
"https://oss-cn-shanghai.aliyuncs.com"
// 阿里云账号AccessKey拥有所有API的访问权限,风险很高。强烈建议您创建并使用RAM用户进行API访问或日常运维,请登录RAM控制台创建RAM用户。
// 阿里云账号AccessKey拥有所有API的访问权限,风险很高。强烈建议您创建并使用RAM用户进行API访问或日常运维,请登录RAM控制台创建RAM用户。
String
accessKeyId
=
"LTAI
pd1FowghSQX0
"
String
accessKeyId
=
"LTAI
5t8xR8NRFcxCXhj31FkU
"
String
accessKeySecret
=
"
0kRH35xgAqyNuqabkH3u9WrstHfsd1
"
String
accessKeySecret
=
"
GaoC3mqQCz9rX9q8rtBQuEaXZOYn4g
"
// 创建OSSClient实例。
// 创建OSSClient实例。
OSS
ossClient
=
new
OSSClientBuilder
().
build
(
endpoint
,
accessKeyId
,
accessKeySecret
)
OSS
ossClient
=
new
OSSClientBuilder
().
build
(
endpoint
,
accessKeyId
,
accessKeySecret
)
...
@@ -67,7 +67,7 @@ class OssUploadTask extends DefaultTask {
...
@@ -67,7 +67,7 @@ class OssUploadTask extends DefaultTask {
println
(
"下载地址为: "
+
"https://files.qmai.cn/"
+
ossPath
+
fileName
)
println
(
"下载地址为: "
+
"https://files.qmai.cn/"
+
ossPath
+
fileName
)
println
(
"--------------------------------------------------------------------------"
)
println
(
"--------------------------------------------------------------------------"
)
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
println
(
"
e
= "
+
e
.
getMessage
()
+
"E"
+
e
)
println
(
"
uploadOssError
= "
+
e
.
getMessage
()
+
"E"
+
e
)
}
}
// 关闭OSSClient。
// 关闭OSSClient。
ossClient
.
shutdown
()
ossClient
.
shutdown
()
...
...
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