Skip to content

TP 2.0#320

Merged
dlemures merged 1 commit intomasterfrom
dlemures/removing-registries
Feb 1, 2019
Merged

TP 2.0#320
dlemures merged 1 commit intomasterfrom
dlemures/removing-registries

Conversation

@dlemures
Copy link
Copy Markdown
Collaborator

@dlemures dlemures 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 Add Toothpick.hasScope method for check scope in scopes tree. #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 : Help popular annotation processors adopt incremental processing gradle/gradle#5277

@dlemures dlemures changed the title TP 1.2 TP 2.0 Jan 30, 2019
@coveralls
Copy link
Copy Markdown

coveralls 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.powermock
testImplementation deps.hamcrest
testImplementation files(Jvm.current().getToolsJar())
testImplementation 'org.powermock:powermock-module-junit4-rule-agent:1.6.4'
Copy link
Copy Markdown
Collaborator Author

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

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


test {
jvmArgs '-noverify'
}
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we keep this?

Copy link
Copy Markdown
Owner

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
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dont need this anymore?

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no

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' No newline at end of file
Copy link
Copy Markdown
Owner

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());
}
} No newline at end of file
Copy link
Copy Markdown
Owner

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;
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not needed

POM_ARTIFACT_ID=smoothie-support
POM_NAME=smoothie support
POM_DESCRIPTION='Toothpick package providing Android providers for the support library'
POM_PACKAGING='aar' No newline at end of file
Copy link
Copy Markdown
Owner

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 No newline at end of file
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.

options.compilerArgs = ['-Atoothpick_annotations=toothpick.data.CustomScope',]
}

apply from: rootProject.file('gradle/gradle-mvn-push.gradle') No newline at end of file
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.

//THEN
assertThat(memberInjector, nullValue());
}
} No newline at end of file
Copy link
Copy Markdown
Owner

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");
}
} No newline at end of file
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.

bind(Computer.class).toInstance(mockComputer);
}
}
} No newline at end of file
Copy link
Copy Markdown
Owner

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' No newline at end of file
Copy link
Copy Markdown
Owner

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' No newline at end of file
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.

@stephanenicolas
Copy link
Copy Markdown
Owner

really you rock @dlemures

@dlemures dlemures force-pushed the dlemures/removing-registries branch from 868c36d to 975cd20 Compare February 1, 2019 22:21
@stephanenicolas stephanenicolas force-pushed the dlemures/removing-registries branch from d353ee7 to 975cd20 Compare February 1, 2019 22:28
@dlemures
Copy link
Copy Markdown
Collaborator Author

dlemures commented Feb 1, 2019

You are the one that rocks little penguin 🐥

@dlemures dlemures merged commit dbbe1d2 into master Feb 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants