diff --git a/README.md b/README.md index 331320b2..17bbc9e2 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,8 @@

[![license](http://img.shields.io/badge/license-Apache2.0-brightgreen.svg?style=flat)](https://github.com/Qihoo360/RePlugin/blob/master/LICENSE) -[![Release Version](https://img.shields.io/badge/release-2.3.2-brightgreen.svg)](https://github.com/Qihoo360/RePlugin/releases) + +[![Release Version](https://img.shields.io/badge/release-2.3.3-brightgreen.svg)](https://github.com/Qihoo360/RePlugin/releases) ## 通知 diff --git a/README_CN.md b/README_CN.md index 9b1e8fff..f456bb70 100644 --- a/README_CN.md +++ b/README_CN.md @@ -6,7 +6,7 @@ [![license](http://img.shields.io/badge/license-Apache2.0-brightgreen.svg?style=flat)](https://github.com/Qihoo360/RePlugin/blob/master/LICENSE) -[![Release Version](https://img.shields.io/badge/release-2.3.2-brightgreen.svg)](https://github.com/Qihoo360/RePlugin/releases) +[![Release Version](https://img.shields.io/badge/release-2.3.3-brightgreen.svg)](https://github.com/Qihoo360/RePlugin/releases) ## 通知 diff --git a/deploy.sh b/deploy.sh index 09ef8989..7f58ce8c 100755 --- a/deploy.sh +++ b/deploy.sh @@ -19,13 +19,21 @@ __rp_deploy_project(){ git checkout ${1} } +rp_revert_AppConstant(){ + git status -s | sed s/^...// | grep '/AppConstant.groovy' | git checkout ${f} +} + rp_deploy(){ local current=`pwd` && cd ${RP_BASE_DIR} + # revert AppConstant.groovy + rp_revert_AppConstant # saving all changes: git stash save "saving stash for deploying!!!" # deploy for p in ${TARGET_PROJECTS}; do __rp_deploy_project ${RP_BASE_DIR}/${p}; done # revert local changes: git revert --hard HEAD; git stash pop - local current=`pwd` + rp_revert_AppConstant + # back + cd ${current} } rp_test(){ @@ -45,11 +53,12 @@ rp_test(){ # replugin-sample-extra/fresco/FrescoPlugin/app replugin-sample-extra/fresco/FrescoPlugin ) - local log=${RP_BASE_DIR}/build/rp_test.log && [[ -f $log ]] && rm -f $log + local log=${RP_BASE_DIR}/build/rp_test.log && [[ -f $log ]] && rm -f $log && touch $log local current=`pwd` for p in ${projects}; do - echo -e ">>> BUILDING ${p}" - p=${RP_BASE_DIR}/${p} && __gradle_exec -p ${p} clean asDebug 2>/dev/null >> ${log} && echo "SUCCEED"; + local p=${RP_BASE_DIR}/${p} + echo -e ">>> BUILDING ${RP_BASE_DIR}/${p}" + cd ${p} && { __gradle_exec -p ${p} clean asDebug } ls -l ${p}/app/build/outputs/apk done cd ${current} diff --git a/rp-config.gradle b/rp-config.gradle index 7b9ac0c6..c60bf341 100644 --- a/rp-config.gradle +++ b/rp-config.gradle @@ -1,6 +1,7 @@ project.ext{ - RP_USER = 'qihoo360' + RP_USER = 'replugin' RP_REPO = 'replugin' + RP_USERORG = 'qihoo360' // unset this if you an't belong to any orgnization // RP_SITE = 'https://github.com/Qihoo360/Replugin' RP_DESC = 'RePlugin - A flexible, stable, easy-to-use Android Plug-in Framework' @@ -10,5 +11,5 @@ project.ext{ RP_LICENSES_NAME = 'Apache-2.0' // RP_GROUP = 'com.qihoo360.replugin' - RP_VERSION = '2.3.2' + RP_VERSION = '2.3.3' } \ No newline at end of file diff --git a/rp-publish.gradle b/rp-publish.gradle index 8b05af1c..5b260f2e 100644 --- a/rp-publish.gradle +++ b/rp-publish.gradle @@ -57,6 +57,8 @@ def pbEmail = getPropertyExt('RP_EMAIL', pbUser) def pbUserId = getPropertyExt('RP_USER_ID', pbUser) +def pbUserOrg = getPropertyExt('RP_USERORG', '') + def pbBintayKey = getPropertyExt('RP_BINTRAY_KEY', System.getenv('RP_BINTRAY_KEY')) // @@ -120,6 +122,29 @@ tasks.withType(JavaCompile) { options.encoding = "UTF-8" } + +// TODO: mavenLocal & jcenter conflicts + +if ( pbBintayKey == null ){ + + System.err.println("\n>>>「publish.gradle」bintray access key is EMPTY, UPLOAD LOCAL ONLY!\n") + + ///// publish to LOCAL + + apply plugin: 'maven' + final def theGroup = group // group will be reset to 'upload' + uploadArchives { + repositories.mavenDeployer { + repository(url: "file://${System.getenv('HOME')}/.m2/repository") + pom.groupId = theGroup + pom.version = version + pom.artifactId = pbArtifactId + } + } + + return +} + /////// publish to BINTRAY apply plugin: 'com.jfrog.bintray' @@ -157,38 +182,19 @@ install { } } -// config bintray - -if ( pbBintayKey == null ){ - System.err.println("bintray access key is EMPTY!!!") -} else { - bintray { - user = pbUser - key = pbBintayKey - configurations = ['archives'] - pkg { - desc = pbDesc - repo = pbRepo - name = pbArtifactId - vcsUrl = pbGitUrl - userOrg = 'qihoo360' - websiteUrl = pbSiteUrl - issueTrackerUrl = pbIssueUrl - licenses = [pbLicense] - publish = true - } - } -} - -/////// publish to LOCAL - -// apply plugin: 'maven' -//final def theGroup = group // group will be reset to 'upload' -//uploadArchives { -// repositories.mavenDeployer { -// repository(url: "file://${System.getenv('HOME')}/.m2/repository") -// pom.groupId = theGroup -// pom.version = version -// pom.artifactId = pbArtifactId -// } -//} \ No newline at end of file +bintray { + user = pbUser + key = pbBintayKey + configurations = ['archives'] + pkg { + desc = pbDesc + repo = pbRepo + name = pbArtifactId + vcsUrl = pbGitUrl + userOrg = pbUserOrg + websiteUrl = pbSiteUrl + issueTrackerUrl = pbIssueUrl + licenses = [pbLicense] + publish = true + } +} \ No newline at end of file