Skip to content

Commit

Permalink
update jcenter
Browse files Browse the repository at this point in the history
  • Loading branch information
yjfnypeu committed Jun 26, 2016
1 parent b09b2cd commit fe65a3c
Show file tree
Hide file tree
Showing 10 changed files with 81 additions and 40 deletions.
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 12 additions & 9 deletions app/app.iml
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,6 @@
<sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/shaders" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
Expand All @@ -80,9 +72,16 @@
<sourceFolder url="file://$MODULE_DIR$/src/test/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/builds" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/bundles" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" />
Expand All @@ -93,7 +92,9 @@
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-verifier" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/instant-run-support" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/lint" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/pre-dexed" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/reload-dex" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/restart-dex" />
Expand All @@ -102,6 +103,8 @@
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/transforms" />
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
<excludeFolder url="file://$MODULE_DIR$/build/reports" />
<excludeFolder url="file://$MODULE_DIR$/build/test-results" />
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
</content>
<orderEntry type="jdk" jdkName="Android API 23 Platform" jdkType="Android SDK" />
Expand Down
7 changes: 5 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"

lintOptions {
abortOnError false
}
defaultConfig {
applicationId "org.lzh.framework.updateplugin"
minSdkVersion 14
Expand All @@ -24,5 +26,6 @@ dependencies {
testCompile 'junit:junit:4.12'
// compile 'com.android.support:appcompat-v7:23.3.0'
compile project(':updatepluginlib')
// compile 'com.github.yjfnypeu:UpdatePlugin:0.4'
// compile 'com.github.yjfnypeu:UpdatePlugin:0.3'
// debugCompile 'com.squareup.leakcanary:leakcanary-android:1.3'
}
21 changes: 21 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,27 @@
</activity>
<activity android:name=".EmptyActivity"></activity>

<!--<service-->
<!--android:name="com.squareup.leakcanary.internal.HeapAnalyzerService"-->
<!--android:enabled="false"-->
<!--android:process=":leakcanary" />-->
<!--<service-->
<!--android:name="com.squareup.leakcanary.DisplayLeakService"-->
<!--android:enabled="false" />-->

<!--<activity-->
<!--android:name="com.squareup.leakcanary.internal.DisplayLeakActivity"-->
<!--android:enabled="false"-->
<!--android:icon="@drawable/__leak_canary_icon"-->
<!--android:label="@string/__leak_canary_display_activity_label"-->
<!--android:taskAffinity="com.squareup.leakcanary"-->
<!--android:theme="@style/__LeakCanary.Base" >-->
<!--<intent-filter>-->
<!--<action android:name="android.intent.action.MAIN" />-->

<!--<category android:name="android.intent.category.LAUNCHER" />-->
<!--</intent-filter>-->
<!--</activity>-->
</application>

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ public class BaseActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// MyApplication.getRefWatcher(this).watch(this);
}
}
32 changes: 16 additions & 16 deletions app/src/main/java/org/lzh/framework/updateplugin/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,22 @@ public void onClick(View v) {
// 对于UpdateBuilder中未设置的参数。会默认使用UpdateConfig中的配置

UpdateBuilder.create()
.strategy(new UpdateStrategy() {
@Override
public boolean isShowUpdateDialog(Update update) {
return false;
}

@Override
public boolean isAutoInstall() {
return false;
}

@Override
public boolean isShowDownloadDialog() {
return false;
}
})
// .strategy(new UpdateStrategy() {
// @Override
// public boolean isShowUpdateDialog(Update update) {
// return false;
// }
//
// @Override
// public boolean isAutoInstall() {
// return false;
// }
//
// @Override
// public boolean isShowDownloadDialog() {
// return false;
// }
// })
.check(MainActivity.this);


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import android.app.Application;
import android.widget.Toast;


import org.lzh.framework.updatepluginlib.UpdateConfig;
import org.lzh.framework.updatepluginlib.callback.EmptyCheckCB;
import org.lzh.framework.updatepluginlib.callback.EmptyDownloadCB;
Expand All @@ -14,10 +15,18 @@
*/
public class MyApplication extends Application {
private String apkFile = "http://apk.hiapk.com/appdown/com.hiapk.live?planid=2515816&seid=c711112f-cc50-0001-a55f-bfe5123fe450";
// private RefWatcher refWatcher;
//
// public static RefWatcher getRefWatcher (Context context) {
// MyApplication application = (MyApplication) context
// .getApplicationContext();
// return application.refWatcher;
// }

@Override
public void onCreate() {
super.onCreate();
// refWatcher = LeakCanary.install(this);
// UpdateConfig为全局配置。当在其他页面中。使用UpdateBuilder进行检查更新时。
// 对于没传的参数,会默认使用UpdateConfig中的全局配置
UpdateConfig.getConfig()
Expand Down
2 changes: 1 addition & 1 deletion updatepluginlib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ publish {
userOrg = 'yjfnypeu'//bintray.com用户名
groupId = 'org.lzh.nonview.updateplugin'//jcenter上的路径
artifactId = 'UpdatePlugin'//项目名称
publishVersion = '0.1'//版本号
publishVersion = '0.4'//版本号
desc = 'this is a auto update yourself app framework'//描述,不重要
website = 'https://github.com/yjfnypeu/UpdatePlugin'//网站,不重要;尽量模拟github上的地址,例如我这样的;当然你有地址最好了

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
package org.lzh.framework.updatepluginlib.model;

/**
* 新版本检查器
* The checker to check whether or not should be updated
* Created by lzh on 2016/6/20.
*/
public interface UpdateChecker {

/**
* 判断是否含有新版本
* @return 返回true代表需要更新。
* check if is a new version
*/
boolean check(Update update);
}
21 changes: 13 additions & 8 deletions updatepluginlib/updatepluginlib.iml
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,6 @@
<sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/shaders" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
Expand All @@ -81,6 +73,15 @@
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/build/docs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/bundles" />
Expand All @@ -95,7 +96,11 @@
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/shaders" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/transforms" />
<excludeFolder url="file://$MODULE_DIR$/build/libs" />
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
<excludeFolder url="file://$MODULE_DIR$/build/publications" />
<excludeFolder url="file://$MODULE_DIR$/build/reports" />
<excludeFolder url="file://$MODULE_DIR$/build/test-results" />
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
</content>
<orderEntry type="jdk" jdkName="Android API 23 Platform" jdkType="Android SDK" />
Expand Down

0 comments on commit fe65a3c

Please sign in to comment.