Fix android gradle file
This commit is contained in:
+26
-26
@@ -1983,33 +1983,33 @@ class AndroidExporter extends Exporter {
|
|||||||
gradle = gradle.replace(/{compileSdkVersion}/g, target_options.compileSdkVersion.toString());
|
gradle = gradle.replace(/{compileSdkVersion}/g, target_options.compileSdkVersion.toString());
|
||||||
gradle = gradle.replace(/{minSdkVersion}/g, target_options.minSdkVersion.toString());
|
gradle = gradle.replace(/{minSdkVersion}/g, target_options.minSdkVersion.toString());
|
||||||
gradle = gradle.replace(/{targetSdkVersion}/g, target_options.targetSdkVersion.toString());
|
gradle = gradle.replace(/{targetSdkVersion}/g, target_options.targetSdkVersion.toString());
|
||||||
|
let arch = '';
|
||||||
|
if (target_options.abiFilters.length > 0) {
|
||||||
|
for (let item of target_options.abiFilters) {
|
||||||
|
if (arch.length === 0) {
|
||||||
|
arch = '"' + item + '"';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
arch = arch + ', "' + item + '"';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
arch = `ndk { abiFilters += listOf(${arch}) }`;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
switch (goptions.arch) {
|
||||||
|
case 'default':
|
||||||
|
arch = '';
|
||||||
|
break;
|
||||||
|
case 'arm8':
|
||||||
|
arch = 'arm64-v8a';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (goptions.arch !== 'default') {
|
||||||
|
arch = `ndk {abiFilters += listOf("${arch}")}`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
gradle = gradle.replace(/{architecture}/g, arch);
|
||||||
// Looks like these should go into CMakeLists.txt now..
|
// Looks like these should go into CMakeLists.txt now..
|
||||||
// let arch = '';
|
|
||||||
// if (target_options.abiFilters.length > 0) {
|
|
||||||
// for (let item of target_options.abiFilters) {
|
|
||||||
// if (arch.length === 0) {
|
|
||||||
// arch = '"' + item + '"';
|
|
||||||
// }
|
|
||||||
// else {
|
|
||||||
// arch = arch + ', "' + item + '"';
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// arch = `ndk { abiFilters += listOf(${arch}) }`;
|
|
||||||
// }
|
|
||||||
// else {
|
|
||||||
// switch (goptions.arch) {
|
|
||||||
// case 'default':
|
|
||||||
// arch = '';
|
|
||||||
// break;
|
|
||||||
// case 'arm8':
|
|
||||||
// arch = 'arm64-v8a';
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
// if (goptions.arch !== 'default') {
|
|
||||||
// arch = `ndk {abiFilters += listOf("${arch}")}`;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// gradle = gradle.replace(/{architecture}/g, arch);
|
|
||||||
// gradle = gradle.replace(/{cflags}/g, cflags);
|
// gradle = gradle.replace(/{cflags}/g, cflags);
|
||||||
// cppflags = '-frtti -fexceptions ' + cppflags;
|
// cppflags = '-frtti -fexceptions ' + cppflags;
|
||||||
// cppflags = '-std=' + project.cppStd + ' ' + cppflags;
|
// cppflags = '-std=' + project.cppStd + ' ' + cppflags;
|
||||||
|
|||||||
Reference in New Issue
Block a user