Open gildegoma opened 10 years ago
I dont like the idea of lots of profiles. Maybe we can have something like a set of command that need to be executed for each component. Problem is that this gets complicated with more than one component or lots of runs will be repeats. Not sure what the best solution would be at this stage.
Yep, the "One Maven Profile for each Android SDK" approach is quite heavy and redundant. I suspected that you won't like/accept it, but preferred to ask for double check.
Shipping (and maintaining) a "translator" script similar to https://github.com/ruleant/chef-android-sdk/blob/41db526612921586bbfcc93dbcd78202febc8894/recipes/maven-rescue.rb#L35-L47 would be enough for my needs.
More proposals? (Note that I won't work on this before August-September and help is more than welcome!)
Problem to solve
Automatically deploy corresponding maven artifacts when installing (or updating) a component with
android update sdk
command. In this context, the current Maven profile names (e.g.4.4
,4.4W
,L
, etc.) are not easy to map.See also: https://github.com/gildegoma/chef-android-sdk/issues/14
Possible Approaches
Before starting to work on a pull request for that change request, I would like to check which approach is the better. Below two propositions... but maybe you have even an easier solution.
One Maven Profile for each Android SDK component
Example:
in main
pom.xml
:in all intermediate submodules (e.g.
add-ons/pom.xml
):This approach potentially means creating lots of static maven profiles. I don't know if such approach fits with your maintenance guidelines, hence the proposition of a second approach below...
A helper shell script that knows the "translation" rules
Similarly to this mapping,
maven-android-sdk-deployer
could ship a little (script) tool that translate the Android SDK identifiers to corresponding maven command.This approach should be more concise, as dynamic translation rules can be implemented. Maybe there is a way to include such kind of approach in a Maven-style workflow, but I did not take time to further investigate.
Example:
Components available in Android SDK 23
Some components like
sample-...
should not be considered, but I put here the complete list of identifiers to better illustrate the need for this trivial mapping.list obtained with
android list sdk --no-ui --all --extended | grep -E '^id:' | awk -F '"' '{$1=""; print $2}'