mirror of https://github.com/axmolengine/axmol.git
Add build1k:assembleDebug support for android
This commit is contained in:
parent
e3f33fe9c2
commit
6b6fc25078
|
@ -816,19 +816,38 @@ else {
|
|||
}
|
||||
b1k_print ("CONFIG_ALL_OPTIONS=$CONFIG_ALL_OPTIONS, Count={0}" -f $CONFIG_ALL_OPTIONS.Count)
|
||||
|
||||
# parsing build optimize flag from build_options
|
||||
$buildOptions = $options.xb
|
||||
$nopts = $buildOptions.Count
|
||||
$optimize_flag = $null
|
||||
for ($i = 0; $i -lt $nopts; ++$i) {
|
||||
$optv = $buildOptions[$i]
|
||||
if($optv -eq '--config') {
|
||||
if ($i -lt ($nopts - 1)) {
|
||||
$optimize_flag = $buildOptions[$i + 1]
|
||||
}
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
if (($BUILD_TARGET -eq 'android') -and ($options.xt -eq 'gradle')) {
|
||||
if ($optimize_flag -eq 'Debug') {
|
||||
./gradlew assembleDebug $CONFIG_ALL_OPTIONS
|
||||
}
|
||||
else {
|
||||
./gradlew assembleRelease $CONFIG_ALL_OPTIONS
|
||||
}
|
||||
}
|
||||
else {
|
||||
# step3. configure
|
||||
cmake -B $BUILD_DIR $CONFIG_ALL_OPTIONS
|
||||
|
||||
# step4. build
|
||||
# apply additional build options
|
||||
$xb_opts = $options.xb
|
||||
$BUILD_ALL_OPTIONS = if ("$($xb_opts)".IndexOf('--config') -eq -1) { @('--config', 'Release') } else { @() }
|
||||
if ($xb_opts) {
|
||||
$BUILD_ALL_OPTIONS += $xb_opts
|
||||
$BUILD_ALL_OPTIONS = @()
|
||||
$BUILD_ALL_OPTIONS += $buildOptions
|
||||
if (!$optimize_flag) {
|
||||
$BUILD_ALL_OPTIONS += '--config', 'Release'
|
||||
}
|
||||
|
||||
$BUILD_ALL_OPTIONS += "--parallel"
|
||||
|
|
Loading…
Reference in New Issue