Skip to content

Commit

Permalink
finish v0.3.0 version
Browse files Browse the repository at this point in the history
  • Loading branch information
rhymelph committed Jun 19, 2020
1 parent d52c084 commit 9f09fb0
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ protected Uri doInBackground(Integer... integers) {
}
if (upgradeFlavor == UpgradeSQLite.UPGRADE_FLAVOR_INCREMENT) {
String newPath = new IncrementUpgradeManager(contextWrapper.get()).mixinAndGetNewApk(path);
RUpgradeLogger.get().d(TAG,"合成成功,新的安装包路径:"+newPath);
if (newPath == null) return null;
file = new File(newPath);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@ public String mixinAndGetNewApk(String patchPath) {
}
newApkFile.createNewFile();
rUpgradeLib.mixinPatch(oldApkPath, patchPath, newApkFile.getPath());
RUpgradeLogger.get().d(TAG, String.format("mixinAndGetNewApk: %s",newApkFile.getPath()));
RUpgradeLogger.get().d(TAG, "mixinAndGetNewApk"+newApkFile.getPath());
return newApkFile.getPath();
} catch (Exception e) {
RUpgradeLogger.get().d(TAG, "合成失败:");
e.printStackTrace();
}
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public synchronized static UpgradeSQLite getInstance(Context context) {
public static final String UPGRADE_FLAVOR = "upgrade_flavor";
public static final int UPGRADE_FLAVOR_Normal = 0;
public static final int UPGRADE_FLAVOR_HOT_UPDATE = 1;
public static final int UPGRADE_FLAVOR_INCREMENT = 3;
public static final int UPGRADE_FLAVOR_INCREMENT = 2;

private static final String DATABASE_CREATE = "create table if not exists " + VERSION_MANAGER + "(" +
ID + " integer primary key autoincrement," +
Expand Down
1 change: 1 addition & 0 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class _MyAppState extends State<MyApp> {
@override
void initState() {
super.initState();
RUpgrade.setDebug(true);
}

Widget _buildMultiPlatformWidget() {
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: r_upgrade_example
description: Demonstrates how to use the r_upgrade plugin.
publish_to: 'none'
version: 1.0.0+1
version: 1.0.0+0
environment:
sdk: ">=2.1.0 <3.0.0"

Expand Down

0 comments on commit 9f09fb0

Please sign in to comment.