Enable doNotStrip
when doing development/debugging within Android Studio
This commit is contained in:
parent
9ca0d66a3b
commit
4380004176
5 changed files with 30 additions and 10 deletions
2
platform/android/java/app/assets/.gitignore
vendored
Normal file
2
platform/android/java/app/assets/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
*
|
||||||
|
!.gitignore
|
|
@ -77,7 +77,7 @@ android {
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
// The default ignore pattern for the 'assets' directory includes hidden files and directories which are used by Godot projects.
|
// The default ignore pattern for the 'assets' directory includes hidden files and directories which are used by Godot projects.
|
||||||
aaptOptions {
|
aaptOptions {
|
||||||
ignoreAssetsPattern "!.svn:!.git:!.ds_store:!*.scc:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"
|
ignoreAssetsPattern "!.svn:!.git:!.gitignore:!.ds_store:!*.scc:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"
|
||||||
}
|
}
|
||||||
|
|
||||||
ndk {
|
ndk {
|
||||||
|
@ -106,8 +106,10 @@ android {
|
||||||
exclude 'META-INF/LICENSE'
|
exclude 'META-INF/LICENSE'
|
||||||
exclude 'META-INF/NOTICE'
|
exclude 'META-INF/NOTICE'
|
||||||
|
|
||||||
// Should be uncommented for development purpose within Android Studio
|
// 'doNotStrip' is enabled for development within Android Studio
|
||||||
// doNotStrip '**/*.so'
|
if (shouldNotStrip()) {
|
||||||
|
doNotStrip '**/*.so'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
|
|
|
@ -209,18 +209,35 @@ ext.getReleaseKeyAlias = { ->
|
||||||
return keyAlias
|
return keyAlias
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ext.isAndroidStudio = { ->
|
||||||
|
def sysProps = System.getProperties()
|
||||||
|
return sysProps != null && sysProps['idea.platform.prefix'] != null
|
||||||
|
}
|
||||||
|
|
||||||
ext.shouldZipAlign = { ->
|
ext.shouldZipAlign = { ->
|
||||||
String zipAlignFlag = project.hasProperty("perform_zipalign") ? project.property("perform_zipalign") : ""
|
String zipAlignFlag = project.hasProperty("perform_zipalign") ? project.property("perform_zipalign") : ""
|
||||||
if (zipAlignFlag == null || zipAlignFlag.isEmpty()) {
|
if (zipAlignFlag == null || zipAlignFlag.isEmpty()) {
|
||||||
|
if (isAndroidStudio()) {
|
||||||
|
zipAlignFlag = "true"
|
||||||
|
} else {
|
||||||
zipAlignFlag = "false"
|
zipAlignFlag = "false"
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return Boolean.parseBoolean(zipAlignFlag)
|
return Boolean.parseBoolean(zipAlignFlag)
|
||||||
}
|
}
|
||||||
|
|
||||||
ext.shouldSign = { ->
|
ext.shouldSign = { ->
|
||||||
String signFlag = project.hasProperty("perform_signing") ? project.property("perform_signing") : ""
|
String signFlag = project.hasProperty("perform_signing") ? project.property("perform_signing") : ""
|
||||||
if (signFlag == null || signFlag.isEmpty()) {
|
if (signFlag == null || signFlag.isEmpty()) {
|
||||||
|
if (isAndroidStudio()) {
|
||||||
|
signFlag = "true"
|
||||||
|
} else {
|
||||||
signFlag = "false"
|
signFlag = "false"
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return Boolean.parseBoolean(signFlag)
|
return Boolean.parseBoolean(signFlag)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ext.shouldNotStrip = { ->
|
||||||
|
return isAndroidStudio()
|
||||||
|
}
|
||||||
|
|
|
@ -36,8 +36,10 @@ android {
|
||||||
exclude 'META-INF/LICENSE'
|
exclude 'META-INF/LICENSE'
|
||||||
exclude 'META-INF/NOTICE'
|
exclude 'META-INF/NOTICE'
|
||||||
|
|
||||||
// Should be uncommented for development purpose within Android Studio
|
// 'doNotStrip' is enabled for development within Android Studio
|
||||||
// doNotStrip '**/*.so'
|
if (shouldNotStrip()) {
|
||||||
|
doNotStrip '**/*.so'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
|
|
|
@ -20,9 +20,6 @@ android {
|
||||||
packagingOptions {
|
packagingOptions {
|
||||||
exclude 'META-INF/LICENSE'
|
exclude 'META-INF/LICENSE'
|
||||||
exclude 'META-INF/NOTICE'
|
exclude 'META-INF/NOTICE'
|
||||||
|
|
||||||
// Should be uncommented for development purpose within Android Studio
|
|
||||||
// doNotStrip '**/*.so'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
|
|
Loading…
Reference in a new issue