Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to android API level 21. #1519

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions project/Build.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<xml>

<set name="PLATFORM" value="android-16" if="android" unless="HXCPP_ARM64 || HXCPP_X86_64" />
<set name="PLATFORM" value="android-21" if="android HXCPP_ARM64" />
<set name="PLATFORM" value="android-21" if="android HXCPP_X86_64" />
<set name="PLATFORM" value="android-21" if="android" />
<set name="HXCPP_CPP11" value="1" />

<include name="${HXCPP}/build-tool/BuildCommon.xml" />
Expand Down
16 changes: 5 additions & 11 deletions tools/platforms/AndroidPlatform.hx
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ class AndroidPlatform extends PlatformTarget

for (architecture in architectures)
{
var haxeParams = [hxml, "-D", "android", "-D", "PLATFORM=android-16"];
var cppParams = ["-Dandroid", "-DPLATFORM=android-16"];
var haxeParams = [hxml, "-D", "android", "-D", "PLATFORM=android-21"];
var cppParams = ["-Dandroid", "-DPLATFORM=android-21"];
var path = sourceSet + "/jniLibs/armeabi";
var suffix = ".so";

Expand All @@ -86,9 +86,6 @@ class AndroidPlatform extends PlatformTarget
}
else if (architecture == Architecture.ARM64)
{
haxeParams = [hxml, "-D", "android", "-D", "PLATFORM=android-21"];
cppParams = ["-Dandroid", "-DPLATFORM=android-21"];

haxeParams.push("-D");
haxeParams.push("HXCPP_ARM64");
cppParams.push("-DHXCPP_ARM64");
Expand All @@ -105,9 +102,6 @@ class AndroidPlatform extends PlatformTarget
}
else if (architecture == Architecture.X64)
{
haxeParams = [hxml, "-D", "android", "-D", "PLATFORM=android-21"];
cppParams = ["-Dandroid", "-DPLATFORM=android-21"];

haxeParams.push("-D");
haxeParams.push("HXCPP_X86_64");
cppParams.push("-DHXCPP_X86_64");
Expand Down Expand Up @@ -284,10 +278,10 @@ class AndroidPlatform extends PlatformTarget

var commands = [];

if (armv5) commands.push(["-Dandroid", "-DPLATFORM=android-16"]);
if (armv7) commands.push(["-Dandroid", "-DHXCPP_ARMV7", "-DHXCPP_ARM7", "-DPLATFORM=android-16"]);
if (armv5) commands.push(["-Dandroid", "-DPLATFORM=android-21"]);
if (armv7) commands.push(["-Dandroid", "-DHXCPP_ARMV7", "-DHXCPP_ARM7", "-DPLATFORM=android-21"]);
if (arm64) commands.push(["-Dandroid", "-DHXCPP_ARM64", "-DPLATFORM=android-21"]);
if (x86) commands.push(["-Dandroid", "-DHXCPP_X86", "-DPLATFORM=android-16"]);
if (x86) commands.push(["-Dandroid", "-DHXCPP_X86", "-DPLATFORM=android-21"]);
if (x64) commands.push(["-Dandroid", "-DHXCPP_X86_64", "-DPLATFORM=android-21"]);

CPPHelper.rebuild(project, commands);
Expand Down