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
0ecc03de
Commit
0ecc03de
authored
Jul 03, 2023
by
快乐石头111
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
移除写死的oss参数,改为动态读取jenkis全局环境变量
parent
3c84a50d
Changes
39
Hide whitespace changes
Inline
Side-by-side
Showing
39 changed files
with
477 additions
and
9 deletions
+477
-9
build.gradle
build.gradle
+10
-1
CpPluginPlugin-0.0.1.jar
...roid/plugin/CpPluginPlugin/0.0.1/CpPluginPlugin-0.0.1.jar
+0
-0
CpPluginPlugin-0.0.1.jar.md5
.../plugin/CpPluginPlugin/0.0.1/CpPluginPlugin-0.0.1.jar.md5
+1
-0
CpPluginPlugin-0.0.1.jar.sha1
...plugin/CpPluginPlugin/0.0.1/CpPluginPlugin-0.0.1.jar.sha1
+1
-0
CpPluginPlugin-0.0.1.pom
...roid/plugin/CpPluginPlugin/0.0.1/CpPluginPlugin-0.0.1.pom
+87
-0
CpPluginPlugin-0.0.1.pom.md5
.../plugin/CpPluginPlugin/0.0.1/CpPluginPlugin-0.0.1.pom.md5
+1
-0
CpPluginPlugin-0.0.1.pom.sha1
...plugin/CpPluginPlugin/0.0.1/CpPluginPlugin-0.0.1.pom.sha1
+1
-0
maven-metadata.xml
ccom/qmai/android/plugin/CpPluginPlugin/maven-metadata.xml
+12
-0
maven-metadata.xml.md5
...qmai/android/plugin/CpPluginPlugin/maven-metadata.xml.md5
+1
-0
maven-metadata.xml.sha1
...mai/android/plugin/CpPluginPlugin/maven-metadata.xml.sha1
+1
-0
GradlePlugin-0.0.1.jar
.../android/plugin/GradlePlugin/0.0.1/GradlePlugin-0.0.1.jar
+0
-0
GradlePlugin-0.0.1.jar.md5
...roid/plugin/GradlePlugin/0.0.1/GradlePlugin-0.0.1.jar.md5
+1
-0
GradlePlugin-0.0.1.jar.sha1
...oid/plugin/GradlePlugin/0.0.1/GradlePlugin-0.0.1.jar.sha1
+1
-0
GradlePlugin-0.0.1.pom
.../android/plugin/GradlePlugin/0.0.1/GradlePlugin-0.0.1.pom
+87
-0
GradlePlugin-0.0.1.pom.md5
...roid/plugin/GradlePlugin/0.0.1/GradlePlugin-0.0.1.pom.md5
+1
-0
GradlePlugin-0.0.1.pom.sha1
...oid/plugin/GradlePlugin/0.0.1/GradlePlugin-0.0.1.pom.sha1
+1
-0
maven-metadata.xml
ccom/qmai/android/plugin/GradlePlugin/maven-metadata.xml
+12
-0
maven-metadata.xml.md5
ccom/qmai/android/plugin/GradlePlugin/maven-metadata.xml.md5
+1
-0
maven-metadata.xml.sha1
.../qmai/android/plugin/GradlePlugin/maven-metadata.xml.sha1
+1
-0
GradlePlugin-0.0.1.jar
.../android/plugin/GradlePlugin/0.0.1/GradlePlugin-0.0.1.jar
+0
-0
GradlePlugin-0.0.1.jar.md5
...roid/plugin/GradlePlugin/0.0.1/GradlePlugin-0.0.1.jar.md5
+1
-0
GradlePlugin-0.0.1.jar.sha1
...oid/plugin/GradlePlugin/0.0.1/GradlePlugin-0.0.1.jar.sha1
+1
-0
GradlePlugin-0.0.1.pom
.../android/plugin/GradlePlugin/0.0.1/GradlePlugin-0.0.1.pom
+87
-0
GradlePlugin-0.0.1.pom.md5
...roid/plugin/GradlePlugin/0.0.1/GradlePlugin-0.0.1.pom.md5
+1
-0
GradlePlugin-0.0.1.pom.sha1
...oid/plugin/GradlePlugin/0.0.1/GradlePlugin-0.0.1.pom.sha1
+1
-0
maven-metadata.xml
com/qmai/android/plugin/GradlePlugin/maven-metadata.xml
+12
-0
maven-metadata.xml.md5
com/qmai/android/plugin/GradlePlugin/maven-metadata.xml.md5
+1
-0
maven-metadata.xml.sha1
com/qmai/android/plugin/GradlePlugin/maven-metadata.xml.sha1
+1
-0
GradlePlugin-0.0.1.jar
.../android/plugin/GradlePlugin/0.0.1/GradlePlugin-0.0.1.jar
+0
-0
GradlePlugin-0.0.1.jar.md5
...roid/plugin/GradlePlugin/0.0.1/GradlePlugin-0.0.1.jar.md5
+1
-0
GradlePlugin-0.0.1.jar.sha1
...oid/plugin/GradlePlugin/0.0.1/GradlePlugin-0.0.1.jar.sha1
+1
-0
GradlePlugin-0.0.1.pom
.../android/plugin/GradlePlugin/0.0.1/GradlePlugin-0.0.1.pom
+87
-0
GradlePlugin-0.0.1.pom.md5
...roid/plugin/GradlePlugin/0.0.1/GradlePlugin-0.0.1.pom.md5
+1
-0
GradlePlugin-0.0.1.pom.sha1
...oid/plugin/GradlePlugin/0.0.1/GradlePlugin-0.0.1.pom.sha1
+1
-0
maven-metadata.xml
com1/qmai/android/plugin/GradlePlugin/maven-metadata.xml
+12
-0
maven-metadata.xml.md5
com1/qmai/android/plugin/GradlePlugin/maven-metadata.xml.md5
+1
-0
maven-metadata.xml.sha1
.../qmai/android/plugin/GradlePlugin/maven-metadata.xml.sha1
+1
-0
OssParamsBean.java
src/main/groovy/com/qmai/android/plugin/OssParamsBean.java
+25
-0
OssUploadTask.groovy
src/main/groovy/com/qmai/android/plugin/OssUploadTask.groovy
+22
-8
No files found.
build.gradle
View file @
0ecc03de
...
...
@@ -45,6 +45,7 @@ plugins {
id
'java'
id
'maven-publish'
id
"org.jetbrains.kotlin.jvm"
version
"1.4.10"
id
"maven"
}
apply
plugin:
"com.whl.gradle-publish-plugin"
...
...
@@ -250,7 +251,7 @@ task hot{
}
group
'com.qmai.android.plugin'
version
'1.
99.4
'
version
'1.
100
'
gradlePublish
{
...
...
@@ -271,6 +272,14 @@ gradlePublish {
}*/
}
uploadArchives
{
repositories
.
mavenDeployer
{
repository
(
url:
uri
(
'/Users/leiwang/project/gradleplugin'
))
// 本地仓库路径
pom
.
groupId
=
"com1.qmai.android.plugin"
// 唯一标识(通常为模块包名,也可以任意)
pom
.
artifactId
=
"GradlePlugin"
// 项目名称(通常为类库模块名称,也可以任意)
pom
.
version
=
"0.0.1"
// 版本号
}
}
/* userName USER_NAME
userPassword USER_PASSWORD
...
...
ccom/qmai/android/plugin/CpPluginPlugin/0.0.1/CpPluginPlugin-0.0.1.jar
0 → 100644
View file @
0ecc03de
File added
ccom/qmai/android/plugin/CpPluginPlugin/0.0.1/CpPluginPlugin-0.0.1.jar.md5
0 → 100644
View file @
0ecc03de
fdeee701682d36a45a9254d7c938a3ee
\ No newline at end of file
ccom/qmai/android/plugin/CpPluginPlugin/0.0.1/CpPluginPlugin-0.0.1.jar.sha1
0 → 100644
View file @
0ecc03de
2512bd438049f35aeba0edbe85af038a09df266c
\ No newline at end of file
ccom/qmai/android/plugin/CpPluginPlugin/0.0.1/CpPluginPlugin-0.0.1.pom
0 → 100644
View file @
0ecc03de
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
>
<modelVersion>
4.0.0
</modelVersion>
<groupId>
ccom.qmai.android.plugin
</groupId>
<artifactId>
CpPluginPlugin
</artifactId>
<version>
0.0.1
</version>
<dependencies>
<dependency>
<groupId>
org.json
</groupId>
<artifactId>
json
</artifactId>
<version>
20090211
</version>
<scope>
compile
</scope>
</dependency>
<dependency>
<groupId>
com.squareup.okhttp
</groupId>
<artifactId>
okhttp
</artifactId>
<version>
2.2.0
</version>
<scope>
compile
</scope>
</dependency>
<dependency>
<groupId>
commons-lang
</groupId>
<artifactId>
commons-lang
</artifactId>
<version>
2.6
</version>
<scope>
compile
</scope>
</dependency>
<dependency>
<groupId>
com.squareup.okhttp
</groupId>
<artifactId>
okhttp-urlconnection
</artifactId>
<version>
2.2.0
</version>
<scope>
compile
</scope>
</dependency>
<dependency>
<groupId>
org.jetbrains.kotlin
</groupId>
<artifactId>
kotlin-bom
</artifactId>
<version>
1.4.10
</version>
<scope>
runtime
</scope>
</dependency>
<dependency>
<groupId>
org.jetbrains.kotlin
</groupId>
<artifactId>
kotlin-stdlib-jdk8
</artifactId>
<version>
1.4.10
</version>
<scope>
runtime
</scope>
</dependency>
<dependency>
<groupId>
com.android.tools.build
</groupId>
<artifactId>
gradle
</artifactId>
<version>
7.0.3
</version>
<scope>
runtime
</scope>
</dependency>
<dependency>
<groupId>
com.aliyun.dpa
</groupId>
<artifactId>
oss-android-sdk
</artifactId>
<version>
2.9.5
</version>
<scope>
runtime
</scope>
</dependency>
<dependency>
<groupId>
com.aliyun.oss
</groupId>
<artifactId>
aliyun-sdk-oss
</artifactId>
<version>
3.10.2
</version>
<scope>
runtime
</scope>
</dependency>
<dependency>
<groupId>
com.squareup.okhttp3
</groupId>
<artifactId>
okhttp
</artifactId>
<version>
4.9.1
</version>
<scope>
runtime
</scope>
</dependency>
<dependency>
<groupId>
com.google.code.gson
</groupId>
<artifactId>
gson
</artifactId>
<version>
2.8.8
</version>
<scope>
runtime
</scope>
</dependency>
<dependency>
<groupId>
org.jetbrains.kotlin
</groupId>
<artifactId>
kotlin-test
</artifactId>
<version>
1.4.10
</version>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
org.jetbrains.kotlin
</groupId>
<artifactId>
kotlin-test-junit
</artifactId>
<version>
1.4.10
</version>
<scope>
test
</scope>
</dependency>
</dependencies>
</project>
ccom/qmai/android/plugin/CpPluginPlugin/0.0.1/CpPluginPlugin-0.0.1.pom.md5
0 → 100644
View file @
0ecc03de
43c08d3095add737d015d050658ff4e1
\ No newline at end of file
ccom/qmai/android/plugin/CpPluginPlugin/0.0.1/CpPluginPlugin-0.0.1.pom.sha1
0 → 100644
View file @
0ecc03de
95bcbe688c42b27c82b6df4735a545c69569155f
\ No newline at end of file
ccom/qmai/android/plugin/CpPluginPlugin/maven-metadata.xml
0 → 100644
View file @
0ecc03de
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<groupId>
ccom.qmai.android.plugin
</groupId>
<artifactId>
CpPluginPlugin
</artifactId>
<versioning>
<release>
0.0.1
</release>
<versions>
<version>
0.0.1
</version>
</versions>
<lastUpdated>
20230626082952
</lastUpdated>
</versioning>
</metadata>
ccom/qmai/android/plugin/CpPluginPlugin/maven-metadata.xml.md5
0 → 100644
View file @
0ecc03de
d4f47a6de462d70ff82648bed3861f59
\ No newline at end of file
ccom/qmai/android/plugin/CpPluginPlugin/maven-metadata.xml.sha1
0 → 100644
View file @
0ecc03de
2fc9d6c210e76962adde118a0c770e2545b2de85
\ No newline at end of file
ccom/qmai/android/plugin/GradlePlugin/0.0.1/GradlePlugin-0.0.1.jar
0 → 100644
View file @
0ecc03de
File added
ccom/qmai/android/plugin/GradlePlugin/0.0.1/GradlePlugin-0.0.1.jar.md5
0 → 100644
View file @
0ecc03de
fdeee701682d36a45a9254d7c938a3ee
\ No newline at end of file
ccom/qmai/android/plugin/GradlePlugin/0.0.1/GradlePlugin-0.0.1.jar.sha1
0 → 100644
View file @
0ecc03de
2512bd438049f35aeba0edbe85af038a09df266c
\ No newline at end of file
ccom/qmai/android/plugin/GradlePlugin/0.0.1/GradlePlugin-0.0.1.pom
0 → 100644
View file @
0ecc03de
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
>
<modelVersion>
4.0.0
</modelVersion>
<groupId>
ccom.qmai.android.plugin
</groupId>
<artifactId>
GradlePlugin
</artifactId>
<version>
0.0.1
</version>
<dependencies>
<dependency>
<groupId>
org.json
</groupId>
<artifactId>
json
</artifactId>
<version>
20090211
</version>
<scope>
compile
</scope>
</dependency>
<dependency>
<groupId>
com.squareup.okhttp
</groupId>
<artifactId>
okhttp
</artifactId>
<version>
2.2.0
</version>
<scope>
compile
</scope>
</dependency>
<dependency>
<groupId>
commons-lang
</groupId>
<artifactId>
commons-lang
</artifactId>
<version>
2.6
</version>
<scope>
compile
</scope>
</dependency>
<dependency>
<groupId>
com.squareup.okhttp
</groupId>
<artifactId>
okhttp-urlconnection
</artifactId>
<version>
2.2.0
</version>
<scope>
compile
</scope>
</dependency>
<dependency>
<groupId>
org.jetbrains.kotlin
</groupId>
<artifactId>
kotlin-bom
</artifactId>
<version>
1.4.10
</version>
<scope>
runtime
</scope>
</dependency>
<dependency>
<groupId>
org.jetbrains.kotlin
</groupId>
<artifactId>
kotlin-stdlib-jdk8
</artifactId>
<version>
1.4.10
</version>
<scope>
runtime
</scope>
</dependency>
<dependency>
<groupId>
com.android.tools.build
</groupId>
<artifactId>
gradle
</artifactId>
<version>
7.0.3
</version>
<scope>
runtime
</scope>
</dependency>
<dependency>
<groupId>
com.aliyun.dpa
</groupId>
<artifactId>
oss-android-sdk
</artifactId>
<version>
2.9.5
</version>
<scope>
runtime
</scope>
</dependency>
<dependency>
<groupId>
com.aliyun.oss
</groupId>
<artifactId>
aliyun-sdk-oss
</artifactId>
<version>
3.10.2
</version>
<scope>
runtime
</scope>
</dependency>
<dependency>
<groupId>
com.squareup.okhttp3
</groupId>
<artifactId>
okhttp
</artifactId>
<version>
4.9.1
</version>
<scope>
runtime
</scope>
</dependency>
<dependency>
<groupId>
com.google.code.gson
</groupId>
<artifactId>
gson
</artifactId>
<version>
2.8.8
</version>
<scope>
runtime
</scope>
</dependency>
<dependency>
<groupId>
org.jetbrains.kotlin
</groupId>
<artifactId>
kotlin-test
</artifactId>
<version>
1.4.10
</version>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
org.jetbrains.kotlin
</groupId>
<artifactId>
kotlin-test-junit
</artifactId>
<version>
1.4.10
</version>
<scope>
test
</scope>
</dependency>
</dependencies>
</project>
ccom/qmai/android/plugin/GradlePlugin/0.0.1/GradlePlugin-0.0.1.pom.md5
0 → 100644
View file @
0ecc03de
1f67da6cf227373f6e83535ff5d89a6e
\ No newline at end of file
ccom/qmai/android/plugin/GradlePlugin/0.0.1/GradlePlugin-0.0.1.pom.sha1
0 → 100644
View file @
0ecc03de
139ae764d00ae40f5a6e1f1fc3d83832e66b27cd
\ No newline at end of file
ccom/qmai/android/plugin/GradlePlugin/maven-metadata.xml
0 → 100644
View file @
0ecc03de
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<groupId>
ccom.qmai.android.plugin
</groupId>
<artifactId>
GradlePlugin
</artifactId>
<versioning>
<release>
0.0.1
</release>
<versions>
<version>
0.0.1
</version>
</versions>
<lastUpdated>
20230626083048
</lastUpdated>
</versioning>
</metadata>
ccom/qmai/android/plugin/GradlePlugin/maven-metadata.xml.md5
0 → 100644
View file @
0ecc03de
b74d8a9877e85e4ba8125e93b9744291
\ No newline at end of file
ccom/qmai/android/plugin/GradlePlugin/maven-metadata.xml.sha1
0 → 100644
View file @
0ecc03de
73a003e0dab8c731a8dfc4a1a020d85cb1f7da32
\ No newline at end of file
com/qmai/android/plugin/GradlePlugin/0.0.1/GradlePlugin-0.0.1.jar
0 → 100644
View file @
0ecc03de
File added
com/qmai/android/plugin/GradlePlugin/0.0.1/GradlePlugin-0.0.1.jar.md5
0 → 100644
View file @
0ecc03de
fdeee701682d36a45a9254d7c938a3ee
\ No newline at end of file
com/qmai/android/plugin/GradlePlugin/0.0.1/GradlePlugin-0.0.1.jar.sha1
0 → 100644
View file @
0ecc03de
2512bd438049f35aeba0edbe85af038a09df266c
\ No newline at end of file
com/qmai/android/plugin/GradlePlugin/0.0.1/GradlePlugin-0.0.1.pom
0 → 100644
View file @
0ecc03de
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
>
<modelVersion>
4.0.0
</modelVersion>
<groupId>
com.qmai.android.plugin
</groupId>
<artifactId>
GradlePlugin
</artifactId>
<version>
0.0.1
</version>
<dependencies>
<dependency>
<groupId>
org.json
</groupId>
<artifactId>
json
</artifactId>
<version>
20090211
</version>
<scope>
compile
</scope>
</dependency>
<dependency>
<groupId>
com.squareup.okhttp
</groupId>
<artifactId>
okhttp
</artifactId>
<version>
2.2.0
</version>
<scope>
compile
</scope>
</dependency>
<dependency>
<groupId>
commons-lang
</groupId>
<artifactId>
commons-lang
</artifactId>
<version>
2.6
</version>
<scope>
compile
</scope>
</dependency>
<dependency>
<groupId>
com.squareup.okhttp
</groupId>
<artifactId>
okhttp-urlconnection
</artifactId>
<version>
2.2.0
</version>
<scope>
compile
</scope>
</dependency>
<dependency>
<groupId>
org.jetbrains.kotlin
</groupId>
<artifactId>
kotlin-bom
</artifactId>
<version>
1.4.10
</version>
<scope>
runtime
</scope>
</dependency>
<dependency>
<groupId>
org.jetbrains.kotlin
</groupId>
<artifactId>
kotlin-stdlib-jdk8
</artifactId>
<version>
1.4.10
</version>
<scope>
runtime
</scope>
</dependency>
<dependency>
<groupId>
com.android.tools.build
</groupId>
<artifactId>
gradle
</artifactId>
<version>
7.0.3
</version>
<scope>
runtime
</scope>
</dependency>
<dependency>
<groupId>
com.aliyun.dpa
</groupId>
<artifactId>
oss-android-sdk
</artifactId>
<version>
2.9.5
</version>
<scope>
runtime
</scope>
</dependency>
<dependency>
<groupId>
com.aliyun.oss
</groupId>
<artifactId>
aliyun-sdk-oss
</artifactId>
<version>
3.10.2
</version>
<scope>
runtime
</scope>
</dependency>
<dependency>
<groupId>
com.squareup.okhttp3
</groupId>
<artifactId>
okhttp
</artifactId>
<version>
4.9.1
</version>
<scope>
runtime
</scope>
</dependency>
<dependency>
<groupId>
com.google.code.gson
</groupId>
<artifactId>
gson
</artifactId>
<version>
2.8.8
</version>
<scope>
runtime
</scope>
</dependency>
<dependency>
<groupId>
org.jetbrains.kotlin
</groupId>
<artifactId>
kotlin-test
</artifactId>
<version>
1.4.10
</version>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
org.jetbrains.kotlin
</groupId>
<artifactId>
kotlin-test-junit
</artifactId>
<version>
1.4.10
</version>
<scope>
test
</scope>
</dependency>
</dependencies>
</project>
com/qmai/android/plugin/GradlePlugin/0.0.1/GradlePlugin-0.0.1.pom.md5
0 → 100644
View file @
0ecc03de
01a77af9a7c103dba87ebe4aeb24be45
\ No newline at end of file
com/qmai/android/plugin/GradlePlugin/0.0.1/GradlePlugin-0.0.1.pom.sha1
0 → 100644
View file @
0ecc03de
73eaf5b04c446f2a42e13802e0a6cd7f2ba605ec
\ No newline at end of file
com/qmai/android/plugin/GradlePlugin/maven-metadata.xml
0 → 100644
View file @
0ecc03de
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<groupId>
com.qmai.android.plugin
</groupId>
<artifactId>
GradlePlugin
</artifactId>
<versioning>
<release>
0.0.1
</release>
<versions>
<version>
0.0.1
</version>
</versions>
<lastUpdated>
20230626083106
</lastUpdated>
</versioning>
</metadata>
com/qmai/android/plugin/GradlePlugin/maven-metadata.xml.md5
0 → 100644
View file @
0ecc03de
8740223dff24f8f8979491a09c64c467
\ No newline at end of file
com/qmai/android/plugin/GradlePlugin/maven-metadata.xml.sha1
0 → 100644
View file @
0ecc03de
d31c586b2bdcc27c9ac99ae914af14cd2ef2b087
\ No newline at end of file
com1/qmai/android/plugin/GradlePlugin/0.0.1/GradlePlugin-0.0.1.jar
0 → 100644
View file @
0ecc03de
File added
com1/qmai/android/plugin/GradlePlugin/0.0.1/GradlePlugin-0.0.1.jar.md5
0 → 100644
View file @
0ecc03de
fdeee701682d36a45a9254d7c938a3ee
\ No newline at end of file
com1/qmai/android/plugin/GradlePlugin/0.0.1/GradlePlugin-0.0.1.jar.sha1
0 → 100644
View file @
0ecc03de
2512bd438049f35aeba0edbe85af038a09df266c
\ No newline at end of file
com1/qmai/android/plugin/GradlePlugin/0.0.1/GradlePlugin-0.0.1.pom
0 → 100644
View file @
0ecc03de
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
>
<modelVersion>
4.0.0
</modelVersion>
<groupId>
com1.qmai.android.plugin
</groupId>
<artifactId>
GradlePlugin
</artifactId>
<version>
0.0.1
</version>
<dependencies>
<dependency>
<groupId>
org.json
</groupId>
<artifactId>
json
</artifactId>
<version>
20090211
</version>
<scope>
compile
</scope>
</dependency>
<dependency>
<groupId>
com.squareup.okhttp
</groupId>
<artifactId>
okhttp
</artifactId>
<version>
2.2.0
</version>
<scope>
compile
</scope>
</dependency>
<dependency>
<groupId>
commons-lang
</groupId>
<artifactId>
commons-lang
</artifactId>
<version>
2.6
</version>
<scope>
compile
</scope>
</dependency>
<dependency>
<groupId>
com.squareup.okhttp
</groupId>
<artifactId>
okhttp-urlconnection
</artifactId>
<version>
2.2.0
</version>
<scope>
compile
</scope>
</dependency>
<dependency>
<groupId>
org.jetbrains.kotlin
</groupId>
<artifactId>
kotlin-bom
</artifactId>
<version>
1.4.10
</version>
<scope>
runtime
</scope>
</dependency>
<dependency>
<groupId>
org.jetbrains.kotlin
</groupId>
<artifactId>
kotlin-stdlib-jdk8
</artifactId>
<version>
1.4.10
</version>
<scope>
runtime
</scope>
</dependency>
<dependency>
<groupId>
com.android.tools.build
</groupId>
<artifactId>
gradle
</artifactId>
<version>
7.0.3
</version>
<scope>
runtime
</scope>
</dependency>
<dependency>
<groupId>
com.aliyun.dpa
</groupId>
<artifactId>
oss-android-sdk
</artifactId>
<version>
2.9.5
</version>
<scope>
runtime
</scope>
</dependency>
<dependency>
<groupId>
com.aliyun.oss
</groupId>
<artifactId>
aliyun-sdk-oss
</artifactId>
<version>
3.10.2
</version>
<scope>
runtime
</scope>
</dependency>
<dependency>
<groupId>
com.squareup.okhttp3
</groupId>
<artifactId>
okhttp
</artifactId>
<version>
4.9.1
</version>
<scope>
runtime
</scope>
</dependency>
<dependency>
<groupId>
com.google.code.gson
</groupId>
<artifactId>
gson
</artifactId>
<version>
2.8.8
</version>
<scope>
runtime
</scope>
</dependency>
<dependency>
<groupId>
org.jetbrains.kotlin
</groupId>
<artifactId>
kotlin-test
</artifactId>
<version>
1.4.10
</version>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
org.jetbrains.kotlin
</groupId>
<artifactId>
kotlin-test-junit
</artifactId>
<version>
1.4.10
</version>
<scope>
test
</scope>
</dependency>
</dependencies>
</project>
com1/qmai/android/plugin/GradlePlugin/0.0.1/GradlePlugin-0.0.1.pom.md5
0 → 100644
View file @
0ecc03de
1d84ebd5287a1eb9cc32bdaa8d631bce
\ No newline at end of file
com1/qmai/android/plugin/GradlePlugin/0.0.1/GradlePlugin-0.0.1.pom.sha1
0 → 100644
View file @
0ecc03de
831603166664be96c282c8da27da82be5f4f47d5
\ No newline at end of file
com1/qmai/android/plugin/GradlePlugin/maven-metadata.xml
0 → 100644
View file @
0ecc03de
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<groupId>
com1.qmai.android.plugin
</groupId>
<artifactId>
GradlePlugin
</artifactId>
<versioning>
<release>
0.0.1
</release>
<versions>
<version>
0.0.1
</version>
</versions>
<lastUpdated>
20230626083432
</lastUpdated>
</versioning>
</metadata>
com1/qmai/android/plugin/GradlePlugin/maven-metadata.xml.md5
0 → 100644
View file @
0ecc03de
70c89a7e779809570b6388b0dae6b3a3
\ No newline at end of file
com1/qmai/android/plugin/GradlePlugin/maven-metadata.xml.sha1
0 → 100644
View file @
0ecc03de
772f160a9dcfa9d529055a73557b4a5438acacc1
\ No newline at end of file
src/main/groovy/com/qmai/android/plugin/OssParamsBean.java
0 → 100644
View file @
0ecc03de
package
com
.
qmai
.
android
.
plugin
;
import
java.io.Serializable
;
class
OssParamsBean
implements
Serializable
{
String
app_oss_endpoint
;
String
app_oss_accessKeyId
;
String
app_oss_accessKeySecret
;
String
app_oss_path
;
String
app_oss_bucketName
;
@Override
public
String
toString
()
{
return
"OssParamsBean{"
+
"app_oss_endpoint='"
+
app_oss_endpoint
+
'\''
+
", app_oss_accessKeyId='"
+
app_oss_accessKeyId
+
'\''
+
", app_oss_accessKeySecret='"
+
app_oss_accessKeySecret
+
'\''
+
", app_oss_path='"
+
app_oss_path
+
'\''
+
", app_oss_bucketName='"
+
app_oss_bucketName
+
'\''
+
'}'
;
}
}
src/main/groovy/com/qmai/android/plugin/OssUploadTask.groovy
View file @
0ecc03de
...
...
@@ -4,6 +4,7 @@ package com.qmai.android.plugin
import
com.aliyun.oss.OSS
import
com.aliyun.oss.OSSClientBuilder
import
com.aliyun.oss.model.PutObjectRequest
import
com.android.tools.r8.internal.S
import
com.google.gson.Gson
import
okhttp3.MediaType
import
okhttp3.OkHttpClient
...
...
@@ -43,13 +44,14 @@ class OssUploadTask extends DefaultTask {
@TaskAction
void
upload
()
{
println
(
"-----------开始上传了"
)
OssParamsBean
ossParamsBean
=
getOssInfo
()
println
(
"-----------开始上传了 "
)
def
fileName
=
file
.
getName
()
// yourEndpoint填写Bucket所在地域对应的Endpoint。以华东1(杭州)为例,Endpoint填写为https://oss-cn-hangzhou.aliyuncs.com。
String
endpoint
=
"https://oss-cn-shanghai.aliyuncs.com"
String
endpoint
=
ossParamsBean
.
app_oss_endpoint
// 阿里云账号AccessKey拥有所有API的访问权限,风险很高。强烈建议您创建并使用RAM用户进行API访问或日常运维,请登录RAM控制台创建RAM用户。
String
accessKeyId
=
"LTAI5t8xR8NRFcxCXhj31FkU"
String
accessKeySecret
=
"GaoC3mqQCz9rX9q8rtBQuEaXZOYn4g"
String
accessKeyId
=
ossParamsBean
.
app_oss_accessKeyId
String
accessKeySecret
=
ossParamsBean
.
app_oss_accessKeySecret
// 创建OSSClient实例。
OSS
ossClient
=
new
OSSClientBuilder
().
build
(
endpoint
,
accessKeyId
,
accessKeySecret
)
...
...
@@ -63,20 +65,21 @@ class OssUploadTask extends DefaultTask {
// metadata.setObjectAcl(CannedAccessControlList.Private);
// putObjectRequest.setMetadata(metadata);
String
ossPath
=
ossParamsBean
.
app_oss_path
String
bucketName
=
ossParamsBean
.
app_oss_bucketName
// 上传文件。
try
{
println
(
"file name= "
+
file
.
name
)
println
(
"file path= "
+
file
.
absolutePath
+
" "
+
file
.
getCanonicalPath
())
println
(
"file access= "
+
file
.
canRead
())
println
(
"begin upload "
+
file
.
exists
())
PutObjectRequest
putObjectRequest
=
new
PutObjectRequest
(
"qmaicn"
,
ossPath
+
fileName
,
file
)
// println("begin upload " + file.exists())
PutObjectRequest
putObjectRequest
=
new
PutObjectRequest
(
bucketName
,
ossPath
+
fileName
,
file
)
ossClient
.
putObject
(
putObjectRequest
)
println
(
"--------------------------------------------------------------------------"
)
println
(
"---------"
+
fileName
+
"--------上传完成"
)
println
(
"下载地址为: "
+
"https://files.qmai.cn/"
+
ossPath
+
fileName
)
println
(
"--------------------------------------------------------------------------"
)
}
catch
(
Exception
e
)
{
println
(
"
uploadOssError=
"
+
e
.
getMessage
()
+
"E"
+
e
)
println
(
"
上传失败:
"
+
e
.
getMessage
()
+
"E"
+
e
)
}
// 关闭OSSClient。
ossClient
.
shutdown
()
...
...
@@ -147,4 +150,15 @@ class OssUploadTask extends DefaultTask {
return
""
}
@Input
OssParamsBean
getOssInfo
(){
OssParamsBean
ossParamsBean
=
new
OssParamsBean
()
Map
<
String
,
String
>
params
=
System
.
getenv
()
ossParamsBean
.
app_oss_endpoint
=
params
.
get
(
"app_oss_endpoint"
)
ossParamsBean
.
app_oss_accessKeyId
=
params
.
get
(
"app_oss_accessKeyId"
)
ossParamsBean
.
app_oss_accessKeySecret
=
params
.
get
(
"app_oss_accessKeySecret"
)
ossParamsBean
.
app_oss_path
=
params
.
get
(
"app_oss_path"
)
ossParamsBean
.
app_oss_bucketName
=
params
.
get
(
"app_oss_bucketName"
)
return
ossParamsBean
}
}
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