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
9096c81d
Commit
9096c81d
authored
Oct 10, 2022
by
王雷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
钉钉通知修改为飞书
parent
40bc6bdf
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
52 additions
and
29 deletions
+52
-29
gradle.xml
.idea/gradle.xml
+1
-3
kotlinc.xml
.idea/kotlinc.xml
+6
-0
build.gradle
build.gradle
+1
-1
local.properties
local.properties
+2
-2
DingDingDetailInfoModel.groovy
...vy/com/qmai/android/plugin/DingDingDetailInfoModel.groovy
+0
-9
FsDetailInfoModel.groovy
...n/groovy/com/qmai/android/plugin/FsDetailInfoModel.groovy
+10
-0
FsInfoModel.groovy
src/main/groovy/com/qmai/android/plugin/FsInfoModel.groovy
+18
-0
OssUploadTask.groovy
src/main/groovy/com/qmai/android/plugin/OssUploadTask.groovy
+2
-3
PygerUploadTask.groovy
...ain/groovy/com/qmai/android/plugin/PygerUploadTask.groovy
+10
-9
PygerUploadTask2.groovy
...in/groovy/com/qmai/android/plugin/PygerUploadTask2.groovy
+2
-2
No files found.
.idea/gradle.xml
View file @
9096c81d
...
...
@@ -7,14 +7,12 @@
<option
name=
"testRunner"
value=
"GRADLE"
/>
<option
name=
"distributionType"
value=
"DEFAULT_WRAPPED"
/>
<option
name=
"externalProjectPath"
value=
"$PROJECT_DIR$"
/>
<option
name=
"gradleHome"
value=
"$USER_HOME$/gradle/gradle-6.4.1"
/>
<option
name=
"gradleJvm"
value=
"#JAVA_HOME"
/>
<option
name=
"gradleJvm"
value=
"1.8"
/>
<option
name=
"modules"
>
<set>
<option
value=
"$PROJECT_DIR$"
/>
</set>
</option>
<option
name=
"resolveModulePerSourceSet"
value=
"false"
/>
</GradleProjectSettings>
</option>
</component>
...
...
.idea/kotlinc.xml
0 → 100644
View file @
9096c81d
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"KotlinJpsPluginSettings"
>
<option
name=
"version"
value=
"1.6.21"
/>
</component>
</project>
\ No newline at end of file
build.gradle
View file @
9096c81d
...
...
@@ -250,7 +250,7 @@ task hot{
}
group
'com.qmai.android.plugin'
version
'1.9
0
'
version
'1.9
1
'
gradlePublish
{
...
...
local.properties
View file @
9096c81d
...
...
@@ -4,5 +4,5 @@
# Location of the SDK. This is only used by Gradle.
# For customization when using a Version Control System, please read the
# header note.
#
Tue Aug 24 09:52:39 CST 2021
sdk.dir
=
/
Users/leiwang/Library/Android/s
dk
#
Wed Sep 28 14:35:34 CST 2022
sdk.dir
=
/
home/wanglei/Android/S
dk
src/main/groovy/com/qmai/android/plugin/DingDingDetailInfoModel.groovy
deleted
100644 → 0
View file @
40bc6bdf
package
com.qmai.android.plugin
class
DingDingDetailInfoModel
{
String
content
DingDingDetailInfoModel
(
String
content
){
this
.
content
=
content
}
}
src/main/groovy/com/qmai/android/plugin/FsDetailInfoModel.groovy
0 → 100644
View file @
9096c81d
package
com.qmai.android.plugin
class
FsDetailInfoModel
{
String
text
FsDetailInfoModel
(
String
content
){
this
.
text
=
content
}
}
src/main/groovy/com/qmai/android/plugin/
DingDing
InfoModel.groovy
→
src/main/groovy/com/qmai/android/plugin/
Fs
InfoModel.groovy
View file @
9096c81d
...
...
@@ -3,13 +3,13 @@ package com.qmai.android.plugin
con={"msgtype":"text","text":{"content":content}}
*/
class
DingDing
InfoModel
{
class
Fs
InfoModel
{
String
msgtype
=
"text"
DingDingDetailInfoModel
tex
t
String
msg
_
type
=
"text"
FsDetailInfoModel
conten
t
DingDingInfoModel
(
DingDing
DetailInfoModel
text
){
this
.
tex
t
=
text
FsInfoModel
(
Fs
DetailInfoModel
text
){
this
.
conten
t
=
text
}
}
...
...
src/main/groovy/com/qmai/android/plugin/OssUploadTask.groovy
View file @
9096c81d
...
...
@@ -14,7 +14,6 @@ import org.gradle.api.DefaultTask
import
org.gradle.api.tasks.Input
import
org.gradle.api.tasks.OutputFile
import
org.gradle.api.tasks.TaskAction
import
org.json.JSONObject
import
javax.inject.Inject
import
java.util.concurrent.TimeUnit
...
...
@@ -76,8 +75,8 @@ class OssUploadTask extends DefaultTask {
MediaType
JSON
=
MediaType
.
parse
(
"application/json; charset=utf-8"
);
def
gson
=
new
Gson
()
def
content
=
"qmshopassitant: 下载地址为: "
+
"https://files.qmai.cn/"
+
ossPath
+
fileName
+
" 当前环境: "
+
buildType
+
" 当前分支: "
+
getBranch
()
def
dingDingdetail
=
new
DingDing
DetailInfoModel
(
content
)
def
dingdingInfo
=
new
DingDing
InfoModel
(
dingDingdetail
)
def
dingDingdetail
=
new
Fs
DetailInfoModel
(
content
)
def
dingdingInfo
=
new
Fs
InfoModel
(
dingDingdetail
)
RequestBody
requestBody
=
RequestBody
.
create
(
JSON
,
gson
.
toJson
(
dingdingInfo
))
OkHttpClient
client
=
new
OkHttpClient
.
Builder
()
.
callTimeout
(
60
,
TimeUnit
.
SECONDS
)
...
...
src/main/groovy/com/qmai/android/plugin/PygerUploadTask.groovy
View file @
9096c81d
...
...
@@ -13,7 +13,6 @@ import org.gradle.api.tasks.Input
import
org.gradle.api.tasks.OutputFile
import
org.gradle.api.tasks.TaskAction
import
org.json.JSONException
import
org.json.JSONObject
import
javax.inject.Inject
import
java.util.concurrent.TimeUnit
...
...
@@ -72,19 +71,16 @@ class PygerUploadTask extends DefaultTask {
}
String
content
=
file
.
name
+
": 下载地址: "
+
" https://www.pgyer.com/"
+
payInfoBean
.
data
.
buildShortcutUrl
+
" \n二维码地址: "
+
payInfoBean
.
data
.
buildQRCodeURL
+
"
当前环境: "
+
buildType
+
"
当前分支:"
+
branch
payInfoBean
.
data
.
buildShortcutUrl
+
" \n二维码地址: "
+
payInfoBean
.
data
.
buildQRCodeURL
+
"
\n 当前环境: "
+
buildType
+
"\n
当前分支:"
+
branch
println
(
"dingding content = ${content}"
)
MediaType
JSON
=
MediaType
.
parse
(
"application/json; charset=utf-8"
);
JSONObject
json
=
new
JSONObject
()
try
{
json
.
put
(
"msgtype"
,
"text:{\"content\":$content}"
)
json
.
put
(
"text"
,
content
)
def
dingDingdetail
=
new
DingDingDetailInfoModel
(
content
)
def
dingdingInfo
=
new
DingDingInfoModel
(
dingDingdetail
)
RequestBody
requestBody
=
RequestBody
.
create
(
JSON
,
gson
.
toJson
(
dingdingInfo
))
def
fsText
=
new
FsDetailInfoModel
(
content
)
def
fs
=
new
FsInfoModel
(
fsText
)
RequestBody
requestBody
=
RequestBody
.
create
(
JSON
,
gson
.
toJson
(
fs
))
Request
request2
=
new
Request
.
Builder
()
.
url
(
"https://o
api.dingtalk.com/robot/send?access_token=9839926e22043a7d391747e3cb14cc4e0dab7add001ce60f0d184f82e50301bc
"
)
.
url
(
"https://o
pen.feishu.cn/open-apis/bot/v2/hook/64bff42a-a12a-4978-8456-ccabeb25858a
"
)
.
post
(
requestBody
)
.
build
()
Response
response2
=
client
.
newCall
(
request2
).
execute
()
...
...
@@ -106,6 +102,11 @@ class PygerUploadTask extends DefaultTask {
}
}
void
uploadFs
(
String
text
){
}
@Input
boolean
isInJenkins
()
{
Map
<
String
,
String
>
map
=
System
.
getenv
()
...
...
src/main/groovy/com/qmai/android/plugin/PygerUploadTask2.groovy
View file @
9096c81d
...
...
@@ -64,8 +64,8 @@ class PygerUploadTask2 extends DefaultTask {
try
{
json
.
put
(
"msgtype"
,
"text:{\"content\":$content}"
)
json
.
put
(
"text"
,
content
)
def
dingDingdetail
=
new
DingDing
DetailInfoModel
(
content
)
def
dingdingInfo
=
new
DingDing
InfoModel
(
dingDingdetail
)
def
dingDingdetail
=
new
Fs
DetailInfoModel
(
content
)
def
dingdingInfo
=
new
Fs
InfoModel
(
dingDingdetail
)
RequestBody
requestBody
=
RequestBody
.
create
(
JSON
,
gson
.
toJson
(
dingdingInfo
))
Request
request2
=
new
Request
.
Builder
()
...
...
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