Skip to content
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

Merged
merged 1 commit into from Feb 1, 2019

Conversation

@dlemures
Copy link
Collaborator

commented Jan 30, 2019

  • support incremental annotation processing. All processors are now incremental and isolating.
  • remove all registries, TP 2.x doesn't use registries any more. They were actually slower than not using them after
    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.
  • support multiple rounds of annotation processing.
  • generated classes now use __ instead of $$ to make TP more compliant with some tools.
  • removed the generate ContextSingleton annotation
  • smoothie now binds the ClipClipboardManager service. Thx to Cody Henthrone for this. Sorry we were late merging this !
  • smoothie now contains non support and non android x bindings. We have introduced 2 new artifacts:
    smoothie-support and smoothie-androidx that respectively support the old legacy support library and the new android X libs).
  • toothpick-testing now only contains core testing classes. New artifacts have been introduced to support junit 4 nd junit 5 (resp. : toothpick-testing-junit4, toothpick-testing-junit5)
  • Update CI & make it green
  • Wiki update
  • version number update
  • test in MGA (snapshot + proguard + artifacts: junit-4, androidx, template new modules)
  • go through PR list and issue list
  • deal with the PR / feature request #318
  • README update
  • add a consumer proguard file: https://github.com/JakeWharton/butterknife/search?q=proguard-rules.txt&unscoped_q=proguard-rules.txt
  • update other 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.
  • make the sample work with junit 5
  • make the sample work with android x
  • use composite builds for samples
  • why do we need to use default configuration ? Is compositve build solving that ?
  • declare the project as incremental on gradle list : gradle/gradle#5277
@dlemures dlemures changed the title TP 1.2 TP 2.0 Jan 30, 2019
@coveralls

This comment has been minimized.

Copy link

commented Jan 31, 2019

Coverage Status

Coverage increased (+0.3%) to 95.842% when pulling 056229f on dlemures/removing-registries into 2483d2d on master.

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'

This comment has been minimized.

Copy link
@dlemures

dlemures Feb 1, 2019

Author Collaborator

this should go inside deps

This comment has been minimized.

Copy link
@dlemures

dlemures Feb 1, 2019

Author Collaborator

done

testAnnotationProcessor project(':toothpick-compiler')
}

test {
jvmArgs '-noverify'
}

This comment has been minimized.

Copy link
@dlemures

dlemures Feb 1, 2019

Author Collaborator

should we keep this?

This comment has been minimized.

Copy link
@stephanenicolas

stephanenicolas Feb 1, 2019

Owner

yes, powermock breaks the java 7 byte code frames otherwise.

jacocoTestReport {
reports {
xml.enabled = false
html.enabled = false

This comment has been minimized.

Copy link
@dlemures

dlemures Feb 1, 2019

Author Collaborator

dont need this anymore?

This comment has been minimized.

Copy link
@stephanenicolas
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'

This comment has been minimized.

Copy link
@stephanenicolas
assertThat(loaderManager, notNullValue());
assertThat(layoutInflater, notNullValue());
}
}

This comment has been minimized.

Copy link
@stephanenicolas
import toothpick.registries.FactoryRegistryLocator;
import toothpick.registries.MemberInjectorRegistryLocator;
import toothpick.locators.FactoryLocator;
import toothpick.locators.MemberInjectorLocator;

This comment has been minimized.

Copy link
@stephanenicolas
POM_ARTIFACT_ID=smoothie-support
POM_NAME=smoothie support
POM_DESCRIPTION='Toothpick package providing Android providers for the support library'
POM_PACKAGING='aar'

This comment has been minimized.

Copy link
@stephanenicolas
@@ -0,0 +1,2 @@
toothpick.compiler.factory.FactoryProcessor,isolating
toothpick.compiler.memberinjector.MemberInjectorProcessor,isolating

This comment has been minimized.

Copy link
@stephanenicolas
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')

This comment has been minimized.

Copy link
@stephanenicolas
//THEN
assertThat(memberInjector, nullValue());
}
}

This comment has been minimized.

Copy link
@stephanenicolas
//THEN
fail("Should throw an exception");
}
}

This comment has been minimized.

Copy link
@stephanenicolas
TestModule() {
bind(Computer.class).toInstance(mockComputer);
}
}
}

This comment has been minimized.

Copy link
@stephanenicolas
POM_ARTIFACT_ID=toothpick-testing-junit4
POM_NAME=Toothpick Testing Junit 4
POM_DESCRIPTION='Junit 4 Testing support for Toothpick'
POM_PACKAGING='jar'

This comment has been minimized.

Copy link
@stephanenicolas
POM_ARTIFACT_ID=toothpick-testing-junit5
POM_NAME=Toothpick Testing Junit 5
POM_DESCRIPTION='Junit 5 Testing support for Toothpick'
POM_PACKAGING='jar'

This comment has been minimized.

Copy link
@stephanenicolas
@stephanenicolas

This comment has been minimized.

Copy link
Owner

commented Feb 1, 2019

really you rock @dlemures

@dlemures dlemures force-pushed the dlemures/removing-registries branch from 868c36d to 975cd20 Feb 1, 2019
@stephanenicolas stephanenicolas force-pushed the dlemures/removing-registries branch from d353ee7 to 975cd20 Feb 1, 2019
@dlemures

This comment has been minimized.

Copy link
Collaborator Author

commented Feb 1, 2019

You are the one that rocks little penguin 🐥

@dlemures dlemures merged commit dbbe1d2 into master Feb 1, 2019
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.