-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
tangxiaolv
committed
May 26, 2017
1 parent
4503b1f
commit 936ffd1
Showing
6 changed files
with
48 additions
and
90 deletions.
There are no files selected for viewing
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
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
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,39 @@ | ||
import org.aspectj.bridge.IMessage | ||
import org.aspectj.bridge.MessageHandler | ||
import org.aspectj.tools.ajc.Main | ||
|
||
android.libraryVariants.all { variant -> | ||
JavaCompile javaCompile = variant.javaCompile | ||
javaCompile.doLast { | ||
String[] args = [ | ||
"-showWeaveInfo", | ||
"-1.7", | ||
"-inpath", javaCompile.destinationDir.toString(), | ||
"-aspectpath", javaCompile.classpath.asPath, | ||
"-d", javaCompile.destinationDir.toString(), | ||
"-classpath", javaCompile.classpath.asPath, | ||
"-bootclasspath", android.bootClasspath.join(File.pathSeparator) | ||
] | ||
|
||
MessageHandler handler = new MessageHandler(true); | ||
new Main().run(args, handler) | ||
|
||
def log = project.logger | ||
for (IMessage message : handler.getMessages(null, true)) { | ||
switch (message.getKind()) { | ||
case IMessage.ABORT: | ||
case IMessage.ERROR: | ||
case IMessage.FAIL: | ||
log.error message.message, message.thrown | ||
break; | ||
case IMessage.WARNING: | ||
case IMessage.INFO: | ||
log.info message.message, message.thrown | ||
break; | ||
case IMessage.DEBUG: | ||
log.debug message.message, message.thrown | ||
break; | ||
} | ||
} | ||
} | ||
} |
3 changes: 1 addition & 2 deletions
3
surgeon-core/src/main/java/com/surgeon/weaving/core/interfaces/Continue.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,8 +1,7 @@ | ||
package com.surgeon.weaving.core.interfaces; | ||
|
||
/** | ||
* If {@link com.surgeon.weaving.core.MasterFinder#findAndInvoke(String, String, String, Object, | ||
* Object[])} return Continue.class,Then continue to call original method. | ||
* If MasterFinder#findAndInvoke return Continue.class,Then continue to call original method. | ||
*/ | ||
public interface Continue { | ||
} |