-
Notifications
You must be signed in to change notification settings - Fork 114
TP 2.0 #320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TP 2.0 #320
Conversation
toothpick-runtime/build.gradle
Outdated
testImplementation deps.easymock | ||
testImplementation deps.powermock | ||
testImplementation deps.hamcrest | ||
testImplementation files(Jvm.current().getToolsJar()) | ||
testImplementation 'org.powermock:powermock-module-junit4-rule-agent:1.6.4' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should go inside deps
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
testAnnotationProcessor project(':toothpick-compiler') | ||
} | ||
|
||
test { | ||
jvmArgs '-noverify' | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we keep this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, powermock breaks the java 7 byte code frames otherwise.
jacocoTestReport { | ||
reports { | ||
xml.enabled = false | ||
html.enabled = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dont need this anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no
smoothie-androidx/gradle.properties
Outdated
POM_ARTIFACT_ID=smoothie-androidx | ||
POM_NAME=smoothie android X | ||
POM_DESCRIPTION='Toothpick package providing Android providers for the android X library' | ||
POM_PACKAGING='aar' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
assertThat(loaderManager, notNullValue()); | ||
assertThat(layoutInflater, notNullValue()); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
import toothpick.registries.FactoryRegistryLocator; | ||
import toothpick.registries.MemberInjectorRegistryLocator; | ||
import toothpick.locators.FactoryLocator; | ||
import toothpick.locators.MemberInjectorLocator; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not needed
smoothie-support/gradle.properties
Outdated
POM_ARTIFACT_ID=smoothie-support | ||
POM_NAME=smoothie support | ||
POM_DESCRIPTION='Toothpick package providing Android providers for the support library' | ||
POM_PACKAGING='aar' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
@@ -0,0 +1,2 @@ | |||
toothpick.compiler.factory.FactoryProcessor,isolating | |||
toothpick.compiler.memberinjector.MemberInjectorProcessor,isolating |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
toothpick-runtime/build.gradle
Outdated
options.annotationProcessorPath = configurations.testAnnotationProcessor | ||
options.compilerArgs = ['-Atoothpick_registry_package_name=toothpick.test', | ||
'-Atoothpick_annotations=toothpick.data.CustomScope',] | ||
options.compilerArgs = ['-Atoothpick_annotations=toothpick.data.CustomScope',] | ||
} | ||
|
||
apply from: rootProject.file('gradle/gradle-mvn-push.gradle') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
//THEN | ||
assertThat(memberInjector, nullValue()); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
//THEN | ||
fail("Should throw an exception"); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
TestModule() { | ||
bind(Computer.class).toInstance(mockComputer); | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
POM_ARTIFACT_ID=toothpick-testing-junit4 | ||
POM_NAME=Toothpick Testing Junit 4 | ||
POM_DESCRIPTION='Junit 4 Testing support for Toothpick' | ||
POM_PACKAGING='jar' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
POM_ARTIFACT_ID=toothpick-testing-junit5 | ||
POM_NAME=Toothpick Testing Junit 5 | ||
POM_DESCRIPTION='Junit 5 Testing support for Toothpick' | ||
POM_PACKAGING='jar' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
really you rock @dlemures |
868c36d
to
975cd20
Compare
d353ee7
to
975cd20
Compare
975cd20
to
056229f
Compare
You are the one that rocks little penguin 🐥 |
we reworked on registries to enable obfuscation. Reflection is now used to load the factories and member injectors,
this is normal (and all other annotation processor based libs do that too) and there is no impact on performance.
__
instead of$$
to make TP more compliant with some tools.smoothie-support and smoothie-androidx that respectively support the old legacy support library and the new android X libs).
make the sample work with incremental compilation (there is a bug in my fork of incap that I can repro with smoothie-sample !). This won't be fixed now.