From 0b01e71bd4908420f164e03818f96b171f28cf44 Mon Sep 17 00:00:00 2001 From: Sherlock Holmes <745453463@qq.com> Date: Sun, 12 Mar 2017 14:16:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=86=E5=BA=93=E4=B8=8A=E4=BC=A0=E5=88=B0jc?= =?UTF-8?q?enter=E4=B8=8A=EF=BC=8C=E6=96=B9=E4=BE=BF=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle | 8 +++---- .../java/xyz/zpayh/agerabus/MainActivity.java | 2 ++ .../zpayh/agerabus/event/RemoteTeacher.java | 6 +++--- .../xyz/zpayh/agerabus/event/RemoteUser.java | 2 +- build.gradle | 8 ++++--- gradle/wrapper/gradle-wrapper.properties | 4 ++-- library/build.gradle | 21 ++++++++++++------- .../java/xyz/zpayh/bus/AgeraBusClient.java | 4 ++++ .../main/java/xyz/zpayh/bus/BusReservoir.java | 3 +++ .../xyz/zpayh/bus/ipc/AgeraBusService.java | 2 ++ 10 files changed, 40 insertions(+), 20 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index c54d38f..720e79d 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -2,7 +2,7 @@ apply plugin: 'com.android.application' android { compileSdkVersion 25 - buildToolsVersion "25.0.1" + buildToolsVersion "25.0.2" defaultConfig { applicationId "xyz.zpayh.agerabus" minSdkVersion 9 @@ -24,9 +24,9 @@ dependencies { androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) - compile 'com.android.support:appcompat-v7:25.0.1' - compile 'com.android.support:design:25.0.1' + compile 'com.android.support:appcompat-v7:25.2.0' + compile 'com.android.support:design:25.2.0' testCompile 'junit:junit:4.12' - compile 'com.google.android.agera:agera:1.2.0' + compile 'com.google.android.agera:agera:1.3.0' compile project(':library') } diff --git a/app/src/main/java/xyz/zpayh/agerabus/MainActivity.java b/app/src/main/java/xyz/zpayh/agerabus/MainActivity.java index 5d5055b..ff2c039 100644 --- a/app/src/main/java/xyz/zpayh/agerabus/MainActivity.java +++ b/app/src/main/java/xyz/zpayh/agerabus/MainActivity.java @@ -45,6 +45,8 @@ public void onClick(View view) { case R.id.bt_remote:{ startActivity(new Intent(this,RemoteEventActivity.class)); }break; + default: + break; } } } diff --git a/app/src/main/java/xyz/zpayh/agerabus/event/RemoteTeacher.java b/app/src/main/java/xyz/zpayh/agerabus/event/RemoteTeacher.java index b4831a8..45e3a3a 100644 --- a/app/src/main/java/xyz/zpayh/agerabus/event/RemoteTeacher.java +++ b/app/src/main/java/xyz/zpayh/agerabus/event/RemoteTeacher.java @@ -21,16 +21,16 @@ public class RemoteTeacher implements Parcelable { private String mName; public RemoteTeacher(Date birthDay, String name) { - mBirthDay = birthDay; + mBirthDay = new Date(birthDay.getTime()); mName = name; } public Date getBirthDay() { - return mBirthDay; + return new Date(mBirthDay.getTime()); } public void setBirthDay(Date birthDay) { - mBirthDay = birthDay; + mBirthDay = new Date(birthDay.getTime()); } public String getName() { diff --git a/app/src/main/java/xyz/zpayh/agerabus/event/RemoteUser.java b/app/src/main/java/xyz/zpayh/agerabus/event/RemoteUser.java index ec5c233..189f3fa 100644 --- a/app/src/main/java/xyz/zpayh/agerabus/event/RemoteUser.java +++ b/app/src/main/java/xyz/zpayh/agerabus/event/RemoteUser.java @@ -21,6 +21,6 @@ public class RemoteUser implements Serializable{ public RemoteUser(String name,Date date) { mName = name; - mDate = date; + mDate = new Date(date.getTime()); } } diff --git a/build.gradle b/build.gradle index f890b82..54175ab 100644 --- a/build.gradle +++ b/build.gradle @@ -5,9 +5,8 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:2.2.2' - - classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' + classpath 'com.android.tools.build:gradle:2.3.0' + classpath 'com.novoda:bintray-release:0.4.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } @@ -17,6 +16,9 @@ allprojects { repositories { jcenter() } + tasks.withType(Javadoc) { + options.addStringOption('encoding', 'UTF-8') + } } task clean(type: Delete) { diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 04e285f..6d9ad89 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Mon Dec 28 10:00:20 PST 2015 +#Sun Mar 12 02:05:22 CST 2017 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip diff --git a/library/build.gradle b/library/build.gradle index 1862cfa..7f2ec27 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -1,11 +1,8 @@ apply plugin: 'com.android.library' -apply plugin: 'com.github.dcendents.android-maven' - -group='com.github.EvilBT' - +apply plugin: 'com.novoda.bintray-release' android { compileSdkVersion 25 - buildToolsVersion '25.0.1' + buildToolsVersion '25.0.2' defaultConfig { minSdkVersion 9 @@ -29,7 +26,17 @@ dependencies { androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) - compile 'com.android.support:appcompat-v7:25.0.1' + compile 'com.android.support:appcompat-v7:25.2.0' testCompile 'junit:junit:4.12' - provided 'com.google.android.agera:agera:1.2.0' + provided 'com.google.android.agera:agera:1.3.0' +} + + +publish { + userOrg = 'sherlock' //bintray注册的用户名 + groupId = 'xyz.zpayh' //compile引用时的第1部分groupId + artifactId = 'agerabus' //compile引用时的第2部分项目名 + publishVersion = '1.0.4' //compile引用时的第3部分版本号 + desc = 'It is an Android event bus based on Google Agera.' + website = 'https://github.com/EvilBT/AgeraBus' } diff --git a/library/src/main/java/xyz/zpayh/bus/AgeraBusClient.java b/library/src/main/java/xyz/zpayh/bus/AgeraBusClient.java index 2fcef8e..9736557 100644 --- a/library/src/main/java/xyz/zpayh/bus/AgeraBusClient.java +++ b/library/src/main/java/xyz/zpayh/bus/AgeraBusClient.java @@ -91,6 +91,8 @@ private void dispatch(@NonNull Message event){ mBus.postRemote(parcelableObj); } break; + default: + break; } } @@ -161,6 +163,8 @@ public void handleMessage(Message msg) { case MessageState.MSG_FROM_PARCELABLE_EVENT: client.dispatch(msg); break; + default: + break; } } } diff --git a/library/src/main/java/xyz/zpayh/bus/BusReservoir.java b/library/src/main/java/xyz/zpayh/bus/BusReservoir.java index e96d0d2..c9417ea 100644 --- a/library/src/main/java/xyz/zpayh/bus/BusReservoir.java +++ b/library/src/main/java/xyz/zpayh/bus/BusReservoir.java @@ -183,6 +183,9 @@ public void run() { } }); break; + + default: + break; } } diff --git a/library/src/main/java/xyz/zpayh/bus/ipc/AgeraBusService.java b/library/src/main/java/xyz/zpayh/bus/ipc/AgeraBusService.java index 5d93398..5bf6f97 100644 --- a/library/src/main/java/xyz/zpayh/bus/ipc/AgeraBusService.java +++ b/library/src/main/java/xyz/zpayh/bus/ipc/AgeraBusService.java @@ -84,6 +84,8 @@ public void handleMessage(Message msg) { service.dispatch(msg); } break; + default: + break; } } }