提交 0fac351f 编写于 作者: B Blankj

see 05/31 log

上级 ddc432f1
......@@ -84,9 +84,7 @@ class BusTransform extends Transform {
)
FileUtils.copyFile(jar, dest)
if (jarName.startsWith("com.blankj:utilcode:")
|| jarName.startsWith("com.blankj:utilcodex:")
|| jarName.contains("utilcode-lib")) {
if (jarName.contains("utilcode")) {
busScan.busJar = dest
LogUtils.l("bus jar: $jarName [$dest]")
return
......
......@@ -9,8 +9,6 @@ import com.google.common.base.Preconditions
import org.apache.commons.io.FileUtils
import org.gradle.api.Project
import java.util.function.Predicate
class BusTransformAsm extends Transform {
Project mProject;
......@@ -36,7 +34,7 @@ class BusTransformAsm extends Transform {
@Override
boolean isIncremental() {
return true
return false
}
@Override
......@@ -116,9 +114,7 @@ class BusTransformAsm extends Transform {
)
FileUtils.copyFile(jar, dest)
if (jarName.startsWith("com.blankj:utilcode:")
|| jarName.startsWith("com.blankj:utilcodex:")
|| jarName.contains("utilcode-lib")) {
if (jarName.contains("utilcode")) {
busScan.busJar = dest
LogUtils.l("bus jar: $jarName [$dest]")
return
......
import java.text.SimpleDateFormat
apply from: "${rootDir.path}/gradle/util/utils.gradle"
gradle.ext {
......
......@@ -51,20 +51,20 @@ public final class BusUtils {
private static final Map<String, Set<Bus>> BUSES_MAP = new HashMap<>();
private static final Set<Sticky> STICKIES = new HashSet<>();
private static Object injectShell(final String name, final Object[] objects) {
return NULL;
}
public static <T> T postStatic(final String name, final Object... objects) {
if (name == null || name.length() == 0) return null;
Object o = injectShell(name, objects);
if (NULL.equals(o)) {
Log.e("BusUtils", "static bus of <" + name + "> didn\'t exist.");
com.blankj.utilcode.util.LogUtils.e("BusUtils", "static bus of <" + name + "> didn\'t exist.");
return null;
}
return (T) o;
}
private static Object injectShell(final String name, final Object[] objects) {
return NULL;
}
public static void register(final Object subscriber) {
if (subscriber == null) return;
......
......@@ -39,7 +39,7 @@ public class BaseTest {
@Test
public void test() throws Exception {
ThreadUtils.executeBySingleAtFixRate(new ThreadUtils.SimpleTask<Void>() {
ThreadUtils.Task<Void> task = new ThreadUtils.Task<Void>() {
@Override
public Void doInBackground() throws Throwable {
System.out.println("haha");
......@@ -50,7 +50,18 @@ public class BaseTest {
public void onSuccess(Void result) {
System.out.println("onSuccess");
}
}, 1, TimeUnit.SECONDS);
@Override
public void onCancel() {
System.out.println("onCancel");
}
@Override
public void onFail(Throwable t) {
System.out.println(t.toString());
}
};
ThreadUtils.executeBySingleAtFixRate(task, 1, 1, TimeUnit.SECONDS);
final CountDownLatch countDownLatch = new CountDownLatch(1);
......@@ -85,9 +96,8 @@ public class BaseTest {
// ThreadUtils.executeBySingle(task);
//
//// }
// Thread.sleep(100);
// task.cancel();
Thread.sleep(1000000);
Thread.sleep(100);
task.cancel();
countDownLatch.countDown();
countDownLatch.await();
......
......@@ -93,6 +93,8 @@ public class GsonUtilsTest extends BaseTest {
static class Person {
String name;
int gender;
String address;
Person(String name) {
this.name = name;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册