| Line 195... |
Line 195... |
| 195 |
ReportError ("Interface directory not found: $opt_interface") unless ( -d $opt_interface);
|
195 |
ReportError ("Interface directory not found: $opt_interface") unless ( -d $opt_interface);
|
| 196 |
|
196 |
|
| 197 |
ReportError ("Package Name not specified") unless ( defined $opt_pkgname);
|
197 |
ReportError ("Package Name not specified") unless ( defined $opt_pkgname);
|
| 198 |
ReportError ("Package Version not specified") unless ( defined $opt_pkgversion);
|
198 |
ReportError ("Package Version not specified") unless ( defined $opt_pkgversion);
|
| 199 |
|
199 |
|
| 200 |
EnvImport('GBE_HOSTMACH');
|
- |
|
| 201 |
ReportError ("AndroidStudioBuilder is only supported under win32","This machine is: ".$::GBE_HOSTMACH ) unless ( $::GBE_HOSTMACH eq 'win32' );
|
- |
|
| 202 |
ReportError ("Platform not found") unless ( defined $opt_platform );
|
200 |
ReportError ("Platform not found") unless ( defined $opt_platform );
|
| 203 |
|
201 |
|
| 204 |
ErrorDoExit();
|
202 |
ErrorDoExit();
|
| 205 |
|
203 |
|
| 206 |
#
|
204 |
#
|
| - |
|
205 |
# Now support Android builder under both Linux and Windows - for development
|
| - |
|
206 |
# In the build system we only support Android builder under Windows
|
| - |
|
207 |
# This is done for backward compatability
|
| - |
|
208 |
# Also to ensure reproducability in escrow
|
| - |
|
209 |
# Jats will prevent the use of ANDROID on a non-windows build machine
|
| - |
|
210 |
# Generate a reminder - only once and only during the 'build' invocation.
|
| - |
|
211 |
#
|
| - |
|
212 |
if ($opt_populate) {
|
| - |
|
213 |
EnvImport('GBE_HOSTMACH');
|
| - |
|
214 |
unless ( $::GBE_HOSTMACH eq 'win32' ) {
|
| - |
|
215 |
Message ("AndroidStudioBuilder is only supported under $::GBE_HOSTMACH for development only", "The build and escrow system will use a win32 machine" );
|
| - |
|
216 |
}
|
| - |
|
217 |
}
|
| - |
|
218 |
|
| - |
|
219 |
|
| - |
|
220 |
#
|
| 207 |
# Basic setup
|
221 |
# Basic setup
|
| 208 |
#
|
222 |
#
|
| 209 |
# Handle multiple opt_gbetypes for populate mode
|
223 |
# Handle multiple opt_gbetypes for populate mode
|
| 210 |
# If we are ony building for Prod, then only populate production artifacts
|
224 |
# If we are ony building for Prod, then only populate production artifacts
|
| 211 |
# If we are ony building for Debug, then only populate debug artifacts
|
225 |
# If we are ony building for Debug, then only populate debug artifacts
|
| Line 271... |
Line 285... |
| 271 |
|
285 |
|
| 272 |
#
|
286 |
#
|
| 273 |
# Setup the required version of Java for the tool
|
287 |
# Setup the required version of Java for the tool
|
| 274 |
# Force JAVA_OPTS to set Min/Max Heap
|
288 |
# Force JAVA_OPTS to set Min/Max Heap
|
| 275 |
# Use JAVA_OPTS because
|
289 |
# Use JAVA_OPTS because
|
| 276 |
# _JAVA_OPTIONS causes ssytem to emit a lot of warnings that _JAVA_OPTIONS is being used
|
290 |
# _JAVA_OPTIONS causes system to emit a lot of warnings that _JAVA_OPTIONS is being used
|
| 277 |
# Use of org.gradle.jvmargs in gradle.properties causes warnins about forking speed
|
291 |
# Use of org.gradle.jvmargs in gradle.properties causes warnins about forking speed
|
| 278 |
# Fixing the max size will provide consistent builds
|
292 |
# Fixing the max size will provide consistent builds
|
| 279 |
# Perhaps one day it will be configured
|
293 |
# Perhaps one day it will be configured
|
| 280 |
#
|
294 |
#
|
| 281 |
my $javaVersion = $gradleTool->{JAVA_VERSION};
|
295 |
my $javaVersion = $gradleTool->{JAVA_VERSION};
|
| Line 414... |
Line 428... |
| 414 |
push (@gradleArgs, '--offline');
|
428 |
push (@gradleArgs, '--offline');
|
| 415 |
push (@gradleArgs, '--no-daemon');
|
429 |
push (@gradleArgs, '--no-daemon');
|
| 416 |
# push (@gradleArgs, '--info');
|
430 |
# push (@gradleArgs, '--info');
|
| 417 |
# push (@gradleArgs, '--debug');
|
431 |
# push (@gradleArgs, '--debug');
|
| 418 |
# push (@gradleArgs, '--stacktrace');
|
432 |
# push (@gradleArgs, '--stacktrace');
|
| - |
|
433 |
push (@gradleArgs, '--warning-mode=none') unless ($opt_verbose);
|
| 419 |
push (@gradleArgs, '--info') if $opt_verbose;
|
434 |
push (@gradleArgs, '--info') if $opt_verbose;
|
| 420 |
push (@gradleArgs, '--debug') if ($opt_verbose > 2);
|
435 |
push (@gradleArgs, '--debug') if ($opt_verbose > 2);
|
| 421 |
push (@gradleArgs, '--stacktrace') if ($opt_verbose > 3);
|
436 |
push (@gradleArgs, '--stacktrace') if ($opt_verbose > 3);
|
| 422 |
push (@gradleArgs, '-I', $initScript) unless ($tasks[0] =~ m/clean/);
|
437 |
push (@gradleArgs, '-I', $initScript) unless ($tasks[0] =~ m/clean/);
|
| 423 |
push (@gradleArgs, '-p', $project_root);
|
438 |
push (@gradleArgs, '-p', $project_root);
|
| 424 |
|
439 |
|
| - |
|
440 |
#
|
| - |
|
441 |
# Address a gradle issue, under LINUX, that appears to be solved by
|
| - |
|
442 |
# having STDIN redirected.
|
| - |
|
443 |
#
|
| - |
|
444 |
# Downside is that Control-C can't be used to terminate the compile
|
| - |
|
445 |
#
|
| - |
|
446 |
my @gradlePrefix = qw( --NoExit );
|
| - |
|
447 |
push (@gradlePrefix, '--Show') if $opt_verbose;
|
| - |
|
448 |
if ($ENV{'GBE_UNIX'} ) {
|
| - |
|
449 |
push (@gradlePrefix, '--Shell', '</dev/null');
|
| - |
|
450 |
} else {
|
| - |
|
451 |
push (@gradlePrefix, '--NoShell');
|
| - |
|
452 |
}
|
| - |
|
453 |
|
| 425 |
my $rv = System('--NoShell', '--NoExit', $gradleProg, @gradleArgs, @tasks);
|
454 |
my $rv = System(@gradlePrefix, $gradleProg, @gradleArgs, @tasks);
|
| 426 |
return $rv;
|
455 |
return $rv;
|
| 427 |
}
|
456 |
}
|
| 428 |
|
457 |
|
| 429 |
#-------------------------------------------------------------------------------
|
458 |
#-------------------------------------------------------------------------------
|
| 430 |
# Function : createGradleFiles
|
459 |
# Function : createGradleFiles
|