Skip to content
This repository has been archived by the owner on Jun 2, 2018. It is now read-only.

Commit

Permalink
Don't ignore the minSDKVersion preference from config.xml
Browse files Browse the repository at this point in the history
Use the correct minSdkVersion comparing with the preference from config.xml.
Add the option of "--variable XWALK_MULTIPLEAPK=false" if build the architectures
in one apk.
  • Loading branch information
fujunwei authored and infil00p committed Sep 18, 2015
1 parent 88b725c commit 687227f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
15 changes: 8 additions & 7 deletions platforms/android/xwalk.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,6 @@ repositories {
}
}

if (cdvBuildMultipleApks == null) {
ext.cdvBuildMultipleApks = true
}
if (cdvMinSdkVersion == null) {
ext.cdvMinSdkVersion = 14
}

def getConfigPreference(name) {
name = name.toLowerCase()
def xml = file("res/xml/config.xml").getText()
Expand All @@ -56,6 +49,14 @@ def getConfigPreference(name) {
return ret ? ret : defaultValue
}

if (cdvBuildMultipleApks == null) {
ext.cdvBuildMultipleApks = getConfigPreference("xwalkMultipleApk").toBoolean();
}
if (cdvMinSdkVersion == null) {
def minSdk = getConfigPreference("android-minSdkVersion");
ext.cdvMinSdkVersion = minSdk && minSdk.toInteger() > 14 ? minSdk : 14;
}

if (!project.hasProperty('xwalkMode')) {
def mode = getConfigPreference("xwalkMode")
println mode
Expand Down
1 change: 1 addition & 0 deletions plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<preference name="xwalkVersion" default="14+"/>
<preference name="xwalkCommandLine" default="--disable-pull-to-refresh-effect"/>
<preference name="xwalkMode" default="embedded" />
<preference name="xwalkMultipleApk" default="true" />
</config-file>

<config-file target="AndroidManifest.xml" parent="/*">
Expand Down

0 comments on commit 687227f

Please sign in to comment.