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
export MAVEN_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005" |
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
git branch --merged | egrep -v "(^\*|master|dev)" | xargs git branch -d && | |
git remote prune origin && | |
git gc |
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
#!/bin/bash | |
countLines(){ | |
totalCount=0; | |
for file in `find . -name *.java`; do | |
numLines=`cat $file | sed -r ':a; s%(.*)/\*.*\*/%\1%; ta; /\/\*/ !b; N; ba' | sed '/^\s*$/d' | sed '/^import/ d' | sed '/^package/ d' | wc -l`; | |
totalCount=$(( $totalCount + $numLines )); | |
done | |
echo $totalCount | |
} |
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
package org.androidtransfuse.adapter; | |
import org.androidtransfuse.adapter.classes.ASTClassFactory; | |
import org.junit.Test; | |
import java.lang.reflect.ParameterizedType; | |
import java.lang.reflect.Type; | |
import java.lang.reflect.TypeVariable; | |
import java.util.HashMap; | |
import java.util.Map; |
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
// Referencing the given R class kicks off the annotaion processor to generate an RBridge: | |
@Bridge(R.class) | |
// Input R: | |
public final class R { | |
public static final class layout { | |
public static int example_layout=0x7f030000; | |
} | |
} |
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
package test; | |
import rx.Observable; | |
import rx.Subscriber; | |
import rx.Subscription; | |
import rx.functions.Action1; | |
import rx.functions.Func0; | |
import rx.subjects.BehaviorSubject; | |
import rx.subjects.PublishSubject; |
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
john@john-desktop:~/dev/transfuse-project/examples/gradle$ ./gradlew clean assembleDebug | |
Parallel execution is an incubating feature. | |
Incremental java compilation is an incubating feature. | |
extractDebugAnnotations is incompatible with java 8 sources and has been disabled. | |
extractReleaseAnnotations is incompatible with java 8 sources and has been disabled. | |
:testlibrary:clean | |
:GradleTransfuse:clean | |
:GradleTransfuse:preBuild UP-TO-DATE | |
:GradleTransfuse:preDebugBuild UP-TO-DATE | |
:GradleTransfuse:checkDebugManifest |
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
@Factory | |
public insterface ZumperApiUtilFactory { | |
ZumperApiUtil get(); | |
} | |
//usage: | |
ZumperApiUtil util = Factories.get(ZumperApiUtilFactory.class).get(); |
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
public class RXTest { | |
public static void main(String[] args){ | |
ExecutorService oneExecutor = Executors.newSingleThreadExecutor(); | |
ExecutorService twoExecutor = Executors.newSingleThreadExecutor(); | |
ExecutorService threeExecutor = Executors.newSingleThreadExecutor(); | |
Scheduler one = Schedulers.from(oneExecutor); | |
Scheduler two = Schedulers.from(twoExecutor); |
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
public class AnnotationProcessorOutputAssertion { | |
public @interface Target {} | |
public interface TestTarget { | |
String get(); | |
} | |
@Test | |
public void testCompileAnnotationProcessorOutput() throws InstantiationException, IllegalAccessException, ClassNotFoundException, IOException { |