Android一鍵發佈內測平臺插件

Pre.im 插件使用說明

前言

在 Android studio 中通過引入 gradle 腳本可以方便集成一款優秀的插件,平時,我們喜歡將自己的應用上傳到免費的內測平臺進行下載分發,但是每次打包一個版本都需要重複上傳,看完這篇,你將可以方便簡單的集成一個插件,省去每次重複上傳的煩惱。目前該插件已經開源 ,有興趣的朋友可以到github看看:https://github.com/AllenCoder/UploaderPlugin
Pre.im官網鏈接,一款內測分發平臺

在根目錄下的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='<下載密碼 (傳空字符串或不傳則不設置密碼)>'
    update_notify="<向內測成員發佈新版通知 (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"
}

項目應用了Pre插件之後,插件默認是開啓的,會在工程Gradle projects生成以下兩個task:
Paste_Image.png

可以直接點擊執行或者在命令行輸入以下命令:

gradle uploadReleasePreApkFile

上傳成功之後就可以在內測平臺看到版本信息:

Paste_Image.png

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.
發佈了71 篇原創文章 · 獲贊 25 · 訪問量 37萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章