-
Notifications
You must be signed in to change notification settings - Fork 88
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
create henson plugin #185
create henson plugin #185
Conversation
…rs, variants + add custom dependencies to each configuration. The navigation api is compiled correctly, jared correctly, it contains the model, the intent builder and henson (for now). The main source set itself dependsn on the api. All artifacts related to dart and henson are handled automatically
310df87
to
8123766
Compare
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.
🛳 it, not very familiar with groovy though...
…generate a henson navigator class. Some details need to be enhanced like the generated file location, the variant. But it works. Do we need a third source set to generate into ?
…better than before
…uilders the principle woks. I can detect the navigation api dependencies and …
…/dart into sni/create-henson-plugin
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.
I see that most of the files do not end with a new line. Can you please add a new line.
Everything else looks good.
//it will be used later by the plugin to add the proper version of | ||
//dependencies to the project that uses the plugin | ||
def prop = new Properties() | ||
def propFile = new File("${project.rootDir}/henson-plugin/src/main/resources/build.properties") |
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.
Does the D&H version go here? If so, would be nice to use it for the composite builds needed for D&H sample.
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, if there is no better way to do it.
|
||
//the main source set | ||
def suffix = "" | ||
def pathSuffix = "main/" |
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.
Can some of this be constants?
#164 : this is the first PR to create the henson-plugin: it should work. There is a functional test, but really not so precise yet.
The plugin allows to add a new source set that will contain the models for dart&henson 3 navigation.
The navigation source set is located in 'src/navigation/java/'.
Each build type, flavor and variant can use a specific navigation source set. The source set should contain models only and will be processed by the dart & henson APs. It will expose a
navigationApi
configuration for a module using the plugin. This artifact will be a jar containing intent builders and the henson class, the extra binder, and the model class itself.The plugin also adds automatically the navigation jar to the dependencies of the main source set.
See https://github.groupondev.com/snicolas/Henson_structure for an example
The plugin also manages the dependencies to dart, using the right annotation processors on the new navigation source set. The only things users have to do are :
src/navigation/java
(or any variant aware equivalent such assrc/navigation/red/java
orsrc/navigation/debug/java
orsrc/navigation/red/debug/java
.navigationApi
,redNavigationApi
,debugNavigationApi
,redDebugNavigationApi
. All android scopes are supported: Api, Implementation, compileOnly and annotationProcessor.The plugin is roughly unit tested for now.