Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Commit

Permalink
Update build.gradle for Jcenter publication.
Browse files Browse the repository at this point in the history
  • Loading branch information
YorkShen committed Oct 21, 2019
1 parent 3851c62 commit 1d1aee7
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 13 deletions.
2 changes: 1 addition & 1 deletion android/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ When some commits of playground rely on unpublished features of weex-sdk,a SNAP

```
cd android
./gradlew clean install ArtifactoryPublish -PartifactName="sdk_legacy" -PuseApachePackageName="false" -PunbundlingJSC="true" -PbuildRuntimeApi=true -PweexVersion=$PUBLISH_VERSION -PbintrayUser=alibabaweex -PbintrayApiKey=$JCENTER_TOKEN
./gradlew clean install ArtifactoryPublish -PgroupId="org.apache.weex" -PartifactName="sdk_legacy" -PApachePackageName="false" -PunbundlingJSC="true" -PbuildRuntimeApi=true -PweexVersion=$PUBLISH_VERSION -PbintrayUser=weex -PbintrayApiKey=$JCENTER_TOKEN
```

* Explanation for variable:
Expand Down
6 changes: 4 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ subprojects {
}
buildscript {
dependencies {
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.0'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
}
repositories {
google()
Expand All @@ -78,6 +78,8 @@ ext {
useApachePackageName = project.hasProperty('apachePackageName') ? project.property('apachePackageName').toBoolean() : false
unbundlingJSC = project.hasProperty('unbundlingJSC') ? project.property('unbundlingJSC').toBoolean() : false
artifactName = project.hasProperty('artifactName') ? project.property('artifactName') : 'weex_sdk'
groupId = project.hasProperty('groupId') ? project.property('groupId') : 'com.taobao.android'
weexVersion = project.hasProperty('weexVersion') ? project.getProperty('weexVersion') : '0.28.0.1'
implementFromWeex = true
}

Expand Down
6 changes: 3 additions & 3 deletions android/sdk/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
plugins {
id "com.github.hierynomus.license" version "0.14.0"
id 'com.jfrog.artifactory' version '4.9.7'
id 'com.jfrog.artifactory' version '4.10.0'
}

apply plugin: 'com.android.library'
Expand All @@ -33,8 +33,8 @@ apply from: 'buildSrc/download_jsc.gradle'
apply from: 'buildSrc/packageName.gradle'
apply from: 'buildSrc/asan.gradle'

version = project.hasProperty('weexVersion') ? project.getProperty('weexVersion') : '0.28.0.1'
group = "com.taobao.android"
version = project.weexVersion
group = project.groupId

//Check version, the version must have 4 sections. The leading three section must be number, and the last section is odd number with or without suffix string.
if (!project.hasProperty('ignoreVersionCheck') || !project.getProperty('ignoreVersionCheck').equals("true")) {
Expand Down
11 changes: 6 additions & 5 deletions android/sdk/buildSrc/jcenter.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ install {
packaging 'aar'
name 'Apache Incubator-Weex'
artifactId project.artifactName
groupId 'org.apache.weex'
groupId project.groupId
url siteUrl
version = project.weexVersion
licenses {
license {
name 'The Apache Software License, Version 2.0'
Expand All @@ -38,7 +39,7 @@ install {
}
developers {
developer {
name 'Apache Incubator-Weex PPMC'
name 'Apache Weex(Incubating) PPMC'
email mailingList
}
}
Expand All @@ -57,13 +58,13 @@ bintray {
user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY')
pkg {
repo = "maven"
name = 'weex_sdk'
repo = "Android"
name = 'sdk'
websiteUrl = siteUrl
desc = description
vcsUrl = gitUrl
licenses = ["Apache-2.0"]
publish = true
//publish = true
version {
name = project.version
vcsTag = project.hasProperty('vcsTag') ? project.property('vcsTag') : project.version
Expand Down
4 changes: 2 additions & 2 deletions scripts/publish_release_official.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ release-it --ci --no-npm --no-increment --no-git.requireCleanWorkingDir --no-git

echo "Publish Android JCenter Release"
cd android
./gradlew clean install bintray -PartifactName="sdk" -PuseApachePackageName="true" -PvcsTag="$1" -PunbundlingJSC="true" -PbuildRuntimeApi=true -PignoreVersionCheck="true" -PweexVersion="$1" -PbintrayUser=alibabaweex -PbintrayApiKey="$6"
./gradlew install bintray -PartifactName="sdk_legacy" -PuseApachePackageName="false" -PvcsTag="$1" -PunbundlingJSC="true" -PbuildRuntimeApi=true -PignoreVersionCheck="true" -PweexVersion="$1" -PbintrayUser=alibabaweex -PbintrayApiKey="$6"
./gradlew :weex_sdk:clean :weex_sdk:install :weex_sdk:bintray -PgroupId="org.apache.weex" -PartifactName="sdk" -PApachePackageName="true" -PvcsTag="$1" -PunbundlingJSC="true" -PbuildRuntimeApi=true -PignoreVersionCheck="true" -PweexVersion="$1" -PbintrayUser=weex -PbintrayApiKey="$6"
./gradlew :weex_sdk:install :weex_sdk:bintray -PgroupId="org.apache.weex" -PartifactName="sdk_legacy" -PApachePackageName="false" -PvcsTag="$1" -PunbundlingJSC="true" -PbuildRuntimeApi=true -PignoreVersionCheck="true" -PweexVersion="$1" -PbintrayUser=weex -PbintrayApiKey="$6"

# Publish iOS to Cocoapods

0 comments on commit 1d1aee7

Please sign in to comment.