-
Notifications
You must be signed in to change notification settings - Fork 85
Provide a way to attach a mount of library as module deps #160
base: master
Are you sure you want to change the base?
Conversation
With this change, user can add fake jar files as module dpes. It will create the dummy jar file in module_root/libs/ directory and update the deps in build file. It allows us to create a project with huge amount of jar libs deps which is useful when we dubug freeze due to too many lib deps. User can name the module that needs the dummy jar libaries and how many jar libaries need to be created by using "dummyLocalJarLibsDependency": [{"moduleName": "module0", "count": "1"}]
I have update cla but not sure how can I ask for a rescan? |
Thanks Liz, Few thoughts on my end
|
More thoughts:
com.google.androidstudiopoet.generators.ModuleBuildBazelGeneratorTest > generator applies dependencies from the blueprint FAILED com.google.androidstudiopoet.generators.android_modules.AndroidModuleBuildBazelGeneratorTest > generator sets correct target name from the blueprint FAILED com.google.androidstudiopoet.generators.android_modules.AndroidModuleBuildBazelGeneratorTest > generator applies libraries from the blueprint FAILED com.google.androidstudiopoet.generators.android_modules.AndroidModuleBuildBazelGeneratorTest > generator sets correct android_binary rule class for Application module FAILED com.google.androidstudiopoet.converters.ConfigPojoToAndroidModuleConfigConverterTest > convert passes correct values to result AndroidModuleConfig FAILED com.google.androidstudiopoet.converters.ConfigPojoToAndroidModuleConfigConverterTest > convert result AndroidModuleConfig that has launch activity when index == 0 FAILED |
@lizyxr Thank you for your PR, I think this change is useful. I'm not sure if "Dummy" prefix is actually needed. From the stand point of the Android Studio Poet, this is a legitimate jar lib dependency, since it is not responsibility of Android Studio Poet to generate the jar. If my understanding is correct, then I would suggest to remove the "dummy" prefix from everywhere and just call it "localJarLibsDependency". I agree with Boris, it would be useful to have this functionality documented. |
Add description for localJarLibsDependency
fix typo
Thanks Boris & Nikita for reviewing! I have fixed the test, remove the prefix and add some description in README.md. Do you think we need another .md for detailed function description? |
@@ -56,6 +57,10 @@ will crawl the folder recursively and execute each config in turn. | |||
* Specify `viewBinding` for View Binding. | |||
* Specify `composeConfig` for Compose. | |||
* It has a property `actionCount` to indicate the number of clickable actions. | |||
* Sepcify `localJarLibsDependency` for local jar depencencies. |
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.
Specify
* Sepcify `localJarLibsDependency` for local jar depencencies. | ||
* It's a list of items that indicate creating local jar depencencies for specific module. For each item, | ||
* It has a property `moduleName` to indicate the module name that depencies are attached to. | ||
* It has a properoty `count` to indicate the number of depencies are attached. |
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 we add a link to a sample config with Jars
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.
dependencies
@lizyxr - thanks a lot Added some comments =========================================== What would be our thoughts on:
|
* Sepcify `localJarLibsDependency` for local jar depencencies. | ||
* It's a list of items that indicate creating local jar depencencies for specific module. For each item, | ||
* It has a property `moduleName` to indicate the module name that depencies are attached to. | ||
* It has a properoty `count` to indicate the number of depencies are attached. |
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.
A typo "property" instead of "properoty"
I also left a small comment about a typo. The rest - LGTM. |
Ok, once the review comments are fixed, I will merge the change. In addition will open a bug(features request) for jar generation. |
I need to create a fake gradle project with a huge amount of jar libs as deps. So I create this change. I think this would be useful since it's common to encounter freeze due to a project with a huge amount of libs. And we need to create such fake project for debugging.
user can 1 dummy jar lib to module0 by using "dummyLocalJarLibsDependency": [{"moduleName": "module0", "count": "1"}]. It will make sure the dummy jar file is generated locally i.e. you can sync project without issue.