forked from apache/incubator-weex
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [Android] Update gradle for jCenter publish. (apache#1905)
Use the following command to publish to jCenter ./gradlew install -PbintrayUser=xxxx -PbintrayApiKey=yyyyy bintray xxxx and yyyyy are the user name and key
- Loading branch information
Showing
3 changed files
with
68 additions
and
12 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
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 |
---|---|---|
|
@@ -55,11 +55,10 @@ checkstyle { | |
} | ||
|
||
|
||
version = "0.20.0" | ||
version = "0.20.0.1" | ||
|
||
android { | ||
|
||
publishNonDefault true | ||
compileSdkVersion project.compileSdkVersion | ||
buildToolsVersion project.buildToolsVersion | ||
resourcePrefix "weex" | ||
|
@@ -129,7 +128,7 @@ android { | |
multiDexEnabled true | ||
|
||
versionCode 1 | ||
versionName "1.0" | ||
versionName project.version | ||
ndk { | ||
abiFilters "armeabi-v7a","armeabi","x86" | ||
} | ||
|
@@ -283,3 +282,66 @@ task checkNdkVersion() { | |
} | ||
|
||
preBuild.dependsOn checkNdkVersion | ||
|
||
apply plugin: 'com.jfrog.bintray' | ||
apply plugin: 'com.github.dcendents.android-maven' | ||
def siteUrl = 'http://weex.incubator.apache.org' | ||
def gitUrl = 'https://github.com/apache/incubator-weex.git' | ||
group = "com.taobao.android" | ||
install { | ||
repositories.mavenInstaller { | ||
// This generates POM.xml with proper parameters | ||
pom { | ||
project { | ||
packaging 'aar' | ||
name 'weex_sdk' | ||
url siteUrl | ||
licenses { | ||
license { | ||
name 'The Apache Software License, Version 2.0' | ||
url 'http://www.apache.org/licenses/LICENSE-2.0.txt' | ||
} | ||
} | ||
developers { | ||
developer { | ||
id 'weex alibaba' | ||
name 'weex alibaba' | ||
email '[email protected]' | ||
} | ||
} | ||
scm { | ||
connection gitUrl | ||
developerConnection gitUrl | ||
url siteUrl | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
task sourcesJar(type: Jar) { | ||
from android.sourceSets.main.java.srcDirs | ||
classifier = 'sources' | ||
} | ||
|
||
artifacts { | ||
archives sourcesJar | ||
} | ||
|
||
bintray { | ||
configurations = ['archives'] | ||
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" | ||
websiteUrl = siteUrl | ||
vcsUrl = gitUrl | ||
licenses = ["Apache-2.0"] | ||
publish = true | ||
version { | ||
//这里填写需要发布的版本号 | ||
name = project.version | ||
} | ||
} | ||
} |