Subversion Repositories DevTools

Rev

Rev 5444 | Rev 6444 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5444 Rev 6351
Line 76... Line 76...
76
#
76
#
77
my $opt_verbose = $ENV{GBE_VERBOSE};
77
my $opt_verbose = $ENV{GBE_VERBOSE};
78
my $opt_buildFile;
78
my $opt_buildFile;
79
my $opt_interface;
79
my $opt_interface;
80
my $opt_gbetype = 'P';
80
my $opt_gbetype = 'P';
-
 
81
my @opt_gbetypes;
81
my $opt_clean;
82
my $opt_clean;
82
my $opt_pkgname;
83
my $opt_pkgname;
83
my $opt_pkgversion;
84
my $opt_pkgversion;
84
my $opt_platform;
85
my $opt_platform;
85
my $opt_populate;
86
my $opt_populate;
-
 
87
my $opt_populateDebug;
-
 
88
my $opt_populateProd;
86
my $opt_autotest;
89
my $opt_autotest;
87
my $opt_hastests;
90
my $opt_hastests;
88
my @opt_jlibs;                  # List of Jats Libraries
91
my @opt_jlibs;                  # List of Jats Libraries
89
my @opt_elibs;                  # List of 3rd party libraries
92
my @opt_elibs;                  # List of 3rd party libraries
90
my @opt_jars;                   # List of JARs
93
my @opt_jars;                   # List of JARs
Line 132... Line 135...
132
local $SIG{__DIE__} = sub { ReportError('AndroidBuilder.' . "@_"); };
135
local $SIG{__DIE__} = sub { ReportError('AndroidBuilder.' . "@_"); };
133
my $result = GetOptions (
136
my $result = GetOptions (
134
                "verbose:+"     => \$opt_verbose,       # flag
137
                "verbose:+"     => \$opt_verbose,       # flag
135
                "f=s"           => \$opt_buildFile,     # string
138
                "f=s"           => \$opt_buildFile,     # string
136
                "i=s"           => \$opt_interface,     # Interface directory
139
                "i=s"           => \$opt_interface,     # Interface directory
137
                "t=s"           => \$opt_gbetype,       # string
140
                "t=s"           => \@opt_gbetypes,      # string
138
                "pn=s"          => \$opt_pkgname,       # string
141
                "pn=s"          => \$opt_pkgname,       # string
139
                "pv=s"          => \$opt_pkgversion,    # string
142
                "pv=s"          => \$opt_pkgversion,    # string
140
                "pf=s"          => \$opt_platform,      # string
143
                "pf=s"          => \$opt_platform,      # string
141
                "clean"         => \$opt_clean,         # flag
144
                "clean"         => \$opt_clean,         # flag
142
                "populate"      => \$opt_populate,      # flag
145
                "populate"      => \$opt_populate,      # flag
Line 164... Line 167...
164
        push @opt_elibs, $1;
167
        push @opt_elibs, $1;
165
    } else {
168
    } else {
166
        ReportError("Invalid option: $arg");
169
        ReportError("Invalid option: $arg");
167
    }
170
    }
168
}
171
}
-
 
172
 
169
ErrorDoExit();
173
ErrorDoExit();
170
 
174
 
171
#
175
#
172
#   Sanity Test
176
#   Sanity Test
173
#
177
#
Line 187... Line 191...
187
ErrorDoExit();
191
ErrorDoExit();
188
 
192
 
189
#
193
#
190
#   Basic setup
194
#   Basic setup
191
#
195
#
-
 
196
#   Handle multiple opt_gbetypes for populate mode
-
 
197
#   If we are ony building for Prod, then only populate production artifacts 
-
 
198
#   If we are ony building for Debug, then only populate debug artifacts 
-
 
199
foreach ( @opt_gbetypes) {
-
 
200
    $opt_gbetype = $_;
-
 
201
    $opt_populateProd = 1 if ($opt_gbetype eq 'P');
-
 
202
    $opt_populateDebug = 1 if ($opt_gbetype eq 'D');
-
 
203
}
-
 
204
 
192
$androidBuildSuffix = ($opt_gbetype eq 'P') ? 'Release' : 'Debug';
205
$androidBuildSuffix = ($opt_gbetype eq 'P') ? 'Release' : 'Debug';
193
 
206
 
194
#
207
#
195
#   The user provides the root build.gradle file
208
#   The user provides the root build.gradle file
196
#   There MUST be a settings.gradle in the same directory
209
#   There MUST be a settings.gradle in the same directory
Line 574... Line 587...
574
    }
587
    }
575
 
588
 
576
    #   Shared libraries
589
    #   Shared libraries
577
    #   Create full names
590
    #   Create full names
578
    foreach my $item ( @opt_elibs) {
591
    foreach my $item ( @opt_elibs) {
579
        UniquePush \@libListDebug, 'lib' . $item . '.so';
592
        UniquePush (\@libListDebug, 'lib' . $item . '.so');
580
        UniquePush \@libListProd,  'lib' . $item . '.so';
593
        UniquePush (\@libListProd,  'lib' . $item . '.so');
581
    }
594
    }
582
    
595
    
583
    foreach my $item ( @opt_jlibs) {
596
    foreach my $item ( @opt_jlibs) {
584
        UniquePush \@libListDebug, 'lib' . $item . 'D.so';
597
        UniquePush (\@libListDebug, 'lib' . $item . 'D.so') if $opt_populateDebug;
585
        UniquePush \@libListProd , 'lib' . $item . 'P.so';
598
        UniquePush (\@libListProd , 'lib' . $item . 'P.so') if $opt_populateProd;
586
    }
599
    }
587
 
600
 
588
    #
601
    #
589
    #   Where does it go
602
    #   Where does it go
590
    #       JARs/AARs - ROOT/jatsLibs
603
    #       JARs/AARs - ROOT/jatsLibs