buildframework/helium/sf/java/imaker/src/com/nokia/helium/imaker/ant/types/Configuration.java
changeset 628 7c4a911dc066
parent 587 85df38eb4012
equal deleted inserted replaced
588:c7c26511138f 628:7c4a911dc066
    14 * Description: 
    14 * Description: 
    15 *
    15 *
    16 */
    16 */
    17  
    17  
    18 package com.nokia.helium.imaker.ant.types;
    18 package com.nokia.helium.imaker.ant.types;
    19 import org.apache.tools.ant.BuildException;
       
    20 import org.apache.tools.ant.DirectoryScanner;
       
    21 import org.apache.tools.ant.Project;
       
    22 import org.apache.tools.ant.types.DataType;
       
    23 import org.apache.tools.ant.types.PatternSet;
       
    24 
       
    25 import com.nokia.helium.imaker.IMaker;
       
    26 import com.nokia.helium.imaker.IMakerException;
       
    27 import com.nokia.helium.imaker.ant.Command;
       
    28 import com.nokia.helium.imaker.ant.IMakerCommandSet;
       
    29 
       
    30 import java.io.File;
    19 import java.io.File;
    31 import java.util.ArrayList;
    20 import java.util.ArrayList;
    32 import java.util.HashSet;
    21 import java.util.HashSet;
    33 import java.util.List;
    22 import java.util.List;
    34 import java.util.Set;
    23 import java.util.Set;
    35 import java.util.Vector;
    24 import java.util.Vector;
    36 import java.util.regex.Pattern;
    25 import java.util.regex.Pattern;
       
    26 
       
    27 import org.apache.tools.ant.BuildException;
       
    28 import org.apache.tools.ant.DirectoryScanner;
       
    29 import org.apache.tools.ant.Project;
       
    30 import org.apache.tools.ant.types.DataType;
       
    31 import org.apache.tools.ant.types.PatternSet;
       
    32 
       
    33 import com.nokia.helium.imaker.IMaker;
       
    34 import com.nokia.helium.imaker.IMakerException;
       
    35 import com.nokia.helium.imaker.ant.Command;
       
    36 import com.nokia.helium.imaker.ant.IMakerCommandSet;
    37 
    37 
    38 /**
    38 /**
    39  * The imakerconfiguration enables the build manager to configure his iMaker
    39  * The imakerconfiguration enables the build manager to configure his iMaker
    40  * builds based on introspection.
    40  * builds based on introspection.
    41  *
    41  *
    82  * imaker -f /epoc32/rom/config/platform/product/image_conf_product_ui.mk TYPE=subcon USE_FOTI=0 USE_FOTA=1 core
    82  * imaker -f /epoc32/rom/config/platform/product/image_conf_product_ui.mk TYPE=subcon USE_FOTI=0 USE_FOTA=1 core
    83  * imaker -f /epoc32/rom/config/platform/product/image_conf_product_ui.mk TYPE=rnd USE_FOTI=0 USE_FOTA=1 langpack_01
    83  * imaker -f /epoc32/rom/config/platform/product/image_conf_product_ui.mk TYPE=rnd USE_FOTI=0 USE_FOTA=1 langpack_01
    84  * imaker -f /epoc32/rom/config/platform/product/image_conf_product_ui.mk TYPE=subcon USE_FOTI=0 USE_FOTA=1 langpack_01
    84  * imaker -f /epoc32/rom/config/platform/product/image_conf_product_ui.mk TYPE=subcon USE_FOTI=0 USE_FOTA=1 langpack_01
    85  * </pre>
    85  * </pre>
    86  * 
    86  * 
       
    87  * Remember to update helium/sf/java/imaker/imaker.rst if you change this
       
    88  *
    87  * @ant.type name="imakerconfiguration" category="imaker"
    89  * @ant.type name="imakerconfiguration" category="imaker"
    88  */
    90  */
    89 public class Configuration extends DataType implements IMakerCommandSet {
    91 public class Configuration extends DataType implements IMakerCommandSet {
    90     
    92     
    91     private Vector<PatternSet> makefiles = new Vector<PatternSet>();
    93     private Vector<PatternSet> makefiles = new Vector<PatternSet>();
   322     protected Set<String> getConfigurations(List<String> configurations, IMaker imaker) {
   324     protected Set<String> getConfigurations(List<String> configurations, IMaker imaker) {
   323         Set<String> result = new HashSet<String>();
   325         Set<String> result = new HashSet<String>();
   324         if (makefiles.size() > 0) {
   326         if (makefiles.size() > 0) {
   325             Matcher matcher = getMakefileMatcher(imaker);
   327             Matcher matcher = getMakefileMatcher(imaker);
   326             for (String configuration : configurations) {
   328             for (String configuration : configurations) {
   327                 System.out.println("configuration: " + configuration);
       
   328                 if (matcher.match(configuration)) {
   329                 if (matcher.match(configuration)) {
   329                     result.add(configuration);
   330                     result.add(configuration);
   330                 }
   331                 }
   331             }
   332             }
   332         }
   333         }