You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by GitBox <gi...@apache.org> on 2018/12/13 04:31:51 UTC

[GitHub] YorkShen closed pull request #1905: * [Android] Update gradle for jCenter publish.

YorkShen closed pull request #1905: * [Android] Update gradle for jCenter publish.
URL: https://github.com/apache/incubator-weex/pull/1905
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/android/commons/build.gradle b/android/commons/build.gradle
index f101851ea7..462b0f6cea 100644
--- a/android/commons/build.gradle
+++ b/android/commons/build.gradle
@@ -6,7 +6,6 @@ apply plugin: 'com.android.library'
 
 android {
 
-    publishNonDefault  true
     compileSdkVersion project.compileSdkVersion
     buildToolsVersion project.buildToolsVersion
     resourcePrefix "weexcomm"
@@ -43,11 +42,10 @@ android {
 
 dependencies {
     compile fileTree(dir: 'libs', include: ['*.jar'])
+    compile project(':weex_sdk')
     compile "com.android.support:support-v4:${project.supportLibVersion}"
     compile "com.android.support:appcompat-v7:${project.supportLibVersion}"
     // compile project(':weex_sdk')
-    debugCompile project(path: ':weex_sdk', configuration: 'debug')
-    releaseCompile project(path: ':weex_sdk', configuration: 'release')
     compile 'com.squareup.picasso:picasso:2.5.2'
     compile 'com.facebook.fresco:fresco:0.10.0'
     compile 'com.taobao.android.weex_inspection:protocol:1.1.4.1'
diff --git a/android/playground/app/build.gradle b/android/playground/app/build.gradle
index 2013b36297..b59c758963 100755
--- a/android/playground/app/build.gradle
+++ b/android/playground/app/build.gradle
@@ -90,12 +90,8 @@ dependencies {
     androidTestCompile 'com.android.support.test.uiautomator:uiautomator-v18:2.1.2'
     /*source dependency*/
 
-    debugCompile project(path: ':commons', configuration: 'debug')
-    releaseCompile project(path: ':commons', configuration: 'release')
-
-    debugCompile project(path: ':weex_sdk', configuration: 'debug')
-    releaseCompile project(path: ':weex_sdk', configuration: 'release')
-
+    compile project(':commons')
+    compile project(':weex_sdk')
     //https://github.com/weexteam/weex-analyzer-android
     //Weex-Analyzer provides several convenient tools such as Memory Monitor
     // to optimize your application. It's not available by default,you can
diff --git a/android/sdk/build.gradle b/android/sdk/build.gradle
index 1b1135eb85..31f2625377 100755
--- a/android/sdk/build.gradle
+++ b/android/sdk/build.gradle
@@ -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 'alibabaweex@gmail.com'
+                    }
+                }
+                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
+        }
+    }
+}
\ No newline at end of file


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services