-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2、版本检查和下载分离
- Loading branch information
Showing
24 changed files
with
495 additions
and
331 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ngsr/zupdate/ExampleInstrumentedTest.java → ...sr/appupdate/ExampleInstrumentedTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...n/java/com/zhengsr/zupdate/CusDialog.java → ...java/com/zhengsr/appupdate/CusDialog.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...in/java/com/zhengsr/zupdate/TestBean.java → .../java/com/zhengsr/appupdate/TestBean.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package com.zhengsr.zupdate; | ||
package com.zhengsr.appupdate; | ||
|
||
/** | ||
* @auther by zhengshaorui on 2020/3/22 | ||
|
2 changes: 1 addition & 1 deletion
2
.../com/zhengsr/zupdate/ExampleUnitTest.java → ...om/zhengsr/appupdate/ExampleUnitTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package com.zhengsr.zupdate; | ||
package com.zhengsr.appupdate; | ||
|
||
import org.junit.Test; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ allprojects { | |
repositories { | ||
google() | ||
jcenter() | ||
maven { url 'https://jitpack.io' } | ||
|
||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
include ':app', ':update-lib' | ||
rootProject.name='ZUpdate' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 15 additions & 3 deletions
18
update-lib/src/main/java/com/zhengsr/zdwon_lib/callback/CheckListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
update-lib/src/main/java/com/zhengsr/zdwon_lib/entrance/CheckRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
package com.zhengsr.zdwon_lib.entrance; | ||
|
||
import android.content.Context; | ||
|
||
import com.zhengsr.zdwon_lib.bean.ZTaskBean; | ||
import com.zhengsr.zdwon_lib.callback.CheckListener; | ||
import com.zhengsr.zdwon_lib.entrance.imp.task.ZCheckTask; | ||
|
||
import java.util.Map; | ||
|
||
/** | ||
* @author by zhengshaorui on 2019/9/6 | ||
* Describe: | ||
*/ | ||
public class CheckRequest { | ||
|
||
private ZTaskBean mBean; | ||
|
||
public static CheckRequest get(Context context) { | ||
|
||
return new CheckRequest(context); | ||
} | ||
|
||
private CheckRequest(Context context) { | ||
mBean = new ZTaskBean(); | ||
mBean.context = context.getApplicationContext(); | ||
} | ||
|
||
public CheckRequest url(String url) { | ||
mBean.url = url; | ||
return this; | ||
} | ||
|
||
public CheckRequest listener(CheckListener listener) { | ||
mBean.listener = listener; | ||
return this; | ||
} | ||
|
||
public CheckRequest paramsMap(Map<String, String> map) { | ||
mBean.paramsMap.clear(); | ||
mBean.paramsMap.putAll(map); | ||
return this; | ||
} | ||
|
||
public CheckRequest params(String key, String value) { | ||
mBean.paramsMap.put(key, value); | ||
return this; | ||
} | ||
|
||
|
||
public CheckRequest get() { | ||
mBean.isGet = true; | ||
return this; | ||
} | ||
|
||
|
||
public CheckRequest post() { | ||
mBean.isGet = false; | ||
return this; | ||
} | ||
|
||
public void check(){ | ||
mBean = new CheckParams().checkJsonUrl(mBean); | ||
new ZCheckTask(mBean); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.