@@ -1983,33 +1983,33 @@ class AndroidExporter extends Exporter {
1983
1983
gradle = gradle . replace ( / { c o m p i l e S d k V e r s i o n } / g, target_options . compileSdkVersion . toString ( ) ) ;
1984
1984
gradle = gradle . replace ( / { m i n S d k V e r s i o n } / g, target_options . minSdkVersion . toString ( ) ) ;
1985
1985
gradle = gradle . replace ( / { t a r g e t S d k V e r s i o n } / g, target_options . targetSdkVersion . toString ( ) ) ;
1986
+ let arch = '' ;
1987
+ if ( target_options . abiFilters . length > 0 ) {
1988
+ for ( let item of target_options . abiFilters ) {
1989
+ if ( arch . length === 0 ) {
1990
+ arch = '"' + item + '"' ;
1991
+ }
1992
+ else {
1993
+ arch = arch + ', "' + item + '"' ;
1994
+ }
1995
+ }
1996
+ arch = `ndk { abiFilters += listOf(${ arch } ) }` ;
1997
+ }
1998
+ else {
1999
+ switch ( goptions . arch ) {
2000
+ case 'default' :
2001
+ arch = '' ;
2002
+ break ;
2003
+ case 'arm8' :
2004
+ arch = 'arm64-v8a' ;
2005
+ break ;
2006
+ }
2007
+ if ( goptions . arch !== 'default' ) {
2008
+ arch = `ndk {abiFilters += listOf("${ arch } ")}` ;
2009
+ }
2010
+ }
2011
+ gradle = gradle . replace ( / { a r c h i t e c t u r e } / g, arch ) ;
1986
2012
// Looks like these should go into CMakeLists.txt now..
1987
- // let arch = '';
1988
- // if (target_options.abiFilters.length > 0) {
1989
- // for (let item of target_options.abiFilters) {
1990
- // if (arch.length === 0) {
1991
- // arch = '"' + item + '"';
1992
- // }
1993
- // else {
1994
- // arch = arch + ', "' + item + '"';
1995
- // }
1996
- // }
1997
- // arch = `ndk { abiFilters += listOf(${arch}) }`;
1998
- // }
1999
- // else {
2000
- // switch (goptions.arch) {
2001
- // case 'default':
2002
- // arch = '';
2003
- // break;
2004
- // case 'arm8':
2005
- // arch = 'arm64-v8a';
2006
- // break;
2007
- // }
2008
- // if (goptions.arch !== 'default') {
2009
- // arch = `ndk {abiFilters += listOf("${arch}")}`;
2010
- // }
2011
- // }
2012
- // gradle = gradle.replace(/{architecture}/g, arch);
2013
2013
// gradle = gradle.replace(/{cflags}/g, cflags);
2014
2014
// cppflags = '-frtti -fexceptions ' + cppflags;
2015
2015
// cppflags = '-std=' + project.cppStd + ' ' + cppflags;
0 commit comments