Rename the generated package dev
authorPeng Li <seudut@gmail.com>
Wed, 30 May 2018 03:55:14 +0000 (11:55 +0800)
committerPeng Li <seudut@gmail.com>
Wed, 30 May 2018 03:55:14 +0000 (11:55 +0800)
app/build.gradle
app/src/main/java/ai/suanzi/rtmpclient/CheckVersionInfoTask.java

index 7d8568a..c265a5a 100644 (file)
@@ -37,6 +37,12 @@ android {
             signingConfig signingConfigs.release
         }
     }
+
+    applicationVariants.all { variant ->
+        variant.outputs.all {
+            outputFileName = "RtmpClient-${variant.versionName}-${variant.name}.apk"
+        }
+    }
 }
 
 def getGitVersion() {
index d17b85f..b0cbc02 100644 (file)
@@ -23,6 +23,15 @@ public class CheckVersionInfoTask extends AsyncTask<Void, Void, String> {
 
     private static final String VERSION_INFO_URL = "http://downloads.suanzi.ai/RtmpClient/update.json";
 
+    /* the content of update.json as below
+    peng@[~/web/RtmpClient]>> cat update.json
+    {
+        "url":"http://downloads.suanzi.ai/RtmpClient/RtmpClient-v0.3.3-release.apk",
+        "versionCode":33,
+        "updateMessage":"1. Fix bug<br/>2. Update<br/>3. test"
+    }
+    */
+
     public CheckVersionInfoTask(Context context){
         this.mContext = context;
     }