Skip to content

Commit

Permalink
将库上传到jcenter上,方便用户使用
Browse files Browse the repository at this point in the history
  • Loading branch information
EvilBT committed Mar 12, 2017
1 parent 6fa4a66 commit 0b01e71
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 20 deletions.
8 changes: 4 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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')
}
2 changes: 2 additions & 0 deletions app/src/main/java/xyz/zpayh/agerabus/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ public void onClick(View view) {
case R.id.bt_remote:{
startActivity(new Intent(this,RemoteEventActivity.class));
}break;
default:
break;
}
}
}
6 changes: 3 additions & 3 deletions app/src/main/java/xyz/zpayh/agerabus/event/RemoteTeacher.java
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/xyz/zpayh/agerabus/event/RemoteUser.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ public class RemoteUser implements Serializable{

public RemoteUser(String name,Date date) {
mName = name;
mDate = date;
mDate = new Date(date.getTime());
}
}
8 changes: 5 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -17,6 +16,9 @@ allprojects {
repositories {
jcenter()
}
tasks.withType(Javadoc) {
options.addStringOption('encoding', 'UTF-8')
}
}

task clean(type: Delete) {
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
21 changes: 14 additions & 7 deletions library/build.gradle
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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'
}
4 changes: 4 additions & 0 deletions library/src/main/java/xyz/zpayh/bus/AgeraBusClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ private void dispatch(@NonNull Message event){
mBus.postRemote(parcelableObj);
}
break;
default:
break;
}

}
Expand Down Expand Up @@ -161,6 +163,8 @@ public void handleMessage(Message msg) {
case MessageState.MSG_FROM_PARCELABLE_EVENT:
client.dispatch(msg);
break;
default:
break;
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions library/src/main/java/xyz/zpayh/bus/BusReservoir.java
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,9 @@ public void run() {
}
});
break;

default:
break;
}
}

Expand Down
2 changes: 2 additions & 0 deletions library/src/main/java/xyz/zpayh/bus/ipc/AgeraBusService.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ public void handleMessage(Message msg) {
service.dispatch(msg);
}
break;
default:
break;
}
}
}
Expand Down

0 comments on commit 0b01e71

Please sign in to comment.