Pre.im 插件使用說明
前言
在 Android studio 中通過引入 gradle 腳本可以方便集成一款優(yōu)秀的插件贤重,平時(shí)奸鸯,我們喜歡將自己的應(yīng)用上傳到免費(fèi)的內(nèi)測平臺(tái)進(jìn)行下載分發(fā)片挂,但是每次打包一個(gè)版本都需要重復(fù)上傳捆毫,看完這篇矩屁,你將可以方便簡單的集成一個(gè)插件遍膜,省去每次重復(fù)上傳的煩惱。目前該插件已經(jīng)開源 扛或,有興趣的朋友可以到github看看:https://github.com/AllenCoder/UploaderPlugin
官網(wǎng)鏈接绵咱,一款內(nèi)測分發(fā)平臺(tái)
在根目錄下的build.gralde文件的depandencies(buildscript部分)中添加:
dependencies {
classpath 'com.pre.im:preuploader:1.0.2'
}
在module的build.gradle文件的頂部添加:
apply plugin: 'com.pre.im'
pre {
user_key='<your user>'
password='<下載密碼 (傳空字符串或不傳則不設(shè)置密碼)>'
update_notify="<向內(nèi)測成員發(fā)布新版通知 (1:開啟)>"
}
<Project>/build.gradle
文件如下:
buildscript {
repositories {
jcenter()
}
dependencies {
...
classpath 'com.pre.im:preuploader:1.0.2'
}
}}
<Project>/<Module>/build.gradle
文件如下:
apply plugin: 'com.pre.im'
pre {
user_key='a33333333333rrrr4ddeeeeeeedd'
password='1222222'
update_notify="1"
}
項(xiàng)目應(yīng)用了Pre插件之后,插件默認(rèn)是開啟的熙兔,會(huì)在工程Gradle projects生成以下兩個(gè)task:
可以直接點(diǎn)擊執(zhí)行或者在命令行輸入以下命令:
gradle uploadReleasePreApkFile
上傳成功之后就可以在內(nèi)測平臺(tái)看到版本信息:
Thanks Bugly,
BuglyDevTeam,
IT_xiao小巫
License
Copyright 2016 AllenCoder
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.