-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
调整CI使能发布包含source/javadoc且经签名的release SDK
Change-Id: Id1f1d814e6b7f0dc30ae6f895b6412ff9370f2d7
- Loading branch information
1 parent
d4eb985
commit 12a96aa
Showing
6 changed files
with
134 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/sh | ||
|
||
key_id=$KEY_ID_OF_SIGN | ||
password=$PASSWORD_OF_SIGN | ||
root_path=$(pwd) | ||
sed -i 's#MY_KEY_ID#'$key_id'#g' gradle.properties | ||
sed -i 's#MY_PASSWORD#'$password'#g' gradle.properties | ||
sed -i 's#MY_KEY_RING_FILE#'$root_path'/secring.gpg#g' gradle.properties |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
-----BEGIN PGP MESSAGE----- | ||
|
||
jA0EBwMCN9kH5511NfXs0usBNzHXvRfrgPkHk9ny5osvo7sDxMMS8yf0zWoTFD/m | ||
n5iyU1+J5dTzwvRhJWnSHTPFzFunCCVcoQ05R2A2P5VyLr2Cf7tF+1WNRSNu+qAr | ||
Sb7wNXpjS36pCFCqUBz62PgNq3jcYZ35n6cC5AabBlZBeOmcAPScYdrOqLfVIxbC | ||
68nCGwbq0VNBa9aZIMq8JfsVsl5L7zfU1D+qYluES6dwgYSUC8E8BFh210x+VcyS | ||
W0wl3a62rZ39g2LwhMJSnXZSClemuZRp7G8NJqgeh5gZQnoAavsALZlvbawgEJee | ||
Cv8iMSx6AAp3WUseJT/AEjGFeAxgEo+WUZD7Ty5nipcOECmJICi10ji63G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38bc4mkyJ8ISPFnlQCpru3GQEZZmssgzYulIwdU3e+fikaRjxX7W6q | ||
MtsNfFgOAjsugJoOWzWiVJbMpu849309QBpaeVsALZmV5kv9EOVGBKElkP0AkNrs | ||
PxYPW28vTdLPdmhOTi+wD5b5tfslWR+CcNue4r+gMxNG+qrsHK4huOSrnADSEq+l | ||
7sxg1J4loYp4XTtWHt1Y89QZ6UBdm/OsNMd+geCdog== | ||
=38Qq | ||
-----END PGP MESSAGE----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ apply plugin: 'kotlin-android' | |
apply plugin: 'kotlin-android-extensions' | ||
apply plugin: 'maven-publish' | ||
apply from: "../parse_json.gradle" | ||
apply plugin: 'signing' | ||
|
||
android { | ||
compileSdkVersion 29 | ||
|
@@ -42,19 +43,65 @@ dependencies { | |
implementation "org.java-websocket:Java-WebSocket:1.4.0" | ||
//kotlin协程 | ||
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.4' | ||
} | ||
|
||
task androidJavadocs(type: Javadoc) { | ||
failOnError false | ||
source = android.sourceSets.main.java.srcDirs | ||
classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) | ||
android.libraryVariants.all { variant -> | ||
if (variant.name == 'release') { | ||
owner.classpath += variant.javaCompile.classpath | ||
} | ||
} | ||
exclude '**/R.html', '**/R.*.html', '**/index.html' | ||
} | ||
|
||
task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) { | ||
classifier = 'javadoc' | ||
from androidJavadocs.destinationDir | ||
} | ||
|
||
task androidSourcesJar(type: Jar) { | ||
classifier = 'sources' | ||
from android.sourceSets.main.java.srcDirs | ||
} | ||
|
||
def libVersion = rootProject.ext.android.versionNameStr + '-SNAPSHOT' | ||
ext.isReleaseVersion = !libVersion.endsWith("SNAPSHOT") | ||
publishing { | ||
publications { | ||
aar(MavenPublication) { | ||
groupId 'com.tencent.iot.explorer' | ||
artifactId 'explorer-link-android' | ||
version libVersion | ||
artifact(androidSourcesJar) | ||
artifact(androidJavadocsJar) | ||
artifact file('build/outputs/aar/sdk-release.aar') | ||
|
||
println("libVersion=" + libVersion) | ||
pom { | ||
name = 'explorer link android' | ||
description = 'Tencent Link Android library' | ||
url = 'https://github.com/tencentyun/iot-link-android/tree/master/sdk' | ||
licenses { | ||
license { | ||
name = 'Tencent Binary License' | ||
url = 'https://github.com/tencentyun/iot-link-android/blob/master/sdk/LICENSE' | ||
} | ||
} | ||
developers { | ||
developer { | ||
id = 'tencent_archurtan' | ||
name = 'Tencent archurtan' | ||
email = '[email protected]' | ||
} | ||
} | ||
scm { | ||
url = 'scm:[email protected]:tencentyun/iot-link-android.git' | ||
connection = 'scm:[email protected]:tencentyun/iot-link-android.git' | ||
developerConnection = 'scm:[email protected]:tencentyun/iot-link-android.git' | ||
} | ||
} | ||
|
||
pom.withXml { | ||
def dependenciesNode = asNode().appendNode('dependencies') | ||
|
@@ -91,3 +138,9 @@ publishing { | |
} | ||
} | ||
} | ||
|
||
signing { | ||
if (isReleaseVersion) { | ||
sign publishing.publications.aar | ||
} | ||
} |